User Tag List

Results 1 to 9 of 9

Thread: Optimization on my iOS Game ?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Optimization on my iOS Game ?

    Hi,

    I created a small and simple game on iOS. I have problem with LAG from time to time - when i start game i can see a little "lag" and this "lag" shows up from time to time. I read a guide on Clickteam community about better performance and i used some solution like:
    - don't use alpha channel (i used transparent)
    - use resolution 320x480 (it's my resolution)
    - use pixel art graphic
    - graphic ( i have big graphics objects because it is a map - size: 320x480)

    I used a lot of graphics but at the same time i used max. 2 graphics ( i have event - when counter = XX then create object XX ). My graphic size is 320x480 (1 object) but when the object is too far from frame then it is destroyed. On the runtime i have only 20-22 object like counters , my character etc. I used event -> always SET framerate as counter... and i see in my real device what is actual frame rate. On my game frame rate is about 61-62 fps. Ok, FPS looks good but what is wrong with LAG ? Where i can find solution ?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    506
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What devices are you testing on? This all seems very modest. I did a side scroller called Zombie Crunch a couple years ago violating all the rules with a 4,000x32,000 board, tons of many-framed large alpha-channeled characters and effects along with dozens of events and it really had no issues. They have done tons of optimizations since then as well to make the generated code even faster.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm testing on iPhone 5 and iPad Air. I don't know what is wrong because excluding my large graphics (320x480) everything is OK - I think so . But i used only 1 - 2 graphics per second and after that i destroyed it and creating another 1 - 2 graphics. I deleted all "always" and "every "timer" " events and replaced by alterable values so my code should be clean. Everything in my code is very simple.

    I also set:
    - Color reduction in iOS properties

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    If your game is staying at 60fps it's probably not memory related... someone will have to see the mfa

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Personally, a thing I sometimes notice when testing my platform engine is that, while the main character moves, the scrolling windows lags 1-2 pixels (intermittenly but at fixed intervals). This happens only with scrolling windows/movement, even if I use placeholders, apply all performance rules and game stays at 60fps.
    I don't know if that's the same issue of MagnetoX, but I wanted to share.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    You should scroll the camera at the end of the game loop to avoid that.

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jan 2015
    Posts
    262
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ok, I replaced all events with flags etc. to alterable value and now i don't feel "lag" in game. I don't use events always, every etc. Maybe my code wasn't transparent/clean. Thank you guys.

  8. #8
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,336
    Mentioned
    49 Post(s)
    Tagged
    0 Thread(s)
    So, using the Flags (On / Off etc) makes a game lag?

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    no... it doesn't... this idea has come from a misunderstanding in various optimization threads. for example, if you have an event

    "Always - Add 1 to counter"

    or

    "Flag 1 is on - Add 1 to counter"

    It is Identical. An "always" event is not just the condition always, but an event that is always being tested. I think there is a lot of confusion on this, the "always" condition does not need to be avoided, what you need to avoid is pointlessly testing things every single frame. Whether you use the "always" condition or a flag or an alterable value makes no difference.

Similar Threads

  1. Optimization - How to get my game to run smoothly?
    By Xeeko in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 3rd November 2010, 07:33 PM
  2. Optimization
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 9th June 2009, 11:17 AM
  3. Platform Game Questions: Organization/Optimization
    By Logiq121 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 15th September 2008, 02:15 PM
  4. Optimization Tips?
    By Michael_Gummelt in forum Multimedia Fusion 2 - Technical Support
    Replies: 29
    Last Post: 25th July 2006, 06:30 AM

Posting Permissions

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