Game players don’t always understand what goes on behind the scenes to make games work, but Jordan knows the secret to a good game – it’s all about the code! Last class, he added realism to his space shooter by coding impact responses, such as when a projectile hits an asteroid, or when a ship crashes into the asteroid. This class, he animated the asteroid to make it a moving target. But a single asteroid – even a moving one – just wasn’t enough of a challenge for Jordan. He turned his asteroid into a prefabricated template that the computer can reuse to create asteroid after asteroid. Then, he created a GameController that chooses a random X coordinate (think geometry) and spawns an asteroid at that location. Check out the video! Asteroids pop up all over the screen and must be detonated to protect the ship. Jordan even created his own function, SpawnWaves(), to add some special wave-like effects to the explosions. Every time a laser strikes an asteroid, the computer runs the code in Jordan’s function to spawn shock waves. It’s all about the code!
Awesome work and definitely an awesome game, Jordan. Let the space shooter rise! You’re a fantastic student with an enthusiasm to learn. We look forward to hearing about your new projects!