Adventure Game Studio

Community => Adventure Related Talk & Chat => Topic started by: Stefan Z on Mon 17/04/2006 23:58:50

Title: anyone ever used finite state machine?
Post by: Stefan Z on Mon 17/04/2006 23:58:50
Hey,

I was thinking about doing a detective story where there are 7 characters you can talk to and most of the game depends on how you talk to people - whether you're nice, abusive etc. Kinda like Laura Bow - Colonel's Bequest.

After looking into the Finite State Machine module my first response was 'This module seems nonsense - I can do everything this module does by using variables'.
Not being a real programmer, i wonder if I overlooked something really helpfull about this module.

So my question is this: has anyone used this? Why? And what did you use it for?

Thanks in advance for any experiences shared,
Stefan
Title: Re: anyone ever used finite state machine?
Post by: HeirOfNorton on Tue 18/04/2006 03:14:22
Having coded the module (well, copied it from the old plugin, anyway), I feel I can answer this...

The main use of an FSM is to help map out complex series of states and transitions in a way that is easy to understand and code. In particular, you do not need to know the current state to change it. You can just send the FSM a signal (like BE MEAN) and it will change the state accordingly. If you only have a couple of different states, or if all of the actions always have the same response, then a FSM is probably overkill.

HoN

P.S. To the best of my knowledge, no has ever used the module or the plugin it was based on, not even me.
Title: Re: anyone ever used finite state machine?
Post by: The Inquisitive Stranger on Tue 18/04/2006 05:10:49
Er... I learned about finite state machines in one of my first-year computer science classes about two years ago. That's about it.
Title: Re: anyone ever used finite state machine?
Post by: ildu on Tue 18/04/2006 07:34:15
I used FSMs in modding during my four-year tenure at the Max Payne modding community. Other than that, I'm lost.
Title: Re: anyone ever used finite state machine?
Post by: Helm on Tue 18/04/2006 08:01:10
I think the Flying Spaghetti Monster is cute