Jump to content

Scale to fit the screen


sm4 (Kulíš Android)
 Share

Recommended Posts

Hi,

 

I just started working with Phaser. I picked it for this contest: http://meta.gamedev.stackexchange.com/questions/1356/the-first-gdse-gamejam Disclaimer:I never really worked with JavaScript.

 

I already have a simple skeleton of the game running, took me about 4 hours to find out how Phaser works + code it. Great job to make it really simple. But I can't seem to find a way how to scale the whole page to a mobile screen. Because the game jam deadline is quite close, I implemented a custom scaling workaround*, but of course a nice way would be better.

 

* setting scale of everything manually

Link to comment
Share on other sites

Hello, and greetings for choosing Phaser. :P

 

The first thing that i can help you without seeing any of your code is:

 

1. Example going full screen you can fiddle with the different scale methods

http://gametest.mobi/phaser/examples/_site/view_full.html?d=display&f=fullscreen.js&t=fullscreen

 

2. Definitely check this topic as i posted some of them:

http://www.html5gamedevs.com/topic/1380-how-to-scale-entire-game-up/?hl=scale

 

and maybe read this topic too:

http://www.html5gamedevs.com/topic/1874-scale-entire-canvas-without-smoothing/?hl=scale

 

EDIT:

Here a link to the docs too:

http://gametest.mobi/phaser/docs/Phaser.StageScaleMode.html

Edited by Mike
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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