Maria Posted May 18, 2015 Share Posted May 18, 2015 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 More sharing options...
AzraelTycka Posted May 18, 2015 Share Posted May 18, 2015 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 More sharing options...
rich Posted May 18, 2015 Share Posted May 18, 2015 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 More sharing options...
Maria Posted May 19, 2015 Author Share Posted May 19, 2015 Thanks! Then I will do it And yes Azrael the library is a good idea Link to comment Share on other sites More sharing options...
Recommended Posts