​Dev Diary - GMTK Game Jam 2020


This last weekend, I decided to join in the Game Maker's Toolkit Game Jam on a whim.  I had seen previous jam entries before, and the jam had primary caught my interest due to how fast it has grown in popularity.  I actually didn't know it was happening until after the theme, “Out Of Control” was announced.  With everything being locked down, I figured it was a good opportunity to try and keep my skills sharp and expand on them where I can. 

There were several things I wanted to avoid when it came to the jam.  While the theme was “Out Of Control”, I didn't want the player to feel out of control of their own actions.  While sometimes fun, I didn't feel as though I could create an RNG mechanic that players would enjoy within the time frame required, especially since I had decided to tackle the jam on my own in order to challenge myself.  I contemplated the idea of creating a card game peripheral app, applying randomized rules to classic card games, but decided it would be too easy, and not in the spirit of the jam.

Instead, I went with going a more familiar route for myself and go with starship mechanics, as my previous work with Global Game Jam would mean that I already had some scripting and particle effects already solved, and a simple aesthetic I could match, even though I was creating new assets.  Knowing how game typically put you in the position of flying the ship, I chose to limit the player's control to a single turret, like the guns on the Millennium Falcon.  Thus, the player could control their own actions, but could not dictate the path or position of the ship.  I envisioned the game as a massive space battle between two warring fractions, with dozens of ships flying around each other while the player tried to do their part to keep their own ship alive, unable to do more than point and shoot.

The first problem that I had to overcome was the idea of the 3D space.  I didn't want entirely randomized vectors for multiple reasons.  I didn't want to make the game too chaotic.  Ship paths needed to be at least somewhat predictable, in order to provide a chance at winning the game.  They also needed to be able to avoid collision, and I needed to keep that as simple as possible.  That meant building a 3D pathfinding grid.

While I have made my own pathfinding grids before, in the past they have been 2-dimensional and single in their direction.  This time I needed it to be more omnidirectional.  Ships need to be able to randomly choose their direction every time they reached an intersection.  While I was prepared to set up the entire grid manually, it was a daunting task.  As I built it, I recognized small ways I was able to accelerate and automate the construction of the grid, mostly by recognizing that by having fixed grid coordinates, that I could simply search that position for for another node.  I used nodes so that they could store information, such as what nodes were connected, and whether or not they already had another ship traveling towards them, so that ships wouldn't collide.  Once my grid was finished, I began solving the automated ship movement using cubes, figuring out how to ensure that ships would follow the set paths I had created, without getting stuck or breaking off.  Once I had multiple placeholder cubes running correctly, I moved on to the next step.

The first ship I set up was the player ship.  I set the player as a rear-facing turret to help emphasize that they don't have control over the whole ship, as well as give them a chance at getting a good view of the entire battlefield from the start of the game.  The biggest challenge there was locking the player's rotation to the local transformation component.  This problem would rear its head again on the very next step when I started dealing with the automated turrets, and I had to get help from the Discord chat to resolve it (thanks again, Joy!).  The relationship between Quaternions and Euler Angles still confuses me.

I set up the automated turrets to always target the nearest opposing ship as best as possible.  Once I had them figured out, I only had to replicate the prefrab in Unity and use tags and colors to change whether they were allied with the player or not. 

By that point, the jam was nearing it's end for submissions, so I had to choose between polishing up what I had and submitting a complete project, or continuing to push more content into the game.  Among the things I didn't get to, there was also the fact that attempting to add as many ships as I wanted would cause the game to crash, even after publication.  I believe this is primarily due to how unoptimized my scripts are, as there are a lot of vector calculations occurring every frame.  Because of this, I wasn't able to make the battle as large and full of ships as I wanted.  That's something I intend to correct in future projects.

In the end, the GMTK Game Jam 2020 was a fun experience, even with my impulsive decision to join it.  I will definitely be joining again next year if my schedule permits. 

Download Game Here: https://abnielsen.itch.io/starship-gunner 

Check out more GMTK Game Jam 2020 Games: https://itch.io/jam/gmtk-2020/entries 

Files

Starship Gunner.zip 21 MB
Jul 12, 2020

Get Starship Gunner

Leave a comment

Log in with itch.io to leave a comment.