game-health.exe

>_ articles / game-health

Mental health
prevention game

Unity · C# · 2D Platformer · Polimi

[ 00 ]

Preliminary notes

The source code was lost. I managed to partially recover it, some features are no longer functional. The version presented here reflects the current state of the recovered project.

[ 01 ]

The game

I developed a 2D platformer in Unity as part of a mental health awareness project.

The original concept revolved around health bars representing different psychological parameters : stress, anxiety, etc. These bars are intentionally unlabeled: only their colors identify them, inviting players to interpret what they represent. If one empties, the character dies. To maintain them, the player learns by interacting with the environment: talking to an NPC refills the orange bar (anxiety), staying still near a fire regenerates the green bar (stress). I had also planned progressive debuffs before death: field of vision shrinking, hallucinations, altered gameplay depending on which bar was depleted.

The game was later taken over as a group project. We reconfigured the dynamics: the main character is now accompanied by a cat, whose size and color reflect the player's anxiety state. The version presented here is entirely my own design , I had started development with a snake sprite, my teammates then taking over to introduce the cat.

[ 02 ]

Architecture

Faced with growing complexity, I adopted a paper-first approach , modeling, diagrams, structured thinking, before touching the code. This allowed me to design a decoupled event system (triggers / listeners), flexible and reusable, capable of handling interactions between the different game mechanics without creating rigid dependencies between components.

[ 03 ]

Limits & next steps

The snake's follow behavior remains rudimentary: it can follow the character on simple paths but fails when the topology gets complex. I had started implementing a pathfinding AI system, but the task turned out to be more time-consuming than expected. I temporarily worked around it with automatic teleportation when the distance between both entities exceeds a threshold, which makes the game perfectly playable as-is.

The movement AI remains an open task, identified as the next major evolution of the project.