User Tag List

Results 1 to 7 of 7

Thread: Origin of the "timer" value

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    May 2013
    Posts
    142
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Origin of the "timer" value

    Does the "timer" value get affected by the frame rate? Also, is it affected by someone messing with the time settings in iOS? My understanding is it's derived from CPU ticks and cannot (easily) be messed with but I want to make sure and I'm not currently in a position where I can test this for myself.

    This is a general question as well but particularly with reference to the iOS exporter which is why I asked it here.

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    2,998
    Mentioned
    20 Post(s)
    Tagged
    2 Thread(s)
    What are you referring to here? Time or time/date settings?

    If it's with regards to the built-in Fusion timer, then yes it is not* affected by framerate. The timer will continue to 'tick' and can lag behind your game. If you need more precision, such as "restrict actions" or "every" then I would highly recommend using the MOD function instead.

    If you are relating to the date/time object, yes, this can be messed with as it grabs the date/time from the device itself. You can prevent cheating by saving a timestamp to your game file with MD5 and then comparing on the next startup if the date differs.
    Want to learn Clickteam Fusion 2.5?




  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    May 2013
    Posts
    142
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hey Danny, thanks for the response. I'm talking about the "timer" property of the "the timer" object and it supposedly gives the time lapsed since the start of the frame in thousandth of a second. I assume this is independent of the frame rate but I wanted to check. When it appears in the expression editor it is referenced by the string "timer".

    Edit:
    A quick play around seems to suggest this is not affected by frame rate but I'm still not in a position to test it on an iPhone/i(Insert your Apple device here). The other thing I don't know is if this gets its value from the date and time clock and can be tampered with or if it comes from counting CPU ticks and is pretty hard to tamper with.

  4. #4
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    2,998
    Mentioned
    20 Post(s)
    Tagged
    2 Thread(s)
    Yes it's not affected by the framerate, I meant it in a different manner in my first post. The internal timer is not acquired from the date/time clock.

    If you need an accurate measurement of true game ticks then you can simply add 1 to a counter at the end of your event sheet and use that and use MOD for timer functions.
    Want to learn Clickteam Fusion 2.5?




  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    May 2013
    Posts
    142
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Danny, good to know. I want something that measures actual time rather than the frame rate so I think the "timer" expression is the thing I'm looking for. Do you know if it carries on running if the app gets put into the background in iOS?

  6. #6
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    2,998
    Mentioned
    20 Post(s)
    Tagged
    2 Thread(s)
    Hey Coffee,

    It should do. You would have to check your app properties. I don't have the iOS exporter installed right now but I assume it has something similar to Android in the app properties: End application when not in foreground. This will ensure the app remains at least silently active in memory. I'm unsure whether the internal clock will still tick. You would have to test. However, there are always ways around this, if it doesn't work.

    For example, you could detect when the app is sent to background and timestamp, then timestamp upon resume and compare.
    Want to learn Clickteam Fusion 2.5?




  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    May 2013
    Posts
    142
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I appreciate the help.

Similar Threads

  1. Replies: 6
    Last Post: 18th August 2015, 02:23 AM
  2. "Bug" For Saving and Loading Frame Positions AND "Timer Glitch"?
    By Zarpo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 27th March 2012, 12:40 PM
  3. Beta4/SDK4.1: "Timer equals" not working for me
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 30th October 2010, 02:05 AM
  4. Recommended setting of "Timer-based Movements"
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 6th December 2009, 03:23 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
  •