Download

NPC - New Purgatory City - BLOG - AI Infection Simulator

Heya Folks,

A while ago I spend a lot of time trying to understand blackboard mechanics.
But I feel like I forgot it all already, so I started pondering about what I could do to keep all this information locked up and ready to go in that big grey mass I call my brain.
So I figured, why not create a blog I can revisit to keep track of things I have done and have yet to do.

NPC
“New Purgatory City” is the name I gave my little project.
I intend to make a small city filled with humanity at it’s “finest”. Just your regular city sim where you watch people go about doing their thing.
To spice it all up. I’m gonne introduce zombies and vampires. Each with their own infection and fatality rates.
And once my little town goes to hell I might even add some demon slaying priests.
Maybe I’ll even make it playable…

Day 1
Today I intend to block out a little box, make a material instance for “Manny Quin” and have my npc’s run about.

Day 2

Today I just went ahead and pulled of some random stuff.
I set out to bring my experimentations to life a bit more.

So I went ahead and googled myself a female mannequin, dubbed em “Manny and Maddy Quin”, and added Maddy to my spawning gate. Did I mention I used a 400x300 door to spawn in Quins? Well I did now…
After some slight fixes to my random move AI and my spawn gate, I was able to spawn in any number of characters I desire, although gender. age and race are still very much random.
Since the game is all about people turning into undead monsters I decided to create a way to infect humans.

The GhoulWell is born, a mesh resembling an old fashioned well made out of BSP brushes. I gave it the ability to spawn in ghouls on game start just to check if the colours would be consistent, they weren’t so I had to fix that.
But after successfully spawning in a ghoul I felt like they moved to fast. So I created some movement modifiers based on gender and race, ghouls now walk as slow as snails.
Since this all needs to be fully automated I created a hunger system. Moving decreases hunger, and once we hit a certain threshold the behaviour tree switches over to a new AIState I made, Hungry.
It then searches for all GhoulWells and has the humans run up to them to drink, maxing hunger in the process. Drinking however has a 5% chance of turning ordinary people into ghouls.

I have been running a simulation for about an hour now, no ghouls yet.

EDIT

Ran a new simulation after this, a ghoul was born 2 minutes in :cool: