Back to Math Projects

StarCatcher Project

This is our main web page that holds the canvas for the game's actions.

This is our starter code for the javascript file where we will control all the actions of the game.

These blocks of code are used to move the player ship around the screen with keyboard movements and give the star a two dimensional speed using an array.

These blocks of code will move all of our star information into a class variable. This is will remove the speed array created in the last additions. Using a class for the stars will improve the flexibility of our code.

These blocks of code will organize our player update into it's own function. The code to bounce the star off the sides of the screen should have been completed before this code is used

These few lines of code I usually instruct in class, but just in case you missed the lecture, follow these instructions.

Time to add a start feature to the game. We will have all the stars on the screen and the players, then the spacebar will begin the game.

Scoring is added. Using jQuery, we will keep track of the stars and who collides with them. An alternative collisions test is here as well.

David Johns and Electric Teaching ~ All Rights Reserved © 2015