User Tag List

Results 1 to 8 of 8

Thread: The iOs timer starts to lag behind? Possible iOS 10 problem.

  1. #1
    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)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The iOs timer starts to lag behind? Possible iOS 10 problem.

    I'm building a rhythm game, and I've gotten everything to work quite well, except on iOS, where I'm having some weird timing issues.

    The way my code works now is like this:

    At the start of the frame the music starts playing, and my Music Bar starts moving forward. As an example, every 0.500 seconds it overlaps an item and an event triggers, and every 2.0 seconds the bar jumps back to its original position. These events keep looping. This solutions works perfectly on windows, html5 and Android, but on iOS it begins to lag behind after a while, like the bar isn't moving fast enough, and everything gets out of sync with the music.

    This used to work on iOS as well, nut I recently updated to xCode 8 ant iOS 10, and is seems the problems have occured after that. Has anyone else experienced timing issues on iOS?

    Also, I've tried other solutions, other was of keeping time etc, but nothing works on iOS (while running perfectly on Android, using a rather slow Pad).

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,784
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    please post a bug report with a small mfa that reproduce the problem for us check here.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    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)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    EDIT: Updated with a cleaner example. Remember, the problem only occurs on iOS, testing on a device.

    Here's an example mfa (https://www.dropbox.com/s/i4kyo181kd...mple2.mfa?dl=0), taken straight out of the game I'm working on. If you run it on the desktop it'll work perfectly, same on Android. But on iOs it'll start to get out of sync after just 30 seconds. Have submitted bug report.

  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)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By the way, I think the problem might have been there before iOS 10, I just didn't notice because I did most of the testing on desktop.

  5. #5
    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)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seriously, I've been working on this nonstop for more than a week now, I can not figure out a way to accurately measure time. Does anyone have any ideas?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS 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)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look into delta time if you want to do anything rhythm based. If there are any frame drops in your app things will get out of sync really quickly, especially if you are using the built in timer.

  7. #7
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,784
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    mm the problem here is that the internal timer get sync via internet time to time and that is way you get that difference , I m trying to find one of the timer that does not get updated by the OS.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  8. #8
    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)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RhysD View Post
    Look into delta time if you want to do anything rhythm based. If there are any frame drops in your app things will get out of sync really quickly, especially if you are using the built in timer.
    Framerate is not the problem though, the problem is finding an accurate way to simply count time.

Similar Threads

  1. How do you Create a Global Timer as a Countdown Timer
    By redpandagames in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 23rd February 2017, 10:08 AM
  2. Modifier le timer au fil du temps / Change the timer over time
    By Nespose in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 6th March 2014, 05:57 PM
  3. Timer problem - Need help making it accurate
    By fwtep in forum Fusion 2.5
    Replies: 3
    Last Post: 4th March 2014, 04:58 AM
  4. Problem with sounds that have a timer-volume
    By Matriax in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 4th April 2013, 11:09 AM
  5. Problem with timer: sometimes events skipped
    By Leander in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 11th September 2008, 09:09 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
  •