User Tag List

Results 1 to 8 of 8

Thread: Slow on old Android devices: fix by limiting frame rate?

  1. #1
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Feb 2014
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slow on old Android devices: fix by limiting frame rate?

    Hi guys,

    I released my first ever Android game 10 days ago and already got 17.000 downloads, so I'm quite happy already!

    A big issue I'm having though is that I get a lot of 1 star ratings because the game is running too slow on old Android devices, while many others are voting 5 stars (probably because it runs okay and of course because they like it)

    Three questions:

    1) Could I fix this by lowering the frame rate to 25? I noticed the frame rate is set to 50 by default. If I change it to 25 it still seems to run okay (though some thing in slow-mo) so this would be an option, but would this speed up the game on older devices?
    2) Any other suggestions to speed up for older devices? I don't think I'm using any "expensive" code, since it's quite a simple game, so I don't expect a lot from optimisation there. But still, tips in that field are welcome too!
    3) Is there an emulator or anything I could use to at least get an idea on how the game will run on old devices?

    Thanks!

    Best, Hugo

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,824
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    Another option is you might just have to up the specs for playing the game to newer devices.
    Pre 4.0 devices are falling pretty fast according to the stats.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There is an emulator in CF you can use. It allows you to configure multiple settings to create different phone environments for you to test in. You will find the emulator on the android tab of the application properties. It works in conjunction with the ADK if I remember correctly so you have to go in to that and create the phone types first. Once you do that your can use the emulator from within MMF and choose your phone environment. Having said all that, and not being a game dev but and app dev, the emulator is slow to load on my computer, loading the app in the emulator can also be slow but once I get my app running it appears to run fine. I don't have 20 objects running around the screen to keep track of tough. This may help you get started on that if you have not seen it yet...

    Setting up the Android SDK for the Android Export Module

    I have an older Android device that runs 2.X so I connect it to my PC and copy the APK over then run it. It's faster for me that way.

    Good Luck!

  4. #4
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Feb 2014
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the responses guys! @Jeff: from a business perspective this is probably true, but I just want as many people to play, including the ones unfortunate to carry low-end devices..
    @Kimera: Thanks, I will definitely check out the emulator as soon as I find the time. I tried lowering the framerate to 30 and this actually worked very well to speed it up, without really compromising the game experience.

  5. #5
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,708
    Mentioned
    294 Post(s)
    Tagged
    4 Thread(s)
    I tried lowering the framerate to 30 and this actually worked very well to speed it up, without really compromising the game experience.
    Actually this is the best way to speed up thing depending of the game type you are creating, i have seen games that are almost static with heavy load with a frame-rate of 50, something that could easily be ported to 30.

    so the rule here is, if you don┤t have to many animation that require a real high framerate put a lower valuer and test, that for sure will make your game/application a non problem games and workable in many devices.

    Sometimes devs forget that the limitation comes from the devices itself and not the exporter, this is the case of OpenGL2.0, in device lower than api 18 it will max reach 45 to 50 fps, but if you go now to device with api 18 to above you will see running steady 60 fps.

    btw, here is a link for future reference http://android-developers.blogspot.c...rvices-40.html
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also if you haven't tried using OpenGL 1.1 instead of 2.0, see if that makes a difference for your game. The current game I'm working there was a big difference (+10 FPS) using openGL 1.1

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's some tips and links for optimization:

    A guide to faster games with less memory usage

    How to work out if an image is to the power of 2 (you want to understand this for mobile development)

    Optimal settings to be aware of:

    32,000 colours will run faster
    Open GL 1.1 is ideal
    I recommend V-sync for smooth graphics
    Have global colour reduction on objects to reduce memory (under Android - Image Compression in Android Properties)
    If you're doing pixel art, turn "smooth resizing" off and resize all images at runtime at 0, the lowest quality, to avoid smoothing
    Enable "Wake_Lock" under the permissions to help keep the phone backlight on


    Other useful tips:

    Overlap conditions use more CPU than straight collision detection, so avoid them
    Ideally avoid the timer - make custom timers with variables instead
    Also the PMO (platform movement object) is the best movement type I have found
    Fastloops slow down mobile apps - avoid them if possible. That's why I use the PMO object for character movement. I can link you to an example if you need one

    In regards to Fastloops, specifically it's the 'On Loop' command that causes slowdown. You can reduce slowdown by having all "On Loop" conditions inside an inactive group, and only activate the groups when the fastloops run, then deactivate it when it's not in use again.
    The reason this is optimized is because Fusion only reads the code that's not inside inactive groups - anything inside an inactive group won't be read. And remember that all code is read top to bottom 60 times per second if you're running at 60fps.

    You can also optimize the rest of your code by putting them inside groups, and turning off 'active at start', and only activating groups of code when you need them. For example, you could put all of your ground tiles in an 'obstacle' group qualifier under each objects property settings, then put all collisions with obstacles inside an event group in the event editor. Then you can have the event group activate only when the player is colliding with the 'obstacle' group object. That way, if the player is in the air, that code's not being read. You can do lots of stuff like that to optimize code.

    Hope that helps

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    wow great information Simflare, thanks!

Similar Threads

  1. White bar 1px on some android devices
    By Nioki in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 3rd January 2014, 01:35 AM
  2. Save game on Android Devices
    By Nellatermica in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 13th May 2013, 11:11 AM
  3. Fonts available on Android devices
    By Simon in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 29th March 2011, 07:38 AM
  4. Limiting/ controling frame rate
    By EdibleWare in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th February 2011, 01:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •