User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: [Request] TimerDelta

  1. #1
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    [Request] TimerDelta

    If you've read this thread you know that Clickteam implemented Timer based movement. It would be very nice if we could take advantage of this with our own custom movements.
    To do this we need to calculate the time passed since the previous loop. Of course Clickteam already does this, and François just told me the relevant bit. The value to get is:
    Code:
    rhPtr->rhTimerDelta;
    So my request is pretty simple. Could an extension developer be kind enough to write a very quick extension? It only needs to return the one expression above.
    Clickteam will most probably implement this via a new system expression in a future build. So the use of the extension will be temporary.

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Location
    Stockholm, Sweden
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    rhPtr with an H? I have to be honest and say that I've never seen that variable! :I

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    It is probably a pointer to runtime Headerobject. I think you can access it by: rdPtr->rHo

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    Norway
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    http://hypothermia-game.com/rhTimerDelta.zip there you go.. havnt tested it
    Jean Villy Edberg

  5. #5
    No Products Registered

    Join Date
    May 2008
    Location
    California
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    Aww you beat me to it :P

  6. #6
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: [Request] TimerDelta

    Thank you very very much Villy. I've made some tests and the extension seems to be working great. But I get approximately the same result than 1000.0 / FrameRate.
    So I wonder if using one or the other (to factor speed) makes any difference?

    Anyway I really appreciate your help Villy.

  7. #7
    Clicker Multimedia Fusion 2
    dragonguy's Avatar
    Join Date
    Apr 2008
    Location
    RULE BRITANNIA!
    Posts
    3,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    Doesn't the mathematical operator 'delta' mean difference? for example: 12.54 delta 8.76 = 3.78, so what doe's timerdelta do?

  8. #8
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    If you read the original post (which I highly doubt from your track record),

    To do this we need to calculate the time passed since the previous loop.
    Therefore, it is the difference in time between the last loop and the current loop.

  9. #9
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Location
    Stockholm, Sweden
    Posts
    1,529
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    Quote Originally Posted by Werbad
    It is probably a pointer to runtime Headerobject. I think you can access it by: rdPtr->rHo
    Yep, true AFAIK. But rHo is not a pointer to the runtime header thought, so you access its member with the '.' operator.

  10. #10
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeċ, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] TimerDelta

    not sure what you meant by that, but rdPtr is a pointer ot the rundata structure and thus it's members are accessed with '->'
    the rHo is not a pointer and thus it's members is accessed with '.'

    fprh rhPtr = rdPtr->rHo.hoAdRunHeader;

Page 1 of 2 1 2 LastLast

Posting Permissions

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