Jump to content

Another Newbie: game states for simple games?


Maria
 Share

Recommended Posts

Hi everybody!

 

I have been reading about the game states in phaser. Since my first project is going to be a collection of minigames which are really simple (click on that 5 times etc) I wonder, does it makes sense to work with game states? A lot of the code will be reused in simple functions, so I think it will be just too complicated to use the states in different js files?

Link to comment
Share on other sites

Well,

 

you can at least use states for loading, menu and so on.

 

Btw you can set your functions globaly so you can access them from any part of your game to reuse them. Just create your own library file where are your shared functions and you're are all set. Isn't that possible with your code?

Link to comment
Share on other sites

I would still use States even for this. Even for the most simple of games. It doesn't mean you can't access functions in other files, but it does mean it'll keep each mini game nice and separated, and in the end I reckon it will save you time (and sanity) rather than cost you it.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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