Here’s what our final product’s going to look like: Initial StepsĪfter you’ve gotten the library and set up a web server you should also go ahead and download the assets I’ve made for this project which include a start menu, a game over screen and sprites for the snake and fruit as well.īefore going on and creating your main HTML document you should also set up a folder for all of the JavaScript files that you’re going to need. Setting up a basic web server for yourself is fairly easy to do and you can read more about some of the different ways of doing it here. Something to note before getting started is that JavaScript programs with the Phaser library only run when they’re on a server. Go here to download Phaser and here if you want to read the documentation available on it. Phaser is by no means the greatest or most powerful gaming library around for JavaScript but I’ve chosen to go with it because it’s clean and easy to use which I think is fitting for a beginners project like snake. There are dozens upon dozens of different libraries for making JavaScript games and I’ve decided to go with Phaser for this project. Its possible to make your own snake clone with just native JavaScript but it’ll be a pain to do and probably pretty clunky as well so you should really use a library instead. The game had a huge surge in popularity after Nokia began to pre load it on their phones starting in 1998 and to this day the Nokia Phone version of snake is one of the most well known games around. Atari released a few different variants of the game on their consoles and it eventually found its way onto the PC too. “Blockade” ended up being quite the popular title which inspired lots of people to make copy cat versions of it almost immediately. The game snake as a concept dates back to a 1976 arcade game called “Blockade” in which multiple players each controlled a “snake” (though it was never referred to as such in “Blockade”) and tried to avoid hitting objects or other players on the screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |