• 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!

Android Optimizing For Slow Android O.S. Devices...

J

JeZxLee

Guest
Hi,

I've got a really old and very slow Android O.S. tablet.
My GameMaker:Studio game runs 45 Frames Per Second when I want 60FPS on the slow tablet.
Is there anything I can do to optimize the game to run faster on slower Android devices?
I did just today compile with the "YYC" and there was a increase in performance.
There must be something else I can do to make it run better?
Thanks!
 

PNelly

Member
A few things that stand out from my experience with Kitty Lander

- You can disable the application surface so you're drawing directly to the screen buffer, which is big help on mobile devices.
- It's crucial that you keep texture swaps to the absolute minimum possible. You can do this by using the texture groups feature which you can read about in the manual. Ideally, you'd be able to get all of your image assets onto a single texture page. Sometimes that isn't possible but you can still strategize your use of texture groups to minimize the number of swaps. You can watch them in real time by using show_debug_overlay().
- Do whatever you can to avoid making complex calculations or iterating through large loops in the draw events. If necessary, move any calculations you need to the Step / End Step event and store the results in variables or data structures so you can get to them in the draw event.
- Color blending is pretty demanding so be careful with it. If you're needing to use it you can cheat a little bit by enabling alpha testing. See draw_set_alpha_test()
- Additionally, you can find trouble spots in how your code is written by running a graph and profiler in the debugger. Check the pieces that are taking the most time per step and see if there's anything you can do to minimize the amount of computational impact they're having.
 
P

PlayLight

Guest
Keep in mind that a lot of old Android devices where clamped at 40-45fps, either via the OS (pre jellybean) or via the device kernel.
Unfortunately you will never reach over this set limit if that old device has been clamped.
Is there any reason you are not happy with 45fps?

edit:
I'm not saying that this is the case here, just something to keep in mind if you find optimizations do nothing to help reach your target fps.
 
Last edited by a moderator:
I

icuurd12b42

Guest
If you code for android, +1 to all that's been said. + you should code the game to use delta time
 
Top