Plat form based ai
August 06, 2002 11:01 PM
finite state machine,
make each of those behaviours a state,
add another state called WAITING, and don''t let it stop waiting unless the person gets close enough
make each of those behaviours a state,
add another state called WAITING, and don''t let it stop waiting unless the person gets close enough
Just to build a bit on the last post...
Basically, for each state in the FSM you need to code some sort of behaviour for each bird. This used to be called a ''wave'' (probably coming from games like Galaxian etc.), but essentially can be any sort of behaviour.
In the WAITING state they may just bob up and down or move in small circles. Once you cam within a certain radius (as an example) the birds move to the ATTACK state. This states behaviour may be a swoop-type movement maybe darting towards the player. The birds behaviour may even depend on other nearby birds.
So the whole (relatively complex) behaviour of each bird can be broken down into a set of simpler behaviors and a finite state machine.
Basically, for each state in the FSM you need to code some sort of behaviour for each bird. This used to be called a ''wave'' (probably coming from games like Galaxian etc.), but essentially can be any sort of behaviour.
In the WAITING state they may just bob up and down or move in small circles. Once you cam within a certain radius (as an example) the birds move to the ATTACK state. This states behaviour may be a swoop-type movement maybe darting towards the player. The birds behaviour may even depend on other nearby birds.
So the whole (relatively complex) behaviour of each bird can be broken down into a set of simpler behaviors and a finite state machine.
<a href="http://www.purplenose.com>purplenose.com
Ooh, now there''s a great application for a flocking behaviour!!!
Timkin
Timkin
August 07, 2002 08:37 PM
Don''t forget to place phone booths periodically as safe havens from the ravens.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement