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)
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)
It'll get more interesting as I add more logic to the agents (e.g. "stay a safe distance away from your fellows").