JavaScript- Text Based Adventure Game 1

Over the last few days I have been working on a text based adventure game written in JavaScript. I learnt how to do this on the codeacademy website:

http://www.codecademy.com/courses/javascript-beginner-en-ZA2rb/0/6?curriculum_id=506324b3a7dffd00020bf661

This is what the program looks like when running my adventure game:

game 1

If you follow the above link it should take you straight to the part of the tutorial where you build your own game. You may need to select lesson 6/6 from the drop-down arrow on the left hand side, inside the white side panel.

If you want to you can follow this linkΒ to copy and paste my code from there into the simulator found at the previous link:

https://drive.google.com/file/d/0B6y9ITteBcqLVV9fbFZlTUg5T28/view?usp=sharing

Hopefully you will enjoy playing this text based rpg style game. Its the longest piece of code I’v written so far but the story-lines are not even 2 minutes long.

You will notice this post is entitled ‘JavaScript- Text Based Adventure Game 1’. This is because I have been trying to insert this code file into a html file for it run on the browser and I cannot figure it out! I think my coding is wrong somewhere but I do not know anything about HTML so I’m not too disappointed. Once I crack this enigma (and maybe one of you will know how I can do it) then I will post a second post linking straight to the html site where the game can be played!

game
A print-screen of the code in notebook++

Any thoughts on how to make this better, more fun, or just if you can help me out with inserting it into a html file that works in the browser would be amazing and greatly appreciated! πŸ™‚ πŸ™‚ have fun πŸ™‚ πŸ™‚

Advertisements