This week starts the beginning of the 'procedurally generated mobs' stage of development! There were also some significant optimizations that were made this week as well.
An ogre. Some more mean than others. Some ogres are known to wield large bones as weapons, and some even throwing giant boulders!
The first step to developing the procedurally generated mobs was to create base models for each one. This week I've made 10 mobs, fully rigged and with walking animations. Here's a list of the first 10 mobs!
A beetle. Beetles have a tough exoskeleton, making them hard to damage. They're also pretty good diggers!
Eventually the system will work like this: When a region is generated, it will also generate the mobs that inhabit that region. The region will pick a 'base mob' and generate different characteristics for it. These procedurally generated characteristics can be anything from how the mob looks, behaves, it's name, stats, and drops.
A pig. Pigs are usually friendly mobs. They're known to drop different types of leathers and meat.
Also just a disclaimer, the mobs are still a work in progress. Another thing that I worked on this week were eye textures for each one and a blink animation. The colors/patterns for the mobs at the moment are just placeholders, those will be procedurally generated.
This week there were some pretty significant performance improvements that were made that I've kind of put on the backlog for a while now. Pretty soon I'll be showing some actual gameplay, so having everything running smoothly is important.
There were a couple graphical optimizations that were made this week. One of which was consolidating some of the materials that were used for the terrain. This resulted in about a 25% reduction in draw calls.
There were also some shader optimizations that were done.
Terrain Generation Optimizations
The most substantial performance improvements came from optimizing terrain generation. First I cut almost all noise octaves in half, resulting in much faster terrain generation times. This also causes the terrain to be smoother, which I honestly think looks better. So win-win!
The second optimization I worked on this week was developing a noise sampling technique for height calculations. Previously each block will calculate the height for each noise value of each nearby region. This would sometimes result in every block in a chunk calculating noise values 30-40 times!
To fix this issue I made chunks sample a few blocks for every noise layer. Whichever layers yielded the highest height values will be the ones that every block in the chunk will calculate. Now chunks use only about 1-5 noise layers.
Next Week Preview
Next week I'll be finishing up some of the optimizations that I started this week. I'll also continue working on the new mobs. Hopefully by the end of next week the mobs will be spawning in the world and moving around.
Also, it's been a little while since I posted a Sunday blog post. Those blog posts will become a little bit more infrequent moving forward. Eventually I would like to replace those blog posts with a YouTube video that better showcases the features and concepts of the game.
I'll be providing more information and videos/screenshots of these new mobs soon! See you nex