TimeDelta regardless TimeScale by Profiler object

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • download the .cap file

    I needed a way to move something by time when game paused by adjusting timescale to 0, and I found the way to do it, by using profile object.

    Questions::

    1) Is it a correct way to do it?

    2) Are there better ways?

    3) What retrieves from 'GetTicks' by Profiler object? I cant' understand it.

    <img src="http://img23.imageshack.us/img23/8677/20130214121758construct.png" border="0">

    <img src="http://img802.imageshack.us/img802/7010/20130214120206applicati.png" border="0">

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Questions::

    1) Is it a correct way to do it?

    2) Are there better ways?

    3) What retrieves from 'GetTicks' by Profiler object? I cant' understand it.1) In cases like these there is no correct or wrong way. See it like this: If it works, it's just fine.

    But to satisfy your curiosity, the profiler was designed to measure the processor load of events.

    2) No. There are other ways, but they aren't better. For example, in "Verve!" I used a custom deltatime calculated from the deltatimes before (while timescale was 1.0). The great disadvantage of such a method is that you don't work with the current, the real, deltatime, but with an average that is not very accurate per tick.

    3) As I said in 1), the profiler was designed to measure the processor load of events. This would be a typical use of it:

    +

    -> Begin profiling

    + For "" from 1 to 10000

    -> Add 1 to global('just_some_variable')

    +

    -> End profiling

    -> Set text to Profiler.GetSeconds

    The "ticks" should not be confused with Construct's ticks. They are better known as clock cycles per instruction (or the summary of all instructions in this case). You may want to read more about it here

  • er... headache...

    tulamide thank you for kind answer. :D

    It was not an tick I thought. ha.. Recently I read some book about cpu, and that includes information about it. I confused absolutely.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)