This new project is extremely relaxing, I quite enjoy watching sheep graze, grow, and multiply. The basics of a herd simulator are rather simple, I'll outline them here:
- Wander until food is found
- Note food's location
- When hungry, return to food and eat
- Grow in proportion to health and calorie count
- Once mature, if female, become pregnant (I could program some sheep humping, but that would be childish, for now it's magic)
- Have babies
- Rinse and repeat
It's funny how I ascribe meaning to simple little meaningless things. For instance, I programmed the sheep to eat a certain type of grass. The combination of the distance they were instructed to be from the grass and the speed and force of their movement caused them to shove other sheep out of the way in order to eat. I found this hilarious, and spent a few minutes watching them fight over food. Once I had a good laugh, I tripled the minimum eating distance, and the problem was fixed.
The problem with speed development is that I often don't have the time to observe how the game develops in the long-term. This can cause issues, but is easily fixed by setting aside a few hours to just play the game. This also brings up what is often a nightmare in my projects: saving.
Initially saving is not hard, in fact it is very easy. Saving becomes difficult, or more tiresome, when the number of variables you need to save gets out of hand. For instance, in my first dev-log, I mentioned a ship-building module for MLR. That module used arrays of floats to record the position, type, and rotation of blocks, once the arrays were saved, they could be loaded again. Unity would dutifully follow what was essentially a construction manual, placing every block with it's correct type, position, and rotation in a fraction of a second. It may seem as though that system is complex, but really, it was three variables. Just three. Yes, each variable was an array sized at 9,999, but it was still only three variables.
Now, saving in this new game will be slightly less complex. I will need to save approximately four variables: age, gender, health, pregnancy state, pregnancy development. The reason it's less complex is that two of those are bools, and the arrays are going to be at a size smaller than 149, rather than 9,999.
Once I have some actual gameplay, I'll throw a build onto itch.io, and you peeps can check it out. That's all for now, so have a nice day!