Predefined AI patterns

956bff9d106b3c4411887b3d32d140c8
0
netwalker 101 May 21, 2007 at 15:45

Hey ALL,

I’m at the stage now were I can start giving my enemy object(s) some “intelligence”. I want to start simple by using pre-defined patterns but I have no idea on were to start. My idea is to have the “pattern” in a pre-defined script that can be loaded and parsed at load time. As simple example say a door guard moves from left to right and then back again. Any ideas?.

Thoughts/Suggestions appreciated.

MAMEman.

4 Replies

Please log in or register to post a reply.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 May 21, 2007 at 22:43

Sounds like you want a finite state machine. They are pretty good for 8-bit style boss AI.

6b7e1a4b42e4b47d92fdef8bf2bd8e2c
0
Jare 101 May 22, 2007 at 15:25

Get it working using C++ (or whatever native language you are using) before bothering with scripts.

9f9df1f665aee874559e067f73ca7879
0
krafty 101 Aug 03, 2007 at 11:17

Well, its a good idea to start using patterns, rather than writing haphazard code.
But scripts are a bad idea, if you are just starting off, its important to know how it works.
As suggested by geon, FSM is the best approach for simple games.
FSM are the basic blocks of any solid AI architecture.

its really simple,
define a set of states, then define output for each state on certain input, it can also be another state
details http://en.wikipedia.org/wiki/Finite_state_machine

and it all works in simple code.

cheers

66cf72d07de447c933f5354fd382b5cc
0
nassimamar 101 Aug 20, 2007 at 18:31

Don’t forget some waypoints… but then again, what type of game are you making?