User Tag List

Results 1 to 5 of 5

Thread: Stange counter issue - Timer

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

    Join Date
    Apr 2015
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stange counter issue - Timer

    Hello guys.
    I need to create a timer, which will display how long a player could stay alive on the level. The model is 0:00, where first number is "seconds".

    I created 3 counters for each number, and made them work together, same way as in .mfa attached, made by Ron Gonzalez.

    Now the interesting part.
    This counter goes slowly, then real time.


    After spending few hours on web, I got the reason. It is the FPS. When I switch it to 120 fps, counter starts to work properly. But Ron said, that the timer was working fine on his PC all the time.
    When I upload my game to test on Android, the timer was working slowly again, and I don't know what to do now.

    Do you have an idea?

    Is there any other way to create a timer with milliseconds in format 0:00?

    Thank you!
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    QuoteFox's Avatar
    Join Date
    Nov 2011
    Location
    UK
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fix!

    Hello there, I fixed the problem you was having!

    stopwatchfix.mfa

    You can actually set the counters to the running time instead of adding to the counter every tick. This will be more accurate.

    As you can only add to a counter as fast as the application can process it. If the application drops bellow 100 fps then you'll be counting slower then normal as its tided to the frame rate. (I believe. Might be wrong!)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    QuoteFox solution is the way to go if you don't need a blind sync with "real" time
    (because if framerate drops, application internal timer will also drop)

    If you want a still more solid solution,
    you could try using the "date & time" object,
    that can access the system clock (unaltered by frame rate)

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

    Join Date
    Apr 2015
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    QuoteFox, thank you very much for fix and explanation! Didn't know this way was even exist.

    schorodinger, I tried using it, but it is too complicated for me right now. I will come back to variant if needed, thanks.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    QuoteFox's Avatar
    Join Date
    Nov 2011
    Location
    UK
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad it helped! ^^

Similar Threads

  1. timer issue
    By JRP in forum Fusion 2.5
    Replies: 12
    Last Post: 10th May 2014, 01:50 PM
  2. Counter updating issue or code issue?
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 14th March 2013, 01:48 PM
  3. Stop Watch and Count Down timer displayed by the counter
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th March 2012, 03:43 PM
  4. Stange Quicktime problem
    By ryguy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th February 2008, 03:02 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
  •