Prey: Animation Tests

In my last post I talked about doing some fiddlying inspired by smart agent behavior. This is the start.

So, what is it doing?

It kind of plays a big game of tag (or hunting, in Crichton's Predator/Prey verbage). It sets one as "it" and puts it somewhere on the screen (randomly). This game of tag sucks: there is only one thing to be tagged and it can't move. The other things (also randomly placed; 200 of them in this setup [much more than that and it gets a bit slow]) all then try to "tag" it. It creates a bunch of agents that all "think" for themselves (in a very limited fashion). They look at where they are and where the "tagee" is. Then they turn to face the tagee and move forward. And they do this 90 times / second. There are 2 limits on this behavior: 1. There is a maximum rate at which they can only turn (these guys are pretty fast: 92 degrees per movement) 2. They turn the wrong way from time to time (these guys are pretty smart, they go the wrong way about 16% of the time - and then they follow that wrong course, on average, for 14 movements)

There are a few other variables I can set and then re-run the "simulation." They can turn at a certain rate. They have a certain speed. They are a certain size. In the above setup I've modeled them after insects: they are small and can turn quickly. You can make them look more like bats or a general swarm (if they get really small). It'll get more interesting as I add more logic to the agents (e.g. "stay a safe distance away from your fellows").

Monday, November 26, 2007, 12:00 AM

tagged: artificialintelligence, animation