delta time issues

Get help using Construct 2

Post » Tue Oct 15, 2013 11:57 am

im having difficulty implementing this..

some questions, will it help frame rate in general ?

and just say i wrote some thing like "every 3 seconds: create this "

where would the "dt"go ?

Is it worth changing all my timing to this ?
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Tue Oct 15, 2013 1:19 pm

@railslave, dt does not help frame rate, but rather makes movements frame rate independent. Thus if you do sprite move 100*dt, it will move 100 pixels in a second, regardless of frame rate. The system calculates the dt appropriately to make sure you move 100 pixels in a second.

For create this every three seconds you do not need dt, as you are already frame rate independent and it will create the object every three seconds.

If you have not already read it, I found this tutorial very helpful.

https://www.scirra.com/tutorials/67/delta-time-and-framerate-independence

It is most likely good to include dt in your movement and angle calculations. Note that at very low frame rates your movements may become jerky as you move large distances per tick. For very static games, like memory matching it will probably not make a difference.
B
13
S
4
Posts: 67
Reputation: 1,270

Post » Tue Oct 15, 2013 2:10 pm

This is just a booby trap for new people.

Rather than having it so every movement is already on delta time, they make it so you need to add a special little formula to make your game actually work the same on every system. There is NO hint about this little secret unless you sift through the tutorial section and stumble across the delta time tutorial.

It is "broken by default" in my opinion.

They should make it cryptic and difficult to make things NOT delta time, not the other way around.

There a are quite a few little things like this. They make it so new people can see a working game in preview, yet when they export it it will be nearly non-functional on their clients machines.

In my opinion this is a form of "Bait then switch".
New user sees that their little project works in preview, so they buy C2.
Later they find out they were tricked, and their game is not playable on any system except the developers system in preview mode.

I lost almost a weeks worth of time trying to convert a finished game to use delta time. I ended up just abandoning the project because it would have been less time to just start over from scratch.

TL;DR

Do not attempt to make a game with C2 unless you read EVERY tutorial, Every Blog entry, and EVERY forum post. You might miss a cryptic little thing like this and your project may not be recoverable.

Do not even start a project unless you have tested every function you might need. You need to test in both preview and the exported game.

"The Obvious way", and "The easy way" are almost always wrong with C2.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Tue Oct 15, 2013 2:48 pm

[QUOTE=jojoe]
Rather than having it so every movement is already on delta time, they make it so you need to add a special little formula to make your game actually work the same on every system. There is NO hint about this little secret unless you sift through the tutorial section and stumble across the delta time tutorial.
[/QUOTE]

Every default behavior uses dt by design.
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Tue Oct 15, 2013 2:53 pm

[QUOTE=vee41] Every default behavior uses dt by design.[/QUOTE]

Here you go:
Tutorialk on delta time.

Be sure to read it all. especially this part:

[QUOTE]Use dt everywhere
Any time you move an object at a steady speed, you need to use dt in that way to achieve framerate independence. For example, Sprite's Move forward action takes a number of pixels to move the object forward. If you constantly move the object forwards, you could move it forward 60 * dt pixels to move it at 60 pixels per second at its current angle.
[/QUOTE]

Obviously it is not default. Especially when you are dealing with Physics.Only the Behaviours have Defaults like this.jojoe2013-10-15 14:58:02
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Tue Oct 15, 2013 2:56 pm

[QUOTE=jojoe] [QUOTE=vee41] Every default behavior uses dt by design.[/QUOTE]

Here you go:
Tutorialk on delta time.

Be sure to read it all. especially this part:

[QUOTE]Use dt everywhere
Any time you move an object at a steady speed, you need to use dt in that way to achieve framerate independence. For example, Sprite's Move forward action takes a number of pixels to move the object forward. If you constantly move the object forwards, you could move it forward 60 * dt pixels to move it at 60 pixels per second at its current angle.
[/QUOTE]

Obviously it is not default. Especially when you are dealing with Physics.[/QUOTE]

I'm well aware of that document. I said default behavior, move forward is standard sprite action, not a behavior. :)
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Tue Oct 15, 2013 2:56 pm

Also from the tutorial:

Don't forget behaviors already use dt (except with Physics where you must turn it on yourself). If you use behaviors to control all motion in your game, you don't have to worry about dt at all! However, most games have some event-controlled motion, and it's important to remember how to make it framerate independent.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Oct 15, 2013 2:59 pm

I was not talking about Behaviours. A well executed troll, My hats off to you.jojoe2013-10-15 15:00:53
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Tue Oct 15, 2013 3:02 pm

[QUOTE=jojoe] I was not talking about Behaviours. A well executed troll, My hats off to you.[/QUOTE]

Then I misunderstood this part: "Rather than having it so every movement is already on delta time, they make it so you need to add a special little formula to make your game actually work the same on every system. "

Did not understand the trolling part.
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Tue Oct 15, 2013 3:07 pm



http://knowyourmeme.com/memes/subcultures/trolling
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Next

Return to How do I....?

Who is online

Users browsing this forum: 25games, jatin1726, kiki4construct and 31 guests