Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Untitled

Untitled

nordwindranger
Journal of Journaling · · 1 min read
1,848 2
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

Discussion

Loading comments...