A tiny distraction
October 2025

During October, I was supposed to implement ground texturing and more advanced grass rendering, but I was distracted by my daughter who arrived a few weeks earlier than expected. I'm getting used to sleeping in an entirely different way, and I may have to start drinking coffee again.
I did manage to implement some important but invisible things. The systems that model terrain and grass on a separate thread had some unimplemented optimization opportunities, and since I'm generating grass assets, it became clear they had to be implemented for the game to run smoothly.
- The grass modelling thread no longer updates grass after every digging operation, because the queue of updates became very long and started to lag behind digging operations if they took too long. Instead, I now update grass as fast as possible while skipping intermediate updates if newer updates are available. Digging feels much more responsive now. This logic was implemented in the multithreading system, I'll probably be able to use it later for other things.
- Since not all digging operations in a certain area affect grass coverage, I skip grass modelling updates early to prevent duplicate work.
- Grass and other ground coverage is randomly distributed according to a Poisson disk distribution. I've written about this method in a blog post relating to Koi Farm 1. These distributions are pre-calculated when the game boots up; I've made a collection of reusable distributions that will be used in other procedural generation tasks.