M
madthijs
Guest
Hi guys,
I'm creating a mobile game. It's NOT pixelart so I require a high res output. For some reason performance on both my Mac and my Android device (Samsung A50) has been less than great, so I decided to do some experimentation. Here is what I found, and I'm wondering if you guys see the same thing. Or maybe I'm missing something, or maybe it is a bug. I'm running GM2.3.1 and the latest runner. Once I gather enough information I may create a bug report, but for now I'm investigating what is going on.
TLDR;
1. Increasing the output resolution (room size in this case, lets ignore viewports for a moment) negatively affects performance, even though I am drawing the same number of objects/sprites.
2. Drawing big sprites is much slower than drawing small sprites.
Samsung A50 (not the fastest thing in the world but pretty decent):
A) Resolution 720x1280, draw 200 objects with a sprite of 640x640 (all the same sprite, so no texture swap issues): ± 33 fps (Real: 200 - 300 fps)
B) Resolution 360x640, draw 200 objects with a sprite of 640x640: 60 fps (Real: 200 - 300)
C) Resolution 720x1280, draw 200 objects with a sprite of 64x64: 60 fps (Real: 500-600)
D) Resolution 360x640, draw 200 objects with a sprite of 64x64: 60 fps (Real: 500-600)
My questions are:
Why is it slower to draw a big than a small sprite? (A vs C, you'll see a big dip in fps and in real_fps)
Why is a higher output resolution slower than a lower resolution, even though I'm doing exactly the same draw calls?
FYI: The debug_overlay shows lots of GPU time left in the frame in every scenario. Except the draw event taking a little longer with the big sprites (as seen in the real fps drop), but nowhere long enough to start dropping frames!
I find this behaviour very curious. Please find the attached project. I choose the 200 number to push things where you see issues. Your PC might not have issues at 200, but at a different threshold. Also I don't thing 200 objects is insane, I've seen a lot of forum posts from people saying thousands of objects are possible (obviously depends on what they do, but in my case, they just draw a sprite, so pretty minimal).
I see the same behaviour on my MacBook btw, so it's not really Android related I guess.
Also I have no way to try thing on an earlier GM version (2.2?) without replacing my current install. Doesn't really matter as I would like to see this behaviour explained or resolved for version 2.3 anyway.
Thanks for you input,
Madthijs
PS: I cant' seem to attach a YYZ or zip file?
Download link: https://easyupload.io/k2qsoe
I'm creating a mobile game. It's NOT pixelart so I require a high res output. For some reason performance on both my Mac and my Android device (Samsung A50) has been less than great, so I decided to do some experimentation. Here is what I found, and I'm wondering if you guys see the same thing. Or maybe I'm missing something, or maybe it is a bug. I'm running GM2.3.1 and the latest runner. Once I gather enough information I may create a bug report, but for now I'm investigating what is going on.
TLDR;
1. Increasing the output resolution (room size in this case, lets ignore viewports for a moment) negatively affects performance, even though I am drawing the same number of objects/sprites.
2. Drawing big sprites is much slower than drawing small sprites.
Samsung A50 (not the fastest thing in the world but pretty decent):
A) Resolution 720x1280, draw 200 objects with a sprite of 640x640 (all the same sprite, so no texture swap issues): ± 33 fps (Real: 200 - 300 fps)
B) Resolution 360x640, draw 200 objects with a sprite of 640x640: 60 fps (Real: 200 - 300)
C) Resolution 720x1280, draw 200 objects with a sprite of 64x64: 60 fps (Real: 500-600)
D) Resolution 360x640, draw 200 objects with a sprite of 64x64: 60 fps (Real: 500-600)
My questions are:
Why is it slower to draw a big than a small sprite? (A vs C, you'll see a big dip in fps and in real_fps)
Why is a higher output resolution slower than a lower resolution, even though I'm doing exactly the same draw calls?
FYI: The debug_overlay shows lots of GPU time left in the frame in every scenario. Except the draw event taking a little longer with the big sprites (as seen in the real fps drop), but nowhere long enough to start dropping frames!
I find this behaviour very curious. Please find the attached project. I choose the 200 number to push things where you see issues. Your PC might not have issues at 200, but at a different threshold. Also I don't thing 200 objects is insane, I've seen a lot of forum posts from people saying thousands of objects are possible (obviously depends on what they do, but in my case, they just draw a sprite, so pretty minimal).
I see the same behaviour on my MacBook btw, so it's not really Android related I guess.
Also I have no way to try thing on an earlier GM version (2.2?) without replacing my current install. Doesn't really matter as I would like to see this behaviour explained or resolved for version 2.3 anyway.
Thanks for you input,
Madthijs
PS: I cant' seem to attach a YYZ or zip file?
Download link: https://easyupload.io/k2qsoe