Vlad
Vlad

Reputation: 2773

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? Or should I also simulate it?

Coz I have seen several games that has bosses where they change dynamically their movement without certain pattern.

Upvotes: 2

Views: 701

Answers (1)

monsieurfh
monsieurfh

Reputation: 316

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.

Upvotes: 1

Related Questions