Heart & Brain: Journey to Self is a point & click adventure game, or hopefully will be at some point. I was originally the only coder on this project, before my involvement was sadly cut short by circumstances beyond my control. I built the "point & click" mechanics from scratch, wrote editor utilities for tracking and modifying the game state and authoring cutscenes, and probably many other things I forget to mention.

Adventure games are uniquely content-driven, and different “rooms” often contain unique assets not repeated elsewhere. At the same time, players expect navigation to be seamless, with no hickups or loading times. It may sound trivial for a 2D game, but it's still surprisingly easy to fumble this when a production is centered around non-repeating assets. I decided to tackle this issue preemptively, and implemented a predictive loading system wherein the game preloads the next possible rooms that the player could visit ahead of time. Put simply, when the player enters a room, all rooms directly reachable from that room get loaded into memory in the background, while the rooms previously loaded but no longer directly reachable are released. This allowed for immediate transitions on older mobile devices, without even slightly stressing their memory budgets.

I also devised a particular workflow to manage the spatial data associated with different rooms. In addition to its assorted graphical elements, each room was also assigned a “data texture”, easily edited in simple graphics software (at the time, I used Paint.NET). The different color channels were used to represent different data layers: the red channel stored the walkability of different areas, with 0 being non-walkable, and different ranges of red indicate different floor materials (dirt, mud, sand) that were then expressed by the appropriate footstep sounds. The green channel was used to express the “depth” of a position in the room, to allow fine control of how characters scale up and down to simulate their varying distance from the player’s point of view. Was this the best approach? Probably not, but it worked.