Balloons 1945

This game was part of a 2 week project where we were expected to spend about 15 hours of time developing something in Processing. The inspiration for this simple game was one I played a lot as a kid: Strikers 1945 for PS1. Here is a link to some gameplay. Below is some analysis of my development, a video of gameplay, and finally a link to source code

Intro

I loved the simplicity of the game: You’re nearly always shooting, the world moves around you rather than you directing progress, and you have some simple tools at your disposal like upgraded blasters and calling for backup. I felt like this would be a lofty goal with a narrow enough scope for a game and fit within the directions for the project.

So, for my game I took a step in the direction of Strikers 1945, never really getting close however. The player controls a ship that is trying to shoot incoming balloons before those balloons get past him and exit the bottom of the screen. There is no win condition currently, so the goal of the game is merely to last as long as possible. There are also no points currently. However, the player can collect power-ups. Balloons have a chance of dropping two different kinds of power-ups: gun upgrades and backup. Right now, backup does nothing. Gun upgrades boost your ships damage until you have collected 2 and then do nothing from then on.

Below is a video showing off some gameplay:

Wishlist

I wish that I had gotten to score and fully implementing the parts I most enjoyed from Strikers 1945, namely backup and the enemies having unique motion and powers.

While I created the backup power-up, I never got to implementing a direct benefit to collecting them. In Strikers 1945, calling for backup brings in a fleet for a short time whose strength is based on how many gun upgrades you have. That is quite the lofty goal, but I wish I had gotten to at least something resembling that.

I also did create different balloon types, however those differences can be explained with merely radius, color, speed, and hp. They don’t currently have anything else unique about them besides the “Screamers” which launch at the last known ship’s position. I have 4 balloon types: Fighters, Carriers, Armored, and Screamers. What I wished for was:

  • Fighters
    • Fly in formations
    • Shoot small bullets in last known location of ship
    • Minor defenses
  • Carriers
    • Hover towards top of screen
    • Slowly produce fighters
    • Bulky
  • Armored
    • Shoot slow, tracking bullets at ship
    • Be scary for player
    • Extremely bulky
  • Screamers
    • Extremely fast
    • Kamikaze
    • Aim right for the player
    • No defenses

I only got to the defenses features of these as I got bogged down in engine creation. These would have been the features that would have provided the largest boost to player engagement.

Finally, I wish I had some form of scripted event. Procedurally generating balloons is okay, but I really wanted to provide a scripted experience much like I got from Strikers 1945 that players could practice and get better. In terms of practicing and getting better, I did include an extremely basic difficulty rating based on time played and I wish I had made that able to be a selected value and adjust the scripted gameplay accordingly.

Algorithmic Discussion

I didn’t use any fancy algorithms. Everything was very simple: random numbers or for loops through every entity.

I produce a lot of bullets every frame and am currently checking every bullet against every balloon every frame. This is completely overkill and unnecessary. Given time and a lot of help, I would have created some form of spatial data structure to hold bullets and balloons and waste less time checking for collisions.

I also would have created a component system given more time. Rather than update and draw calls, I would create physics and render components that systems I create can quickly run through and update. I attempted this but I was doing it when different balloons and different bullets had very differing behavior and it seemed convoluted to pull them all into one system. A little more time thinking about it would have helped.

Processing as a Game Engine Analysis:

I was actually pretty satisfied with the support I got from Processing. Processing automatically does a window, it has a shape class, it takes in user input, it has basic lighting. I didn’t really feel like I was missing any basic engine support. I also don’t think I really pushed Processing. I didn’t do animation, sound, or level systems.

My favorite part of this project was creating different engine components. I created:

  • GameManager
    • In charge of lives and handling communication between different parts of game
  • UIHandler
    • Takes in all user input and transfers decoded commands to GameManager who then handles them as it sees fit
  • GameRenderer
    • This is pretty basic. Since I was only using the built-in PShape class, this class was basically a loop over all entities draw calls. However, if I started going into complex geometry, this class had access to shapes, colors, and positions of entities that I wanted to draw.
  • Entity Manager
    • This handled all entities in the game: Balloons, Bullets, BalloonDrops, and the player ship. I took care of updates, collisions, bounds checking, listened for events related to entities from game manager, and finally despawned and called for spawning of entities
    • Would call for BalloonSpawner to generate a balloon when prompted
  • BalloonSpawner
    • Would create a new balloon based on difficulty and random values and then hand the reference to the entity manager.

Outside of these big system classes, I did a lot of inheritance for different balloon types, different bullet types, different balloon drops (upgrades, backup).

I tried to maintain a reasonable level of knowledge for each class. I gave a lot of power and knowledge to my managers, but that allowed me to not shove odd, out of scope information onto entities, though that still probably happened as I tried to stop being so optimization and engine programming focused and tried to actually get some cool stuff happening.

With more time, I would have created a more in-depth rendering class, a sound manager, and I would have cleaned up code to make sure that the knowledge and function of each class was fully contained by what the object represented.

Source Code: Here