Developing a game using states, allows you to organize your code, while also adding a more complete and dynamic gaming experience for the player. To see this example in action, click here.
UPDATE: 8/11/2015 I've updated this post to include a new file 'map.js' which contains an independent Map class. Instructions on using it are included below. UPDATE: 5/18/2015 Click here to play a live demo. Granted, it's not very exciting, but it proves the concept Not too long ago I decided that I wanted to learn how to program in JavaScript. And so, of course, I set about to program a game (I've always believed that one of the easiest, and most entertaining ways to teach yourself a new language is by programming a few simple games). I chose Phaser as my framework, and went to work.
One of the things that I wanted in my little game was a randomly generated environment, however, I couldn't seem to find any good tutorials on how to accomplish this. So I had to expand a bit, and figure some things out on my own... |
Hi, I'm Chad...Husband, Father, Technology Use Strategist, Programmer, and Artist. Archives
August 2015
Categories
All
|