User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Framerate question for mobile games

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    686
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Framerate question for mobile games

    Well, i would liek to know what you aim for in term of framerate for your scrolling mobile games.

    My game was made with the traditionnal 50FPS that was first imposed in MMF, I've tried to move to 60FPS but I've got some complain about lot of framerate drop and stability issues.
    On my iOS devices, 60FPS is perfect, but on the Android devices… It is not… It seems that the performances on Android are really bad on the common devices, so how can i improve the stability?

    I've limited the number of object on screen, the number of loops in my events and all, but it seems impossible to get a constant FPS on Android. I'm trying to move to 30FPS, but i Don't know if it's really is a good idea.

    Any advices?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module

    Join Date
    May 2014
    Posts
    97
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I always aim for 60 FPS, but older devices might not get there. For older devices, having delta time is a huge help. It looks like frame skip, but it's way better than having all of the action slow down.

    I try to avoid "always" events as much as possible.

    For more intensive things, it's good to make sure the first thing it checks is the least consuming on system resources. The less events it has to check, the better. Throwing things that don't need to be running constantly in a group that you can enable/disable also helps.

    Overlap events are very taxing. Having fine detection turned on can be pretty taxing.

    Another thing worth messing with is the OpenGL version. In some cases, a different version can yield different results. Just keep in mind that Google Play doesn't treat 3.0 as backwards compatible with earlier versions (not sure if this has changed since last year).

    As of 2015, there are over 24,000 different Android devices. Unless you have absolutely nothing happening in your app, it's unrealistic to expect that you'll get 60 FPS on every device. You just have to make up for it in different ways.

    Hope this helps.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    686
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the tips.

    What is "delta time" ? I know that i can't handle 60FPS on every devices, and running at 50 FPS or event 40FPS seems fine but with the framerate drop it can be difficult (it's an endless Runner).

    I use OpenGL ES 1.1 only, i saw some topics saying it was the best for framerate if we Don't use special things related to 2.0 or 3.0.
    I Don't use fine detection and use "inactivate object if too far" on most of the objects. Every needed item is created only When it's near the player and destroyed When it's too far. But i have like 590 objects in the debugger (but not that much visible on screen).
    I use hide object When it is not used (it seems to save some framerate).
    And i use scaling 2x for big images so they are half their size at origin.

    I've tried 30FPS, and yay, it was a bad idea, the game is ugly looking with the scrolling lol, but how to limit the framerate drops? It seems that I've improved as more as possible my events.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module

    Join Date
    May 2014
    Posts
    97
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Delta time is used for frame rate independence. Say for example you're always adding 1 to a counter. At 60 FPS, you're adding that 60 times per second. At 30 FPS, you're adding that 30 times per second. With delta time, you're roughly ending up with the same amount every second regardless of frame rate.

    To do this, you'll want two values: _DeltaSpeed and _DeltaTime.

    _DeltaSpeed is cool if you want to manipulate things to be at 1x speed, half speed, 2x speed, etc. Setting that to 1 is just fine.

    Always set _DeltaTime to ( ( _DeltaSpeed( "Delta" ) / 1.0 ) / ( FrameRate / 1.0 ) ) * 60

    When you want to add to that counter, move an object, etc., you multiply that number by the _DeltaTime value. Don't forget those floating point numbers. It's not perfect, but it's very helpful. I have used this on Android stuff with decent results.

    As for everything else, it sounds like you're moving in the right direction. Just do your best to optimize as much as possible. Also remember the whole power of two thing when it comes to images. Personally, I'm not a fan of "inactive when too far" or "destroy if too far". I like doing it manually as soon as possible.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    686
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    I thing i'm understanding your use of that delta thing.

    It's a value you're retrieving dynamicatly to get decent result on poor framerate. By the way, what is "_DeltaSpeed( "Delta" ) " ? If _DeltaSpeed is just a global value, how to get this "delta"? Do you have some sort of example? A Screenshot from clicteam fusion?

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Feb 2017
    Posts
    338
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Dobermann think about it like that, you have a multiplayer game with no delta time, on guy runs the game at 500 fps and the game logic runs blazing fast, another guy runs the game with 20fps and everything is very slow. So the first guy basically has an cheat, because the game runs faster for him. With delta time this cannot happen because the whole gamelogic has the same speed for both, of course the guy with only 20 fps has choppy movement but everything on screen moves the same distance over the same period of time for him than for the other guy with 500 fps.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    686
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    It seems to be Something like the built-in "timer based movement" no?

    I understand the logic behind this delta thing, but i Don't know how to make it to works because "( "Delta" )" is not a valid data in CF.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module

    Join Date
    May 2014
    Posts
    97
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You have to set those as alterable values or global values. Whichever you prefer. What you have to set those values to is outlined in my previous post. If the names are the same, you just copy and paste.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    686
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by raxabit View Post
    You have to set those as alterable values or global values. Whichever you prefer.
    Ok that's what i understand:

    _DeltaTime is a global value
    _DeltaSpeed is a global value

    So in this calcul, what is ("delta"):
    _DeltaTime to ( ( _DeltaSpeed( "Delta" ) / 1.0 ) / ( FrameRate / 1.0 ) ) * 60

    This is what i get if i replace your DeltaTime/Speed by glabal values, ("Delta") is a problem:
    Sans titre.png

    The problem i can also see with this, is that as my game is an endless Runner with the player Moving itself, if there is a big framerate drop, it will end by the player falling in a hole with no time to react..

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module

    Join Date
    May 2014
    Posts
    97
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Oh, sorry! ("Delta") is the object that I put the values in. Totally forgot to mention that.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Question about Framerate and changing controlls
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th February 2011, 10:20 PM
  2. Question about framerate.
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 9th November 2008, 07:34 PM
  3. Framerate for racing games?
    By Leander in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd July 2008, 11:49 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
  •