Not Galaga + Spline Editor
Top-down 2D Galaga-inspired bullet-hell in space with an in-engine spline editor for the creation of enemy movement patterns
Role
Programmer
Technology
Personal Engine (C++)
Team Size
1
Development Time
~2 months (80 hrs)
Contents
Goals
-
To make a spline-editor that can create, edit and, save splines into xml
-
To create a game that will showcase the spline-editor
-
Galaga was chosen as the reference game since it features interesting enemy movement patterns that can be implemented using splines
-
Spline Editor
I used Cubic Hermite curves as the building blocks for my splines. Each spline is a collection of bezier curves and you can control the end points of each individual curve separately. Each bezier curve is stored as a collection of four point
Cubic Hermite Curves vs Cubic Bezier Curves
I initially used cubic bezier curves for my splines because a bezier curve can be represented using four points on a plane which made it easy to store in xml. It also reduced interpolating through the spline into a single algebraic equation.
However, the controls in the editor didn't feel comfortable and easy to use. That's why I switched to hermite curves because modifying hermite curves in a spline-editor feels more intuitive and comfortable.
It's quite easy to switch between cubic hermite and bezier curves so instead of changing the code throughout the game, only the front-end part of the editor was refactored and splines continued to be stored as bezier curves in xml.

Spline creation and modification
Data structures for cubic bezier and hermite curves
XML for saved splines
Data-driven Gameplay
To make an interesting bullet-hell with various bullets, weapons and, enemies, the data-driven approach was chosen because it makes it possible to quickly create, test and iterate on weapons and bullets and find the fun. XML files were chosen to store the data because they are readable and easy to modify.

Blaster Weapon with regular bullets

Shotgun Weapon with regular bullets

Shurikens weapon with explosive bullets

Enemy wave using custom spline path
Retrospectives
What went well
-
I planned and completed a project for the first time from start to finish
-
I was able to achieve my goals of creating a spline editor and a game that utilized the spline editor
-
Data-driven gameplay made it easy to create and iterate on interesting weapons and enemies
What went wrong
-
I was not able to implement all features I had initially planned so many had to be cut for scope
-
My project planning was too rigid that led to a loss in productivity
-
I didn't test my game during the initial phase of development which led to certain game breaking bugs to persist well into the later stages of development
What I learned
-
Play test your game continually. It allows you to find edge cases and helps you iterate on your project
-
Have adjustable plans. This allows you to pivot quickly and reorient yourself during development
-
Divide your work into small milestones instead of aiming to implement an entire feature from the start