Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

On the Evolution of the brain.. the Gnomes brain.

Before I started to work as programmer I studied paleontology. No joke here.. I was one of those guys who are said to use a toothbrush in the desert to scoop up some old bones.. yet in my case it was a large motorized saw with a blade to cut into stone and mostly very very old trees. 
Anyway.. evolution is still one of my favorite topcs and sometimes a game can be closer to live than you'd expect. 

In this case we can talk about a gnomes brain. 

The proto Gnome, barely "alive" enough to have a single need: hunger has to do nothing more than Eat, find food, sleep and maybe dig into rocks....
Therefore the "Brain" looks quite simple:


As you can see the Protognome has only a very limited set of rules working a single job on demand and otherwise either idle, eat or sleep. A perfect member of society ;) 

A few months later, lets say in the "Hunter & Gatherer" phase of my Gnomes evolution their brain has heavily developed: 

Instead of just fighting for survival we now have several jobs and no longer "rules" but priorities. Survival always has a higher priority than finishing work (yeah.. no longer the perfect member of society..) but if possible work has to be finished first anyway.  Job scheduling is handled outside the brain through the player that can assign certain priorities based on a Gnomes profession:



This way the player can somewhat control the way jobs are handled without meddling with the brain of each gnome seperately. 

Keen eyes may have spotted that, also, i no longer update the brain on each tick but 60x a second. This is a performance imporvement and also allows the scene to fully "settle" before another choice is made. 


Now in the medieval stage where i currently work with them only minor changes came up:



There is the minor refinement of adding a "distance penalty" to jobs. If jobs have the same priority (see, for example the All-Rounder) the closest job is what a Gnome will take. This prevents, for example, hauling jobs that happen dozens of tiles away while mining on the next Tile is marked as a job. And the major change is the "interrupt" system allowing me to "interrupt" whatever a gnome is doing each "brain tick". A sleeping gnome, without interrupts, might be eaten by a wolf or a crafting Gnome wouldnt notice that he is starving to death.. so interrupts are important to keep things somewhat sane.

Well.. let us see where evolution leads the little Gnomes next.