For our first assignment, I created a Choose Your Own Adventure game based on the movie "Labyrinth", using Javascript. The game allows guides you through a story, asking questions along the way with choice options that must be typed in. Depending on the options chosen, the story proceeds in one direction or another. Typing code to create a game for the first time, I found it to be easier than I first thought. Once you learn the language and can trouble shoot, the rest is easy!
Teaching students about the basics of coding can allow them to have a more in depth knowledge of how new technology works, leading to a greater appreciation for the art form of video game and website creation, as well as more critical thinking about how their worlds are created and the reasons behind those creations. This particular project really modifies the way a normal choose your own adventure story or game might work, using traditional pencil and paper. It gives the opportunity to use a new tool and interact with it at anytime or anywhere as long as you have a mobile device.
To play my game "Labyrinth" click here:
http://www.caitlinhazelton.com/labyrinth
Here is some sample script of the game below:
*** <script type="text/javascript">
//Create variables for all of your questions here
var question1 = "Do you wish for the goblins to kidnap Toby? (yes/no)";
var question2a = "Do you go back in to investigate or do you go to your room, assuming Toby fell asleep? (investigate/room)";
var question2b = "I have Toby, as you wished. Now you can enter the Labyrinth to find him or go back to your room and play with your toys and costumes. (labyrinth/room)";
//Intro
alert("Welcome to The Labyrinth!");
username = prompt("What is your name?");
if(username) {
window.alert("Welcome new player " + username + ".");
}
else {
window.alert("Please restart and enter a name.");
}
alert("You are a fantasy loving teenager, " + username + " , who one night gets roped into babysitting your baby brother, Toby. After hours of trying to get him to stop crying, you consider wishing for the Goblin King to come take him away.");...***