Moving to 3d
December 2023
Since ponds can now be shaped, it was time to move to 3d and put koi in the ponds. Both pond models and koi models have to be created. Since all models are procedural and generating models can get pretty slow, I moved modelling code to a separate thread. The main thread receives the models when they are ready to prevent any freezes.
Modelling ponds was pretty straightforward, any pond polygon models a shore that goes inwards towards the maximum pond depth, and any island polygon models a shore that goes from that depth to ground level again. The pond shores can be improved, but they will do for now.

The koi models will end up being the most complicated models in the game. The placeholders in the video are just for testing animations. I've implemented a skeletal animation system for koi that takes any number of bones (some koi may have more or less fins, short koi need fewer bones), and the skeletons scale with age.
Finally, the koi need to know how to navigate the pond they're in. To do this, I've implemented a signed distance field for every pond, which stores the distance and direction to the shore on a grid. Any islands inside a pond are taken into account, since they are also impassable. The koi in the video simply bounce off the walls of the pond for now. Since there is no lighting model yet, every triangle gets a random color, which helps me debug the shapes early.
