Step 2: Create an outline for the logic of the game
- Introduction to JavaScript
Score: 10
Evaluation & Deliverables:
JavaScript is way different to me than HTML or CSS. The latter two make a lot of sense to me. I have a sense of what goes into a webpage and to know what kinds of things to look for if I have a question. With JavaScript, I have little clue what it can do. I'm sure Codecademy will help.
This week's goal was to make an outline for the game portion of my instructional tool. The basic idea of the game is that the player is part of an operation to recover stolen artifacts from a major art thief. The player has located all the artifacts in the house and is given code signals to a partner to help the partner navigate through the thief's mansion and retrieve the stolen goods. The code signals are made up of different uses of punctuation marks the student has learned. In the game, the player will see a top-down view of the mansion hallways. A flashing dot will represent their partner. Smaller flashing dots represent artifacts to collect. The player will be shown a small portion of the building at a time - enough for the player to have to make a decision which direction to send the partner. Directions will include turning down a different hallway (;), going through a door (:), leaving a building to go to a new one (.), pausing to avoid a booby-trap(,), or collecting a certain number of items in the hallway(,,,). Direction options are presented as sentences using various punctuation. The player chooses the appropriate sentence to deliver to the partner. The partner then follows the code directions given. Thugs and guard dogs are on the alert in the various hallways (will also show up as a certain signal in the game). The bad guys will help make it so there is only one right way to go. If the player sends the partner in the wrong direction, the partner has an encounter with the bad guys. After three encounters with bad guys, it is game over. Points are awarded for the number of artifacts collected.
It seems reasonable that the game could be different every time someone played. If presented hallway types were put in categories, and it was programmed which types of categories could follow another, then the game could possibly randomly assign hallway sequences. Sentence options could also be assigned to certain hallway categories so those could be randomly assigned in a smart way.
Here are the directions (sentence options):
Here are the hallway options and rules:
I think to make this all happen, I will create short video clips for each scenario listed above. I don't think the video clips would take too long. I would need a static hallway setup, and then alternating images of flashing dots for the partner, items, and bad guys. I'd then make images of the partner moving in the direction given by the player. I'd string all those images together in iMovie to make the clips. Then, the JavaScript could execute the clip that corresponds with a hallway option and player direction given in the game.
Here's an example movie: http://youtu.be/vVaADgpfsno
_________________________________________________________
As part of this week's JavaScript lesson on Codecademy, I was supposed to make a basic choose your own adventure game. Seemed pretty simple. Here's the result:
confirm("Are you ready to play?");
var age;
age = prompt("What's your age?");
if (age < 18) {
console.log("You are allowed to play, but we take no responsibility for the results of your gameplay");
} else {
console.log("Then let's play!");
}
console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him.");
console.log("Batman glares at you.");
var userAnswer
userAnswer = prompt("Batman: Are you feeling lucky, punk?");
if (userAnswer === "yes") {
console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!");
} else {
console.log("You did not say yes to feeling lucky. Good choice! You are a winner in the game of not getting beaten up by Batman.");
}
var feedback
feedback = prompt("Rate this game on a scale of 1 to 10");
if (feedback > 8) {
console.log("This is just the beginning of my game empire. Stay tuned for more!");
} else {
console.log("I slaved away at this game and you gave me that score?! The nerve! Just you wait!");
}
This week's goal was to make an outline for the game portion of my instructional tool. The basic idea of the game is that the player is part of an operation to recover stolen artifacts from a major art thief. The player has located all the artifacts in the house and is given code signals to a partner to help the partner navigate through the thief's mansion and retrieve the stolen goods. The code signals are made up of different uses of punctuation marks the student has learned. In the game, the player will see a top-down view of the mansion hallways. A flashing dot will represent their partner. Smaller flashing dots represent artifacts to collect. The player will be shown a small portion of the building at a time - enough for the player to have to make a decision which direction to send the partner. Directions will include turning down a different hallway (;), going through a door (:), leaving a building to go to a new one (.), pausing to avoid a booby-trap(,), or collecting a certain number of items in the hallway(,,,). Direction options are presented as sentences using various punctuation. The player chooses the appropriate sentence to deliver to the partner. The partner then follows the code directions given. Thugs and guard dogs are on the alert in the various hallways (will also show up as a certain signal in the game). The bad guys will help make it so there is only one right way to go. If the player sends the partner in the wrong direction, the partner has an encounter with the bad guys. After three encounters with bad guys, it is game over. Points are awarded for the number of artifacts collected.
It seems reasonable that the game could be different every time someone played. If presented hallway types were put in categories, and it was programmed which types of categories could follow another, then the game could possibly randomly assign hallway sequences. Sentence options could also be assigned to certain hallway categories so those could be randomly assigned in a smart way.
Here are the directions (sentence options):
- (";") Turn left (or right - only one turn option will be available) into a new hallway
- (":") Continue through door
- ("." - sentence with no punctuation but a period) Exit building and head to the next one
- (",") Pause briefly in hallway to deactivate booby-trap
- (", , ," - sentence with a list) Gather the number of items in the hallway as indicated by the length of the list
- (": , , ," - colon followed by a list) Go through the door and gather the number of items in the hallway as indicated by the length of the list.
I would make a bank of sentence options that the system could choose to present based on room type (would present four options to the player).
Here are the hallway options and rules:
- Wrong ways will be indicated to the player by an icon representing a bad guy.
- A continuing hallway (1) is one coming from the left side of the screen and heading straight through the right side of the screen.
- A joined hallway is one that is starting from above or below, but turns to follow the normal course from left to right. An "above" joined hallway (2) is one that starts at the top of the screen, and "below" (3) vice versa.
- A beginning hallway (4) is one starting from a building entrance. Entrance is on the left, hallway heads right.
- An exit (5) is a hallway that ends at a door that leads out of the building.
- If a player chooses the wrong way, they must try the hallway again (until three errors have been made, in which case the game is over).
- A player in a hallway with items could be presented with a comma list that would tell the partner to collect fewer items than present in the hallway, in which case, the player would earn less points).
- I have indicated the types of hallway beginnings and endings with numbers in parentheses (as indicated in the rules above).
- An ending 1 must follow up with a starting 1
- An ending 2 must follow up with a starting 2
- An ending 3 must follow up with a starting 3
- An ending 5 must follow up with a starting 4
- Start: From beginning hallway, head through door to continuing hallway (1) (wrong way: right turn).
- The following would be randomized to change up gameplay:
- (1) From continuing hallway, turn left (3) (wrong way: door leading to a continuing hallway).
- (1) From continuing hallway, turn right (2) (wrong way: door leading to a continuing hallway).
- (1) From continuing hallway, head through door leading to continuing hallway (1) (wrong way: turn right).
- (1) From continuing hallway, exit building (5) (wrong way: turn left).
- (1) From continuing hallway, exit building (5) (wrong way: turn right).
- (1) From continuing hallway, pause to deactivate booby trap, then proceed through hallway (1) (wrong way is heading into the booby trap).
- (1) From continuing hallway, collect three items and proceed through hallway (1) (wrong way: left turn).
- (1) From continuing hallway, collect two items and proceed through hallway (1) (wrong way: left turn).
- (1) From continuing hallway, collect four items and proceed through hallway (1) (wrong way: left turn).
- (1) From continuing hallway, collect three items and proceed through hallway (1) (wrong way: right turn).
- (1) From continuing hallway, collect two items and proceed through hallway (1) (wrong way: right turn).
- (1) From continuing hallway, collect four items and proceed through hallway (1) (wrong way: right turn).
- (1) From continuing hallway, proceed through door and collect three items (1) (wrong way: left turn).
- (1) From continuing hallway, proceed through door and collect three items (1) (wrong way: right turn).
- (4) From beginning hallway, proceed through door and collect three items (1) (wrong way: right turn).
- (4) From beginning hallway, collect three items and proceed through hallway (1) (wrong way: right turn).
- (4) From beginning hallway, pause to deactivate booby trap, then proceed through hallway (1) (wrong way is heading into the booby trap).
- (2) From above joined hallway, collect three items and proceed through hallway (1) (wrong way: right turn).
- (2) From above joined hallway, proceed through door and collect three items (1) (wrong way: left turn).
- (2) From above joined hallway, exit building (5) (wrong way: left turn).
- (3) From below joined hallway, pause to deactivate booby trap, then proceed through hallway (1) (wrong way is heading into the booby trap).
- (3) From below joined hallway, exit building (5) (wrong way: turn right).
- (3) From below joined hallway, collect three items and proceed through hallway (1) (wrong way: right turn).
- End: (1) From continuing hallway, exit building (wrong way: left turn).
I think to make this all happen, I will create short video clips for each scenario listed above. I don't think the video clips would take too long. I would need a static hallway setup, and then alternating images of flashing dots for the partner, items, and bad guys. I'd then make images of the partner moving in the direction given by the player. I'd string all those images together in iMovie to make the clips. Then, the JavaScript could execute the clip that corresponds with a hallway option and player direction given in the game.
Here's an example movie: http://youtu.be/vVaADgpfsno
_________________________________________________________
As part of this week's JavaScript lesson on Codecademy, I was supposed to make a basic choose your own adventure game. Seemed pretty simple. Here's the result:
confirm("Are you ready to play?");
var age;
age = prompt("What's your age?");
if (age < 18) {
console.log("You are allowed to play, but we take no responsibility for the results of your gameplay");
} else {
console.log("Then let's play!");
}
console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him.");
console.log("Batman glares at you.");
var userAnswer
userAnswer = prompt("Batman: Are you feeling lucky, punk?");
if (userAnswer === "yes") {
console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!");
} else {
console.log("You did not say yes to feeling lucky. Good choice! You are a winner in the game of not getting beaten up by Batman.");
}
var feedback
feedback = prompt("Rate this game on a scale of 1 to 10");
if (feedback > 8) {
console.log("This is just the beginning of my game empire. Stay tuned for more!");
} else {
console.log("I slaved away at this game and you gave me that score?! The nerve! Just you wait!");
}
No comments:
Post a Comment