Game A Week 5: SpaceShips Go Pew Pew (Part 1)

So. I’ll have to say right away that this is a two-parter. I learned a bunch of new things this week and still yesterday I was confident the game would be absolutely great. However, six hours ago I encountered a game breaking problem that caused me to rollback quite a lot. In this first part I will talk about how the game was supposed to turn out and the development up until 6 hours ago. Tomorrow I will release another post analyzing what went wrong and how I will continue from that.

The Game

Spaceships Go Pew Pew is a top-down space shooter inspired by games like Space Invaders and Galaga. The art style is inspired by Geometry Wars. You use the WASD keys or the arrow keys to move and SPACE to shoot. Each enemy killed gives you 200 points totaling 8400 points for all of them.

Known bugs:

  • After dying the New Game button gets stuck and it takes a while before you can actually play again.
  • The game doesn’t end if the enemies go below the screen.
  • Pressing ESC after winning the game makes the GUI.Label of the winning screen get stuck.

I will not be fixing these bugs because that is not the purpose of the challenge. I will, however, rerelease this game outside of this Game A Week challenge at a later date. I see a lot of potential for this game to be actually fun when I get it to work the way I want it.

Development ≥ T – 6 hours

I began developing this game by looking at Space Invaders and Galaga as role models. I wanted to have a player in the bottom and a row of enemies on the top. The enemies would slowly make their way down towards the player and shoot down (think Space Invaders). I was even planning to make 8-bit sounds for the game.

I drew a triangle in Gimp as a template player sprite but after some fine-tuning I decided to keep it as the final design. As an enemy I then drew a triangle with a cross in the middle. I made a simple idle animation for the enemy and decided to also draw the death animation while I was at it. There was also going to be a circle shaped enemy with animations and a death animation for the player.

For the enemies moving in a grid formation I made a parent GameObject called EnemyGrid in which the clones from the Square prefab are Instantiated as children. This way I could just move the whole grid around and all of the enemies move with them. I wanted to do it like that to achieve the Space Invader-esque rows of enemies. I was going to also random generate the types of enemies in the grid, had there been more enemy types.

Then I created the bullet which is just a small GameObject that is set to trigger a death animation and a Destroy() method in the enemy square it hits. That way when the death animation stops playing the GameObject is just destroyed. I was thinking of somehow making the dying enemy transparent for the duration of the death animation so that you could shoot through the exposion but I didn’t have the time.

I used some assets from the very first Game A Week I did to make the patrol system of the EnemyGrid. There are four Vector2 locations that are used dynamically to approach the player. The initial position is initialized in a Vector2 variable called initialPosition and its value is (x,y) = (0,0) and the patrol points from 1 to 4 are (1,0), (1,-1), (0,-1) and (0,-2). After the list of patrol points are iterated through, the script assigns the initialPosition variable to be (0, initialPosition.y – 2). Then it continues (1,-2), (1,-3), (0,-3) and so on. This way I don’t have to assign individual patrol points for all points the EnemyGrid travels through. Only for the pattern it repeats.

The game has a simple main menu and a score screen when the game is completed. For the main menu I used the Gimp text tool to create the title and the button textures.

In part 2 I write a little about the problems I had during the last 6 hours of development and what is the future of this game.

Leave a comment