Untitled

Published April 09, 2009
Advertisement
Recently I've had a fair amount of down-time away from home, so I've begun to work on some 2d projects on my netbook

pigsim2
PigSim2 is the first XNA 2d project that I've worked on. The original idea for the project was to create a simplistic guinea pig AI that was able to exhibit some emergent behaviors. My guinea pig AI currently has four states: "think", "eat", "sleep", and "move".

"think" decides whether the pig would rather sleep or eat, based on a preference for eating, and how long its been since the pig did either activity. If there is nothing to eat, and the pig doesn't want to sleep it will move to a random location.

"eat" and "sleep" determine if the pig's current location is proper for the current activity. If it is it kicks off a timer and the correct animation. If not it "moves" to a better location.

"move" moves to a location. Once the location is reached, "think" is kicked off again.

All in all this is a pretty simple system, but it makes for a fairly interesting and logical simulation. The next step would be to assign weights to various foods and shelters, so the guinea pig can display a preference for certain objects.

pigsim2
Zoompig (star of pigsim2). I miss the little guy. guinea pigs are some of the friendliest creatures I have ever met.


I haven't abandoned my main project either, I'll talk about that next time
0 likes 2 comments

Comments

Gaiiden
my sisters and I had several guinea pigs throughout our youth. Adorable little critters. Loved em all.
April 10, 2009 09:49 PM
Moe
Your post here got me thinking about emergent behavior. I haven't really done any sort of AI programming, but I did come up with this.
May 22, 2009 05:39 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement