When I worked at Lionhead on "Black & White", a decade ago this year, my job was to write a scripting engine that allowed the game designers to create the "challenges" for the player.
The designers had already sketched out some challenges in pseudo-code, so I took some familiar Un*x tools (yacc and lex) and formalised the language they'd created, writing a compiler for a stack-based VM, and exposing (with the help of others) a bunch of game functionality via a wide API.
To test all of this, I wrote numerous challenges that exercised different parts of the system. One was "bowling", which constantly monitored game entities arranged as bowling pins to see whether they were airborne, in which case the player would receive a score. It didn't matter how they became airborne, and that was part of the fun; in-game physics engines were still new enough to be a novelty, and, combined with the fact that I used cows as the bowling pins, much fun was to be had attempting to get a strike by flinging boulders to get ten bovines to be simultaneously airborne.
Another test script involved monitoring a particular villager to see whether he was being injured, and to constantly top-up his health to make sure he never died. The script also monitored how he was being injured, and I wrote dialogue to express his general displeasure. You could throw him off a mountaintop and delight at his pained cries of "Oooo, me leg!" as he tumbled down to the bottom.
When the game was released, I was amazed to learn that these test scripts had remained, and are now regarded as easter-eggs. All of the indestructible-dude dialogue I'd written was professionally voice acted as well, which was nice.
I'll make sure that at least one easter egg is snuck into every game RocketHands releases. Just don't tell the other guys!









I remember that little guy...
B+W is one of those games which still inspires me today. I found the simple act of creating a forest by watering the ground very compelling. Strange I know. One day I will make a game about growing a forest on the side of a mountain. :-)
I found a few other cool emergent behaviors, like a quarry type pit which I could fireball, thereby creating a perpetual lava pit, and an endless supply of molten rocks which I could hurl across the landscape. The fire effect kept multiplying until I my framerate dropped below zero, so I think this was a bug, however it was emergent, realistic behavior. It really opened my eyes to the possibilities of a sandbox type game.
When I found that little indestructible guy I couldn't believe the punishment he could take. I tried so hard, but he just stayed alive. Heh.