This platformer/shooter hybrid was made in collaboration with Shaherfi Sidin for a school project. I was responsible for the gameplay and mechanics of the shooter section (starting at 7:42). I also provided some aesthetic suggestions and helped to merge the two codebases together.
As written in the video description:
This is a game about coping with depression. The player climbs out of the black abyss, haunted by the voice of depression, before finally gaining the courage to face it.
Our initial idea was to have two endings. In the “bad ending” you make the wrong choices during the platformer section, gaining powerups but becoming unable to defeat the final boss. In the “good ending” you go through the whole game without powerups, which gives you the strength to overcome the final boss. Unfortunately due to time constraints only the “bad ending” was finished. This ending is shown in the demonstration video.
My contribution to Broken Wings is based off an earlier abandoned project called Twin Stick Tower. This was an attempt to build a robust twin stick shooter engine, with support for waves of enemies and enemy AOE attacks that had to be dodged. When I paired with Shah for this project, I realized that his game concept would be a good opportunity to salvage my old code and present it in a playable state.
The architecture of Broken Wings is best described as two separate games duct-taped together. Shah and I worked on our sections individually before combining them into a single Processing project. This means that my game is completely self-contained, with the only input from the previous game state being what abilities the player has unlocked.
The hardest part of this project was writing the collision detection algorithms. Processing doesn’t provide collision detection baseline, which means I had to hit the books and lean heavily on vector math (which, thank god, it does provide libraries for). This let me do basic collision detection with circles and rectangles with arbitrary bearings.
Broken Wings only collides points with basic shapes because I couldn’t be arsed to write shape-on-shape detection, and I figured that all the important collision detection could be handled with point-on-shape collision anyway. Behind the scenes, the player and the player’s bullets are actually mathematical points, and only enemies and enemy bullets have hitboxes for them to collide against.
To handle enemy spawning, my game reads an external .csv file which looks something like this:
waveNo,tickNo,type,x,y,rotation,xTarget,yTarget,lifespan,text 0,120,MESSAGE,362,165,0,0,0,300,Why do you do this Child? 1,60,SPINNER,512,-50,0,0,0,350 2,0,SPINNER,240,-50,0,0,0,350 2,30,SPINNER,760,-50,0,0,0,350 2,60,SPINNER,512,-50,0,0,0,350
These table rows are translated into enemy spawn events and sorted into waves. The game then goes through waves individually, spawning all remaining enemies in each wave at the appropriate timer tick, then moving on to the next wave if all enemy objects associated with the current wave have been destroyed.
While my previous attempts at shooters had hard-coded enemy behavior, I decided to do something a little more interesting and expandable with Broken Wings (as I had originally planned for Twin Stick Tower).
Instead of predefined behavior for each enemy object, enemy objects spawn with Skill objects as children. These Skills are essentially event timers that trigger off cooldown and have effects like spawning bullets at their parent’s location.
Thanks to this system, I was able to give the final boss a wide variety of skills that spawn eye beams, AOE circles, enemy adds, etc.