Fundamental

    In 2023 I finally had time to participate in the GGJ (Global Game Jam), the goal of which is to make a game in a certain theme in about 48 hours. I had wanted to get more comfortable in Unity and learn a basic level of game development for a while, and being given a 2 day deadline to finish something fits nicely with how I motivate myself to get things done. The resulting game was Fundamental, which can be played here. The git repository is here.

Development

    The theme for the jam was "roots". I decided to make a piece of software where you could create a tree-like structure of partials, all stemming from a "root" note (In computer science terms, this is just a tree. The root note is the root, and a partial is just some non-root node in that tree). I was inspired by a visualization I saw of an FFT which showed partials as orbiting each other, not as lines on a graph. I had the idea to take that visualization and translated it into 3 dimensions, so higher partials would be higher in space. This would make something that looks somewhat like an upside down tree.

    The initial MVP would have partials that could be added or removed. The sound of each partial is a single sample, which would be pitched up to match the pitch of that partial. The visual component of each partials would move counter-clockwise around a circle with its parent at the center, triggering the sample when the angle of rotation is 0 radians relative to the parent. Finally, the camera would hover over the "current" partial (so the most recently made, or the parent of the last deleted partial).

    Whilst I fairly quickly came up with the rest of the features that were in the final version, I disciplined myself to always do the bare minimum and focus on one feature at a time. I thought than even an MVP could give me some interactive thing that I would enjoy. Most of the code would just be adding and removing items from a tree- a common programming task- meaning that it should be easy to implement in any tool I would choose to work with. This also meant I didn't have to worry about the impact new features would have on the overall system, as modifying a tree is well-understood. In the end, I was able to implement everything I wanted to with time to spare.

Unity

    Originally I had wanted to use a game engine written in Rust, as that's the language I'm the most productive in. However, I ended up going with Unity for the jam, based only on the fact that every Rust-based game engine I wanted to use didn't have a visual editor. There are other good reasons to choose Unity- it has a large community, extensive api documentation, and a very large feature set. While I don't find it to be particularly enjoyable to use, there's no denying that Unity is a powerful tool, and the editor lets you quickly create objects you can refer to from code (or vice versa). The downsides of using Unity for me in particular were that my lack of experience in C# meant I had to spend a relatively large amount of time reading documentation for simple tasks. It was also hard for me to conceptualize C#'s memory management and garbage collection, leading to several hard to fix pointer bugs that would have been easy to debug crashes in something like C or C++. If I had planned more, I might have realized that I would only be using two simple assets and so I wouldn't need an editor, allowing me to use a simpler tool in a language I was comfortable with. Nevertheless, I think it was the right choice as it let me not have to worry about my tech stack during the jam, and in the end I was able to finish comfortably before the deadline.
A screenshot of Fundamental as it was at the end of the game jam.

Revisions

    I was happy with how Fundamental turned out, so after the jam I decided to spend a bit more time to give it some polish. The main things were to switch to Unity's 2d engine, improve the visuals and add ui buttons so that Fundamental could be played on mobile devices (or without a keyboard). I switched to the 2d engine because during development I had found that making the tree 3 dimensional was also making it very hard to view with the game camera- therefore I had redone the node positioning to only uses two dimensions. A nice side effect of the switch was that it made the size of the game binary 90% smaller, which makes it have acceptable loading times when played in a browser.
-signal_Processor~