‘Rocket’ the game
Rocket is a game that was developed in the course Programming for Arts and Games at Nanyang Technological University. The game is simple. Try to pass the gray boxes that move horizontally on the top of the screen by launching the rocket at the right time. The song Waiting for the End by Linkin Park was the inspiration for the game. I imagined that asteroids are entering Earth’s atmosphere and that we need to leave the planet to survive. And avoid the asteroids, of course.
Game conditions
-
Launch
Press any key to launch the rocket. Don’t let the rocket sink too far. It’s game over if it disappears out of the bottom of the screen.
-
Double launch
It’s game over if you launch the same rocket twice. Click to restart.
-
Crash
The game is over if you hit the asteroids. If you pass them, one point will be added to your score.
The back-end
-
Soundtrack and rocket
These lines of code play the soundtrack Waiting for the End and display the rocket.
-
Crash code
This code detects if there’s a clash between the asteroids and the rocket.
-
Increased difficulty
The velocity of the asteroids increases the higher the score gets, making the game more challenging.
-
Launch or sink
This code makes the rocket sink if it’s not launched in time. It also controls the movement of the rocket.