Video shows the summary, text shows the technical.
This week:
The Tech
Planning Food Mechanics
The Tech
There was so much tech I couldn't fit it all into the video, but basically for the characters I had to roll out my own solution within Unity. I wanted thousands of characters, rigged, animated, colliding with each other, and each having behaviors that make them feel responsive to the environment.
I looked into Unity ECS but that bottlenecks the CPU too fast. So Instead I looked at offloading all the heavy work to the GPU. There was a technique called VAT which animates every vertex of a model with a texture, but the problem was that it was far too memory intensive and would kneecap the number of polys allowed for my characters. So instead I did big brain thinking and packed bone animation frame transforms into a texture, with great success. I can fit about 2000 frames into a 1MB texture per character which is PLENTY for like 30 animations. This means that all animations fit neatly in the texture and all each instance has to do is play the correct frame within that texture = highly parallel for the GPU.
Everything, with the exception of the flow fields, is done in the GPU; updating animation frames, calculating look at, repulsion physics, etc. So this project will be very heavy with compute shaders. Very fun to work with and BLAZINGLY fast.
I'll talk about the flow fields next week.
Planning Food Mechanics
GPU memory is sacred in this project because the more memory there is, the lower the framerate due to caching. So when I implement food mechanics, I will give every little wolf girl only 4 bits for their hunger meter. Every so often I will increase their meter. Then I will check if it is hungry past a certain level, if so it will play the cute new animations.
As for the chickens, they will also use the GAT system, meaning I can also have 1000s (but probably in-game will have just a few dozen).
The game will of course NOT start you out with a billion children to look after, you'll start with 2, then grow slowly as time goes on (also for tutorial purposes). When you procreate with your partner (uhh wolf mama?), there will be random chances to create twins or triplets or maybe even octuplets. More on this next week.
Stay tuned!