I decided that since the first Game A Week (GAW) game (Pong) only had 2D shapes with translation, then the next game should have 2D shapes with translation and rotation. In keeping with the theme of remaking old games, I chose to create a clone of Spacewar next. I was only able to set up the initial project in Dart, nothing else.
I created a triangle shaped GameObject and wrote up a simple Ship component that I assigned it. This component uses keyboard input to rotate the triangle left and right and move the triangle forward and backward. I also changed the background color to black (whoa!).
I changed the ship to move via forces applied to it instead of just changing its position.
No progress. I went to
No progress. I went to a birthday party.
I set it up so that the ship warps to the opposite screen edge when it reaches one screen edge. I added in the ability to fire bullets that also warp around. I made a tough decision that since I had not worked on the game very much during the week, that I had to trim down features. I knew I wouldn't have time to put in multiplayer, random ship warping, etc. I decided to make it a more simplistic game similar to Asteroids. I implemented an AsteroidManager component that randomly spawns asteroids that fly around the screen.
I added in collision detection between the ship, bullets, and asteroids. I set up scoring as well as game over conditions. I added in the ability to render the ship with color (everything previously could only render in white). I tweaked the random creation of asteroids and limited the maximum number of both bullets and asteroids in order to avoid the game being a big mess of objects.
Play the game here!
I had even less time this week to work on the game than last week. I believe I spent about a total of 12 hours on it this week.
Here were the features I had hoped to get in that I had to scrap:
Sounds - Again, sounds for everything didn't make it in.
Planets - Planets with gravity that affected the acceleration/velocity of all objects
Multiplayer - Two ships battling against one another.
I'm really hoping that I'll have more time in the next two weeks for future GAWs due to certain circumstances in my life that I'll explain later.
NOTE: I realized after publishing the game to my server that my changes to some shared shaders broke last week's Pong game. Nothing is rendering anymore. I'll need to figure out what's going on with that and fix it (no other game code will be changed except that). NOW FIXED!