User Tag List

Results 1 to 6 of 6

Thread: Measuring Time While My Game Isn't Running.

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    201
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Measuring Time While My Game Isn't Running.

    Hi, this is just a general question on how people go about this. Looking at a lot of recent apps they are 'idle' games which generate money/points etc while you aren't playing. So, what's the best practice in Fusion for doing something like this?

    The only way I could think is to get the device time itself, but then what are the security implications? What if my user changes the time on their device for example?

    With internet connection I could check against Google or something but what if I don't have a connection?

    I'd love to hear anyone's experience with this. I don't have a game in production doing this but it's crossed/crossing my mind

    Thanks

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    618
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Just mark the system time in an ini file when they quit, then when they start the game, take the current time and add the time between the quit time and the next start time.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    201
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Sure. But I guess they could 'cheat' by changing the clock on their system. Or is system time innaccessible on devices like Android or iOS?

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    618
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Obfuscate the Ini file so even if they changed it they wouldn't know what they were changing. Without the app running you can't take the time, if you loaded a secret second app to keep track it would be naughty and would have to go on again on restart of computer. You could compare internet time but you'd need a constant address you could ensure would always work forever. Would this be an internet only app that works only if connected?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module
    aa2953b4's Avatar
    Join Date
    Feb 2019
    Posts
    80
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You need to save two values to ini.

    Save: timestamp + md5(timestamp+secret password).

    When you load the time you need to check if the timestamp agrees with md5(timestamp+password) if so then the time has not been modified and you can use it.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    201
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Great Thanks. This protects the start time from modification in the code but I guess if my user can access the system time in some way then it doesn't really matter if the start time cant be changed because I could just set my end time to way off into the future. (And the difference will still be massive).

    Of course, if system time can't be changed on these devices then this is a non issue.

Similar Threads

  1. Time reversal in a constant-running scene
    By Corybander in forum Fusion 2.5
    Replies: 7
    Last Post: 2nd January 2017, 09:40 AM
  2. Replies: 7
    Last Post: 12th May 2013, 10:57 PM
  3. joystick input on multiple games running at the same time?
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th November 2012, 08:12 PM
  4. time/split time for racing game
    By ptiseigneur in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th September 2012, 06:05 PM
  5. Measuring the sound volume
    By Mantis in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th August 2007, 05:17 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
  •