Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by substandardgaussian

I'm going to need to make relatively extensive use of Finite State Automata, primarily for AI purposes, but also certainly with interpreting player input and keeping track of game states.

I'm currently looking at Machina.js, which would be quite trivial to "Impact-ify", if it even needs to come to that. Considering how useful FSM can be for games, I was a little surprised that a search for an ImpactJS-tailored Finite State Machine plugin yielded no results.

Given that I'm unfamiliar with JS in general, though, does anyone have any suggestions for FSM implementations that gel well with ImpactJS? If your game makes use of FSM, how did you go about it?

9 years ago by drhayes

city41 has a good implementation. You should probably just use this. ( =

Here's my state machine plugin. It's plenty darn verbose and has rough edges to it, so you should probably stick to city41's.

9 years ago by substandardgaussian

city41's implementation is really nice and clean, thanks!

I think I might go with Machina.js in the end anyway. It's significantly more fully-featured, allows event signaling on state transitions, multiple entities can share an FSM, etc: etc: etc:.

I'd definitely just go with city41's otherwise, it's more than perfect for most uses, but I think I could benefit from Machina's larger feature set. I have to support a relatively small number of entities that have a non-trivial amount of state information, and the more work I can offload to someone else's implementation the better.
Page 1 of 1
« first « previous next › last »