Hadron

I recently took part in the Brackeys Game Jam 2021.1 which was all based around the theme “stronger together”. You can check my submission on itch.io here! (or go to Projects)

The resulting game, Hadron, made in Unity 2021 and programmed in C#, was clearly inspired by my course. It involves playing as the eponymous hadron composed of three quarks which act as your ammo to fight oncoming particles, your health and your ability to move around the level.

The arcade-like visuals are a combination of simple pixel art made in Aesprite and a post processing volume which liberally applies bloom, lens distortion and chromatic aberration – all in an effort to make your screen feel like a CRT monitor.

The positions of the quarks on both the player and the enemies were created using a custom dynamic quark tool I created. It takes the number of quark GameObjects you wish the given particle to have, then uses some simple trigonometry to space the given objects evenly around a unit circle which is then scaled to a desired radius. With this tool in place, I can dynamically remove and add quarks from the hadron’s. This then allowed for the quarks-as-health mechanic along with the enemies being able to pick up their remove quarks if the player doesn’t deal with them quick enough!

Speaking of the enemies, the larger hadron enemies have a simple following custom following AI which moves towards the player at a given speed. However the smaller isolated quarks have a custom finite state machine AI. This consisted of a waiting and a dashing state, while waiting the enemy has it’s speed reduced to zero and is tracking the position of the player. Once it has waited for a sufficient time, it enters the dashing state where its speed is linearly interpolated between zero and a maximum speed over time. It moves towards the last position the player was in while it was waiting and once at this position it returns to the waiting state and continues like this. I found this to be a sufficient difference from the larger enemies as it doesn’t constantly hound the player put instead adds more careful decision making on the part of the player.

The results are released tomorrow so we will see how the people felt about it.

Leave a comment