AI programming in ActionScript3
I am making a shooter game. So I managed to create simulated AI to some of my objects on stage i.e I move them whit script.
But now I have the Boss which usually have several types of movements and shoots different types of missiles.
Which type of AI should I use? 开发者_StackOverflow中文版Or should I also simulate it?
Coz I have seen several games that has bosses where they change dynamically their movement without certain pattern.
Use a state-driven agent. The Boss (the "agent") have several states, describing various types of movements or types of shoots. According to the context, the agent switch from one state to another.
You will find clear examples in the book Programming game AI by example.
You are lucky, the chapter dedicated to state-driven agents is available online here. Code examples are in C++, but it's extremely basic.
精彩评论