Fableforge Weekly Update #7

This week features procedurally generated mob appearances, a new mob spawn system, and mob AI.

Procedurally Generated Mob Appearances

Mob Spawn System

Mob AI

A procedurally generated pig wanders through the grass.

Procedurally Generated Mob Appearances

Mob appearances are now procedurally generated.

For pigs, the following characteristics are randomized:

- Body size

- Head size

- Tail size

- Leg size

- Snout size

- Ear size

- Eye size

- Color pattern

- Primary color

- Secondary color

- Eye color

There are 11,520 possible combinations of color pattern, primary & secondary colors, & eye colors for this mob (currently). This doesn't include body, legs, tail, eyes, ears, snout sizes & proportions (which would put the number of possible combinations in the millions). Procedurally generating the mobs allows each region to be truly unique and encourages exploration. Those two reasons are important for an endlessly procedurally generated world.

Procedurally generated pigs.

I believe the possible combinations of the appearance of a mob not only ensures diversity between regions in a world, but between worlds.

For now, the bulk of the procedurally generated mob system is complete. Other than the stats of a mob, the name, and what the mob drops, the only thing left would be to migrate this system server-side.

Our pigs have come a long way so far, but so have the other mobs! I will be showing the other procedurally generated mobs soon.

Mob Spawn System

A spawn system has been completed this week.

The spawn system works by checking for suitable spots around the player and chooses a mob from the region and spawns it. Some mobs will spawn individually, but other mobs like pigs, may spawn in groups.

Eventually there will be certain rules for spawning each mob. Some mobs would only spawn in certain regions, heights, times of day, in the air or water, or in caves.

Spawn rarity is another feature I'll implement into the spawn system. Some procedurally generated mobs may be at a much higher tier than the mobs around it that it will be necessary to make those types of mobs more rare. It won't just be for balance reasons, some regions may just like to spawn certain mobs more than others. Diversity in spawn rates will add a little extra depth to each region.

Mob AI

A group of pigs travelling through a grassland region.

Some work has begun on creating AI for the mobs. I already had a small foundation for a mob AI system that I developed a while back, but I decided to just completely rewrite it.

Mobs now have different states that they can be in. These are idle, chase, retreat, & attack. There are almost no logic for the last three states at the moment, but mobs in the idle state right now can wander around and look for targets.

There's much more to be done with mob AI. Eventually each world will host a variety of many different mobs, so having many different types of AI behaviors is essential. But for now, we have the groundwork for AI done and will start building from here.

Next Week Preview

There's more work to be done with the features that have been introduced this week. Next week I'll be further refining the procedurally generated mobs, adding to the Mob AI system, and eventually move these systems to work server-side.

I hope to show you guys more procedurally generated mobs, and some in-game content of how the mobs behave! I've also been thinking about having a procedurally generated mob of the day showcase, let me know if you'd guys like to see that! There's more to come, see you next week.