This is the third project in my pursuit of the Front-End Web Developer Nanodegree from Udacity. Following is Udacity's description for this project:
To play the game, check out the live version at http://www.richgieg.com/arcade-game. If you would like to host the game on your own system, please see the sections that come after the gameplay instructions below.
Playing the Game
The goal of this game is to get your character to the water. Sounds simple, right? Well, it's not quite that easy... You see, there are bugs moving at varying speeds on the paved-block portion of the scene. If you collide with a bug, your character will be moved back to the original starting position and your score will be reduced. On the other hand, each time you make it to the water safely your score will be increased generously. But, immediately after the short celebration a new bug will be spawned in order to make your next trip to the water a bit more challenging. Let's see how high of a score you can get, shall we?
If you're playing the game on a computer with a keyboard, you can move your character
by using the
RIGHT arrow keys. These are the only keys you
need to worry about for playing this game.
If you're using a touchscreen device, such as an iPad, you can tap directly on your
screen to move your character. To move
UP, touch a tile above your
character, but in the same column. To move
DOWN, touch a tile below
your character, but in the same column. To move
LEFT, touch a tile to the left of
your character, but in the same row. To move
RIGHT, touch a tile to
the right of your character, but in the same row. These are the only movements
you need to worry about for playing this game.
Reach the water:
+15000 points and
+500 points per bug
Collide with bug:
Half a second of time passes:
The sections that follow are only necessary if you are trying to host the game on your system.
Install a Web Server
Run the Game
Use a command line terminal for the following steps. This guide assumes you will use Python's SimpleHTTPServer module to host the game.
Clone the repository to your local system, then launch the web server:
git clone https://github.com/richgieg/ArcadeGame.git cd ArcadeGame python -m SimpleHTTPServer
You should see a message similar to
"Serving HTTP on 0.0.0.0 port 8000" in your terminal.
Use a browser to connect to your web server:
Open your favorite browser
At this point, the game should be loaded in your browser and ready to play.
Stop the Web Server
Once you're done playing the game, you can exit your browser and stop the web server.
[press Ctrl+C in the terminal to interrupt the web server]