Jump to content

Phaser + CocoonJs multiple screens.


tips4design
 Share

Recommended Posts

Is it possible to have both webkit+ and canvas+ in a single app? My game has a HTML interface where you can customize the player, an then after you click play only the game canvas will be visible (no other HTML elements).

 

 

Is it possible to have two separated views, one with the HTML interface and one with the game canvas, and exchange between those too when needed? (eg: you pause the game, the HTML interface pops up and the canvas is hidden).

 

I know I can do that easily with javascript, by hiding the HTML elements, but I do not think it will improve performance, as CocoonJS might not switch to canvas+, even though the only thing visible is the canvas.

Link to comment
Share on other sites

What you want to do is possible thanks to the WebView <-> Canvas+ mechanism. The WebView+ is still not available for this option.

 

http://support.ludei.com/hc/en-us/articles/200807797-Canvas-Webview

 

You will have to understand that the menu and the game will be executed in two different runtime environments (with two different HTML files) but you should be able to communicate between them using the forward mechanisms.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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