Previously, in Dev Log #0:

My goal is to keep posting dev logs documenting this journey, hopefully at least once per month

Life happened and it is now, in fact, August, so I’m slightly behind on my “monthly blog post” goal. Despite that, progress has been made and I wanted to share some of it, including the first GIF of Project Croaker (development title), a game dev simulator:

In the words of the WarCraft 3 peons - work, work!

Riveting.

Most of my time has been focused on the character simulation, in addition to a bunch of work on the backend.

Characters have different needs - such as socializing, using the bathroom, doing work (yes, working is a need) etc. which are generally represented as a [0, 1] value. The more time that passes, the higher this value gets. Fulfilling the need will decrease the value towards 0, after which it will begin increasing again.

The rate of change for needs is tied to character attributes and modifiers. As an example, a character affected by food poisoning will have their restroom need increase at a much higher rate compared to a default character. Internally, this is managed by attaching a “food poisoning” modifier to the character, either by the character system or one of the game’s other systems. Modifiers can be positive or negative, time-limited or permanent, as well as a variety of other properties. Most importantly though, they’re one of the main ways in which the character simulation ties into the other game systems.

In general, each character will have multiple needs that are competing for attention at any one time. In order to choose which need should be fulfilled next, the character uses a specific “urgency curve” for every type of need (which can also be impacted by the character’s attributes and modifiers). Going back to the restroom example, the need to use the restroom slowly increases over time, but the urgency of using the restroom is initially low until the need gets high, at which point the urgency becomes very high:

The urgency curve for using the bathroom. Low urgency for most values of “need”, but spikes to very high urgency towards high values of “need”

When the need to use the bathroom is medium or low, the character can focus on other things. Once the need becomes high though it will become the main priority of the character. Tweaking the minimum and maximum values of the urgency graph (not every urgency graph needs to output between 0 and 1) controls the relative priorities of various needs at their highest urgency (for example: using the restroom at its maximum urgency will trump needing to have lunch at its maximum urgency because the restroom curve can output 1, while the lunch curve can only output 0.9 as its maximum).

While some of this new simulation only happens in the backend for now (until more systems and features are built), some of it is already visible: characters will come into the office during the day, do work, use the bathroom when needed and head back home at night. Very satisfying to watch, though it did involve adding a fast forward mode while everyone is at home and nothing is happening on the project.

Finally having the characters moving around on the screen for the first time has been very rewarding (especially after all of the backend work that needed to happen first), especially when they would use each other’s desk as a toilet because of a short-lived (but hilarious) bug.