Hi,
I'm having problems using application:getDeviceHeight() and width...
On iphone 6 it gives me iphone 5 resolution.
1136 x 640
EDIT: If I check on screenresolution.org, it also states my resolution as
568 x 320 (same as above, only .5)
Why on earth is an iPhone 6 at the 'wrong resolution'? This is weird!
Comments
http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions
What are you trying to do?
@ar2rawseen - Thanks for that url, although I've no idea why there's two resolutions. There's only one version of the iphone 6 (not counting the plus version). Anyway, going by that chart, the resolution being reported in Gideros is correct. The iphone 6 is upsampling it.
@Totebo - I have a system in my game that checks if a sprite is outside of the screen. If it is, it sets the sprite to setVisible(false). And vice versa. It makes for a hefty performance increase. It does rely on being able to get the screen point size / x1 size / resolution accurately though.
Thanks!
Niclas
Awesome, thanks. Looks very efficient. I'll look into how it works.
I've tracked down my problem and it's even more weird...
On iphone 4, the game works fine.
On iphone 6 and 6 plus there's a problem...
If I use math.huge on iphone 6 / 6 plus it does not work.
If I use an int instead, like 99999, then there's no problems!
I tend to have a game loop based on ENTER_FRAME that other classes subscribe to, so I can pause the game easily, and turn classes updating on or off to see how much CPU they use. So I've never bumped into this issue before.