Jump to content

I completed my first Phaser Game, I would like to put it up on the Google Play store.


EpicKingdom_
 Share

Recommended Posts

This is what my Phaser 2 game looks like in an Android emulator, I am not sure why. 

If I load a basic HTML5 docuiment with a simple h1 tag, it looks fine so it must be something wrong with my game. 

Capture.PNG

This is what it should look like. 

Screen Shot 2018-05-03 at 19.27.59.png

Link to comment
Share on other sites

this might be something related to CSP(Content Security Policy). When trying out cordova, I've faced issue where any of assets are not loading. It was solved by removing meta tag related to CSP. I'm not sure that's the best practice but it was okay for just get it to working condition. Other than that I didn't find any other issues. However I didn't run it on emulator, instead I run directly on the device and  also made apk and install on several other device and it was working good.

Maybe try running on actual device or build an apk?

I found this about CSP. I'm not sure this would solve your problem but it might be useful.

Link to comment
Share on other sites

This is what the Phaser 2 game looks like on my local Android device. 

(EDIT): I can scroll with my finger, it would appear that the game is too large for the device? Here are my settings. 
 

let game = new Phaser.Game(800, 720, Phaser.CANVAS);

game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
game.scale.pageAlignHorizontally = true;
game.scale.pageAlignVertically = true;



 

Screenshot_2018-05-06-20-23-52.png

Link to comment
Share on other sites

On 5/6/2018 at 1:39 PM, grinmonk said:

@EpicKingdom_ Have you tried scaling your game in a browser? I would recommend using Chrome's device emulation:

https://developers.google.com/web/tools/chrome-devtools/device-mode/

You might use this device mode to see how your game scales in different mobile devices. If it scales as you want in chrome-devtools than it should scale as it is on mobile device. If you want to disable scroll than you can use some meta tags in html. However I used phaser 3 and scale the game using custom JS function like this. Apart from that I don't have any experience with phaser2.

Link to comment
Share on other sites

I always use responsive web design in Firefox or Chrome when developing, the game scales in the browser. 
It just doesn't look right on an emulator or on my local device. Is Phaser not good for mobile development?

This is what it looks like in Chrome. 

(EDIT): I think I will just redesign the entire game to be 100% positive that it designed for mobile first.

 

Capture.PNG

Link to comment
Share on other sites

Alright, so I decided to just to just develop for the device I am aiming at (Nexus 5). 

So I set the canvas to 320px by 640px. 

Then I am using the Phaser scale methods. 

I also scaled all the sprites and text down and re-positioned them. 

This is the new result so far.

 

 

Screenshot_2018-05-07-20-44-38.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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