Jump to content

is phaser suitable for state machine games?


Recommended Posts


I new in Phaser and I don't know this framework is suitable for my needs or not.Please help me to find this. :)

I make a game that requires a state machine.(Designed game have more than 3000 state and more 20 events like Touch kinds, waits and ... )

for example 

-if current state is x and wait 5 second (no input for 5 second) go state y and show animation y

-if current state is B and slide touch point to right go state y' and show animation y'


(also I want use Intel XDK for port this game to android )


now this is my questions 

1. is this frame work suitable for state machine ? or I must use state machine libs? or myself develop this part ?

2. is phaser timing systems suitable for calculate many many times (for example in each update need calculate 5 kinds of timing (last touch , last state change and ...))? 

3. can I determine kind of touch (mouse event) type for example touch, slid right,Clockwise touch and ...


thanks for your attentions and excuse for my bad English ;)

Link to comment
Share on other sites

  • 2 months later...

I think the answer to all your questions is yes... but there is no built-in implementation of a SM in Phaser. You should check out machina.js; it's a pretty good implementation that can be incorporated into Phaser pretty easily.


EDIT: In fact, here's a nifty implementation that I'm planning on integrating into my game tonight.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...