does "wait" have dt?

Get help using Construct 2

Post » Tue Apr 12, 2016 8:43 pm

i believe its only behaviors that have dt built in ...

that being said, there is a clear divide in my office as to whether or not the wait action uses dt

so to clear this up ...
-does the wait action use dt?
-if not, should you use dt with it?

thanks for your help in this matter

-Rik
B
9
S
2
G
1
Posts: 17
Reputation: 669

Post » Tue Apr 12, 2016 9:20 pm

All behaviors use dt. Wait uses seconds as a base, so it is framerate independent by nature. You generally do not want to use dt with the wait x seconds action.

https://www.scirra.com/tutorials/67/del ... dependence
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Wed Apr 13, 2016 11:06 am

The question actually makes no sense: "wait" already works in units of time, not frames, so dt is irrelevant to it. It is outright wrong to use "dt" in any expressions that work with units of time, e.g. "Every X * dt seconds" is simply incorrect and actually breaks framerate independence.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Wed Apr 13, 2016 3:16 pm

THANK YOU !

i realize now the way i worded the question was weird... but the replies validated the point i was trying to make!

so again... thanks!!!!
B
9
S
2
G
1
Posts: 17
Reputation: 669

Post » Wed Apr 13, 2016 4:28 pm

That will still not guarantee that a 'in game time unit' is the same as a 'outside game (real) time unit'.
Or. A second in the game will usaly not be a second on your watch.
Time units in the game will be differend then those on the watch on your wrist when you use timescaling, but also in case of low frame rates.

In other words: when dt gets bigger, 'game time' will pass slower.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Apr 13, 2016 4:47 pm

It's not only framerate dependent.
Way worse are 'heavy ticks' / 'low detection rates' as @99Instances2Go has put it

So 1sec wait can be somewhere between 1sec and 3sec in real world

There is a whole thread Real World Time vs C2
timebug-or-missunderstanding_t170501?&hilit=bug

Here the example with just a big loop from 99Instances2Go
https://drive.google.com/open?id=0B1SSu ... UlLWWNqRnM

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Mon Apr 18, 2016 8:37 pm

@fm4fanAT & @99Instances2Go

you guys have captured the explanation i was unable to verbalize !

thanks for the input and the links... i will share with the team so a better understanding can be had by all

=Rik
B
9
S
2
G
1
Posts: 17
Reputation: 669


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests