Jump to content

Multiple areas / screen types


mikeg542
 Share

Recommended Posts

I am currently getting into working with phaser and having a great time building a little RPG style game. 

I have the main game map working quite well with a tilemap set up and a player running around with collisions, but through a ton of searching and watching tutorials and examples, I can't find out how to set up something like:

Intro Screen (New, continue)

Main game map (Working!)

Battle Screen - not using tile map, but rather  just a normal screen with images placed on it.

Item screen - similar to battle screen but different stuff.

Are there any tutorials or examples that would lead me in the right direction? I don't need a direct answer, but I haven't been able to find something to build off of to get something close to this.

 

Thanks for any help!

Link to comment
Share on other sites

For Intro Screen you would probably use a separate State.

For the others, you might use a single Game State including all of them or you might use a different State for each one. It depends.

If you use multiple states, you have to make sure the State can recreate itself, if necessary, after it's closed and reopened (stopped and then started again).

If you use a single state, you have to make sure each component (map screen, battle screen, item screen) is paused or hidden when it's inactive. Usually that involves hiding a layer, pausing updates, and temporarily disabling any input handlers.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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