Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by roger

Hi!

Do you know how to manage the proportions of samsung galaxy S or some device like this? It has 480px x 800px so it has a diferent proportion from iPhone for example.

Is there any function to know if it's a mobile device with this aspect ratio?

Thank you.

1 decade ago by dominic

ig.ua has a some screen info.

You basically have these three options:
- Only display the game on a portion of the screen
- Enlarge the "viewport" of the game for this device (first two params for ig.main())
- Scale the game to fit on the screen

I believe the Galaxy S has an ig.ua.pixelRatio of 1.5, which can be a bit tricky if you want to scale the game. It worked well for Biolab Disaster, because it was scaled up 2x on the iPhone3GS, 4x on the iPhone4 and 3x on devices with the 1.5 pixel ration.

Also, have a look at this thread.
Page 1 of 1
« first « previous next › last »