• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

iOS GPU lag

berczi17

Member
Hi!

My game is laggy on mobile platforms, but I don’t know why.
On the iPad “The time required to clear screen each draw step” , on the iPhone “GPU left over time” is very long.

My settings:
- One texture page, which 2048x2048 (when I use 1024x1024 texture, the same thing happened.)
- Vsync is on
- application_surface_enable(false)
- The room size is 2208x1242
- “Interpolate colors between pixels” is on
- In the room is just one object.

On the MacBook the game is super smooth, everything is fine.
On the iPad is also smooth, but it sometimes have little lags.
On the iPhone the debugger shows 300~400 FPS, but the game is very laggy, it’s unplayable.


https://imgur.com/a/mwUY3VD

 

TsukaYuriko

☄️
Forum Staff
Moderator
"GPU left over time" sounds like something you would want - as in, having some time left over after a frame completes until the next frame. Or maybe that term has an entirely different fancy meaning that I'm not aware of.

Does disabling vsync help? If your device's monitor runs at a lower frequency than your room speed, it will be locked to that frame rate.

To be clear, what do you define as lag? Frame drops? Stutter? Permanent or fluctuating slowdown? Delayed responses to player input? Feel free to pick any that are applicable or add your own.
 

berczi17

Member
It's like stutter a bit. It"s not smooth, as I wanted.

On the following image you can see my debugger on different devices:
https://imgur.com/a/mwUY3VD

The white bar on the iPhone section is extremely long, but I don't know what causes the problem.
 
L

Lonewolff

Guest
The red an the yellow bars are the 'under load' times. Going by the screenshot there, it looks very good.
 

berczi17

Member
The red bar (step event) and the yellow bar (draw event) are good enough, but the white bar (GPU time to finish the rendering) is very long.
When it's short as the red and the yellow, it runs smooth, but sometimes it's jump to a high value.
In my room nothing happens. Just one object and one camera, nothing special.
 

Attachments

Does disabling vsync help?
I don't think you answered that question and it would be my first as well.
I'm guessing you use the function display_reset(aa, vsync)
I'd make a os check and if it's a mobile os turn off vsync and aa.

Did that help?

And if you're not drawing to the application surface, what are you drawing on? Another surface? How large is it?

And what's the size of your gui? (not sure if it matters though)
 

berczi17

Member
Thank you your replys.
Yes, for the vsync I use the function display_reset(aa, vsync).
When I disable, sadly it doesn't solve my problem. :(
I read an article about smart phone optimizing.
http://snoutup.com/2014/09/28/gamemaker-android-performance-optimization/
In this article said, turn of the application surface, so the game will be draw directly on screen and it causes performance boost.
However when I turn it off, the FPS is a little higher, but the "white bar" and the lagging is the same.
 
Top