Phase 5 of an asteroids project for kc computer club. The "Shooting" phase involves a rocket, asteroids and a rocket shooting asteroids with bullets. The scratch blocks involved deal with motion, looks and animation, sound, control, sensing and math operators. Additional math concepts include the use of message passing and relational operators. Game elements include a ship shooting bullets and asteroids getting hit by both bullets and the ship. This is step 3 of switching over to momentum from the start and stop model previously. Here we finish up our momentum implementation, maintaining momentum based on the x and y component of the rocket's angle while accelerating. We use sin() and cos() of direction along with an adjustment to the direction from scratch vs. the angle that sin() and cos() are expecting and we are continuously moving the rocket around the screen based on accumulated momentum in the x and y direction. This is modified by firing the rocket, maintaining a momentum vector to model a rocket's behavior in space rather than the previous start and stop model.
More information on KC Computer Club projects for students at http://facebook.com/kccomputerclub