SpaceRacer is a space themed game inspired by "Protect Your Car". The goal is to survive the flight from the Sun to Pluto without crashing into an asteroid as the levels become increasingly difficult.
SpaceRacer was built entirely with pure Javascript and styled with CSS. I make extensive use of the HTML Canvas API as this provides the ability to animate by continuously redrawing objects and rendering new frames.
The main feature is obviously the game itself. I built the game to have 4 evenly sized lanes in the middle of the screen that you can navigate between by using your 'left' and 'right' arrow keys on your keyboard. Depending on the level, the speed and amount of asteroids vary and the goal is to avoid these asteroids as they approach.
From the Main Menu you can access the "Info" page which displays a short motivating story for why you are hightailing it out of our solar system, as well as the "High Scores" page which displays the top 10 best local high scores.
There is a map at the bottom of the screen that allows you to see which level (planet) you're currently on by highlighting the respective planet in a purple aura.
There is a speaker button that allows you to toggle the soundtrack on and off and when the game is initially started the soundtrack automatically plays.
- Add Global High Scores



