Creature Craft AI part 1

This is my first blog to support the kickstarter for Creature Craft. http://www.kickstarter.com/projects/oatycakes/creature-craft

I want to talk about AI. Everyone, me included, bitches about AI in games. When a squad mate commits some pointless suicidal act our first shout is “Stupid AI!” And rightfully so, but our conversation about AI needs to go much deeper than why are your team mates always so stupid. The real question is for an AI to not be stupid, what does it need to know?

Let’s stick with the suicidal squad mate. So, lets say he stands up in the middle of a fire fight and gets his stupid computer head blown off. Why does this happen? And more importantly, why would a human not do it? In virtually every context of a malfunctioning AI it is that the computer lacks context for its decisions. It simply doesn’t know that it needs to keep ducking. The programmer may have decided that if bullets weren’t flying close to your squad mate for a little while that he could stand up and advance on the enemy. The reasons that situations like this arise is that no programer or design team can ever fully anticipate the situations involved in a game. There is a limit beyond which the AI will fail. Our goal as programmers is to put that failure point as far out there as possible, so that hopefully, an average player will never encounter it.

When you are designing an AI there is another component and that is equally important. That is situational intelligence. Going back to your squad mate again. If he has been setup in-game as inexperienced and brash then you would expect a much lower level of competency from him. On the other hand, if he is supposed to be a Navy SEAL and he pulls a stupid trick like that then you will be aggravated and any realism the game was shooting for will be thrown out the window, right alongside the controller.

Now, finally, I come around to Creature-Craft. AI for animals has the same issues as for humans. Different types of animals behave very differently in situations. A lion and a rabbit will behave entirely differently when encountering the same situation. It certainly would not do for a pack of lions to flee from a lone wolf the way a pack of rabbits would. Furthermore, in general, as size increases so does intelligence (This is for animals not people!). Even within a species this tends to be true. Look at alligators and compare how easily caught a small specimen is compared to a large one. There are a thousand issues to contend with in making animals behave correctly. Sound impossible?

Well, there’s a reason why a doctor has to study 16 years to treat humans and a vet has to study the same amount to treat all the other animals in the world. Humans are vastly complex and individual. Animals are exponentially less so. Think of it this way. If we were to need a dog and a cat in a game would we need to write two entirely different AI routines? No, of course not. Most of their behaviors are identical. Meat eaters, sleep a lot, four legged, affinity for humans. The differences are almost entirely in the level to which they exhibit certain behaviors. So, a cat is much more driven to hunt small animals. A dog is more likely to want to be beside a human during activity. A cat sleeps more. And so on and so forth. Animal behavior can successfully be modulated by a simple percentage change. At that point the only complicating factor is to determine how that characteristic exhibits itself.

 

Okay, now we are in the nitty gritty stuff. How does an animal that has a 50% herding, 75% hiding, 10% size, and 15% bravery behave?

Well, in my world, herding indicates two things, the first is that the higher the herding percentage is, the less space any given quantity of that animal will take. So, a 100% herding animal would have the entire herd tend to occupy as little space as possible. Making them stand shoulder to shoulder. The other aspect is that a herd will protect it’s members.

Next is the hiding rating. That decides how often the animal will leave concealment. A Great White Shark would rate 0 on that scale and a catfish would rate ~90%. This creature really likes to hide but will come out to move around and to forage.

Size should be pretty self explanatory. It tells us what it can eat and what can eat it.

Finally, this animal has a very low bravery. If it sees a predator it is going to bolt. This braveness rating will counteract the herding protective aspects since the animals are too afraid to ever come and help.

So, in the end we have an animal that is roughly, a rabbit!

That’s the basics of Creature Craft’s AI. Tomorrow I will get in to greater depth about the AI and talk about how it works with everything in the game to inform the actions of the creatures!

Word Slots

I’m back! Too many projects too much drama! Anyways! Today I’m announcing Word Slots! The greatest work of genius ever to have existed! Ok, maybe that’s a little bit of hyperbole. Anyway, Word Slots is a slot machine themed word game that is designed to be freakin’ nuts. It does thing no word game has ever done. First off, the word find is unlimited. Use any letter any number of times. Believe me, it makes it crazier and lets you find some seriously long words! Next, you can actually win! Each spin of the machine has a goal. You just need to find the number of words that you specify. Which makes the game as hard (or easy) as you like. Next, you have 70 missions to finish. Giving you tough objectives for the chance to win money and Gamecenter points! Oh, yeah, you get to win money! Each spin you bet money that you can find the number of words you said you could. It lets anyone play the game and have fun! Finally, there are 5 funky casino goers to level up and bling out. As you win more the characters start to get serious amounts of bling and start to attract a crowd of onlookers. They also hoard a (literal) mountain of money. It’s gonna be awesome!

 

But when is this game coming out? Assuming nothing goes wrong, one month from today!

Lane’s Daily Dev Log 8/16/11

Ok, so I missed a few daily updates. We are waiting on Apple for our dev license but in the mean time work continues. Leah is hard at work on the world map for Pixel-Mon which will inform a lot of the dialog and design. Once she is done the scripting stage will start.

Alien Taxi should be done fairly soon. There are a couple of extraneous things I want to do for it. Namely, a distortion filter to make it look like it is being viewed on a CRT television. In a perfect world I would have a distortion filter to make the pixels fuzzy and more retro. Then some kind of stretch filter for the edges to make it look like it’s on an old style TV. Those features are completely optional. Today I am finishing up the menu graphics. I’ll try to get those working some time tonight and then I’ll be ready to work on Game Center integration.

Lane’s Daily Dev Log 8/3/11

Sent out the mockups and descriptions. on the unnamed, constantly changing iPad app! Our client looked at them said they looked great and matched the specs perfectly. Then came up with a completely new set of “specs.” These mainly consisted of a bizarre set of meta ideas. I think he must have had a blue sky session with someone and decided to implement those big ideas with no details. Ugh.

Lane’s Daily Dev Log 8/2/11

Almost done with the iPad mockup and then BAM spec change. ARGH! Oh well, version 1 is going to be as previously specked. Maybe with some re-branding. We also have talk about going multi-platform. iOS, Android, OS-X, Windows, web! I’m going to need to give these people a dose of reality.

Lane’s Daily Dev Log 8/1/11

Day one,

Ok, so it’s only day 1 of the blog. Project development has been proceeding before this. So, I’ll use this an an introduction and help me get my head together. I’m Lane, project head and lead coder. In the next two years we have an extensive set of releases planned. We will be heading things off with “Alien Taxi” an Atari styled side scrolling action game. Next is an untitled iPad app for a partner company (assuming funding comes through!). Third is a combination time management, dual stick shooter, platformer, puzzle, hidden object, adventure game with the working title “Thunder in Paradise.” Fourth and last is a creature collecting RPG called “Pixel-Mon.”

Alien Taxi is about 25% complete in terms of design and code. Level design will be the most time consuming part. But the basics are done.

The iPad app is about 50% of the way to having complete mockups.

Thunder in Paradise is at the conceptual stage.

Pixel-Mon is in initial design and scripting .

My priority for today is completing the iPad mockup.