• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Need Optimization tips to Improve Game Speed

gdkid

Member
Hi guys

I made a game called Star Dots, which is similar to the Flash game Boomshine in which you create series of explosion from tiny "dots".


Download it here: https://play.google.com/store/apps/details?id=com.strangepulsestudio.stardots

My game has an issue with performance. So each time the dot explodes, it creates explosion effect including sprite with animations.

When the number of dots is small, the game feels good. But when we have about 20 of dots and explosion, it feels slow, heavy and the phone temperature increases greatly.

Is there anyway to optimize it? Make the game run faster and less overheating.

Thanks a lot
 

RangerX

Member
Are you using the application surface? Disabling it will save much memory and processing.
Other things you can try:
- Making your game lower res and scaling it up instead.
- Reducing the color fidelity of your sprites.
- Grouping/creating and flushing your own texture pages so there's the less texture swap as possible.
- Reduce your backgrounds sizes and have it tile
 

gdkid

Member
Hi RangerX

Thanks for reply
I'm going through each of your advice to make sure I get it correctly

- Making your game lower res and scaling it up instead.
-> Which means reducing the resolution of graphic assets, right?

- Reducing the color fidelity of your sprites.
-> So instead of a 32-bit, I reduce the sprite's color depth to 8-bit, right?

-- Grouping/creating and flushing your own texture pages so there's the less texture swap as possible.

-> I haven't done this one before, could you have a tutorial ?
 

RangerX

Member
Making your game lower res probably means shrinking down your graphic assets. It depends the size they have right now.
Per example, imagine a game that is 1280x720 (720p) with most assets being made of 64x64 sprites. You might want your game to be 640x360 with 32x32 assets.

Color fidelity you got it right. 16bit or 8bit and limiting the number of colors per sprite. Its useless to have, let's say a 32x32 sprite using 1024 colors.(ok my example is a bit of an overkill lol). 16 colors in this case is probably enough.

When you create a graphical asset, there's an option to choose on which texture group you want it to be.
When GMS compiles your game, it create textures pages and puts all your sprites on them. Then those textures are ready to load on the go whenever one of those sprites must be drawn on screen. Thing is, textures pages have a limit in size so GMS might need to create multiple of them. During the game, if one same level/room/whatever you call it, ask for drawing sprites coming from 3 different texture pages, GMS will need to "swap" from texture page to texture page and this comes at a cost.
So basically, you want to organise your graphical asset intelligently so there's the less texture page swap possible while your game is running. There are also functions to flush the memory of the texture pages you don't need anymore, another thing that could ease up memory (memory space is precious as diamond on mobile phones). Look up the manual and google, am sure you'll find interesting functions and tutorials that I can't remember from the top of my head.
 

acidemic

Member
Try to do as less calculations in the "Draw" event possible. Calculate everything in the Step event.

Here is my collection of links for GMS game perfomance optimizing:

[GUIDE] Gaining a significant performance boost
http://gmc.yoyogames.com/index.php?showtopic=655565

Optimising The Draw Pipeline
https://www.yoyogames.com/tech_blog/61

GameMaker 1.3+ and low Android performance
http://snoutup.com/2014/09/28/gamemaker-android-performance-optimization/

Optimizing Your games in GameMaker: Studio
https://www.yoyogames.com/tech_blog/30

25 optimizing techniques for Game Maker.
http://gmc.yoyogames.com/index.php?showtopic=512603

Optimizing Your Game Maker Game
http://forums.tigsource.com/index.php?topic=3747.0

Game Maker Studio Optimization Tips for Multiple Collisions
https://indiedevboy.wordpress.com/2...io-optimization-tips-for-multiple-collisions/
 
Last edited:
Top