• Register
Post news RSS Funny Development Stories

Just wanted to share some amusing development stories. Emergent behaviour is fun!

Posted by on

I’ve had my head down in my code for so long I almost forgot I need to show people all the work I’ve done!

I’m making an indie game called Lord of Dwarves. It’s a dwarf management game in a completely constructible/destructible 3D block world. Gather resources, grow food, & craft hundreds of items. Build a custom castle and defend it against hoards of monster invaders. All with a focus on an easy to use interface.

I started on this game in 2013 and (pause to run my line count program) have created 291,043 lines of code. Thats over 10 million characters (yes I’ve changed keyboards).

One of the most amusing things about creating a program so large is that the game systems start to interact in surprising ways. Back when I added beds to the game I programmed the dwarves to find and sleep on them instead of the ground. I didn’t realize at the time that the animals AI still used some of the dwarf AI code.

I ended up with the situation below.

Deer confused with proper use of bed pillow

Suffice to say my dwarves were waking up with stiff backs while the animals were getting well rested bonuses.

Another time I taught the animal AI to find and eat the dwarves’ crops. The idea is that the player must task their dwarves to surround their farms with a gated fence to protect them from hungry deer. Little did I realize however that the deer still used the same code as monsters for movement, which included the ability to break down doors and gates for siege play.

So I go to test the fence code and watch as a deer casually walks up to the gate and proceeds to tare it down in one kick! He then proceeds to help himself to his fill of crops and then casually walks out over the wooden splinters that remain of the destroyed gate.

“Ye better be bastin’ yerself!”

Unexpected emergent behavior like this is great fun. I’ll leave you with a picture of another deer flexing his (unintended) beer drinking code.



Avatar

Find our more info about Lord of Dwarves at www.lordofdwarves.com

Or follow me on twitter

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

News
Tags
Dev Diary
Browse
News
New
Post news
Share
Related Games