C2 games and 120hz monitors (*dt problem?)

Discussion and feedback on Construct 2

Post » Tue Jan 27, 2015 5:58 am

Aurel wrote:I don't know if it makes sense, but here's a sincere feedback from a regular C2 user who sucks at math.
The dt guide is very well written, and when you read it, you think(*dt) you understand it. I've read it, I don't know, maybe 50 or 60 times.
But when you have to write tons of events, it would be so nice to have charts you can quickly reference to. Here on the forum, or even better inside C2.
Something like this:

lerp to an angle, use this:
lerp to a position, use this:
lerp to speed, use this:
lerip to scale, use this:
lerp to variable value, use this:
every tick events: don't use if this and this. Use if this and this.
every X second: don't use.

I must sound super lazy to most of you, and I definitely understand this, but for average users it would be a freaking life saver.


Yeah have to agree!
After reading this thread several times, the dt guide a dozen times, and Ashley's latest blog that arose from this thread several times, I now have this fuzzy feeling in my head and a real lack of confidence with both lerp and dt.

All I know is that lerp gives nice smooth movement effect, and that dt is required for a game to be frame rate independant.

But as to how, when, and even if they should be combined, well I would say the general target audience of C2 should just not use it.

Hehe I reckon this is pobably the most confusing thread I have read on these forums.

Really wish I paid more attention to math at school now....
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
34
S
12
G
7
Posts: 356
Reputation: 7,144

Post » Tue Jan 27, 2015 6:24 am

michael wrote:
Aurel wrote:I don't know if it makes sense, but here's a sincere feedback from a regular C2 user who sucks at math.
The dt guide is very well written, and when you read it, you think(*dt) you understand it. I've read it, I don't know, maybe 50 or 60 times.
But when you have to write tons of events, it would be so nice to have charts you can quickly reference to. Here on the forum, or even better inside C2.
Something like this:

lerp to an angle, use this:
lerp to a position, use this:
lerp to speed, use this:
lerip to scale, use this:
lerp to variable value, use this:
every tick events: don't use if this and this. Use if this and this.
every X second: don't use.

I must sound super lazy to most of you, and I definitely understand this, but for average users it would be a freaking life saver.


Yeah have to agree!
After reading this thread several times, the dt guide a dozen times, and Ashley's latest blog that arose from this thread several times, I now have this fuzzy feeling in my head and a real lack of confidence with both lerp and dt.

All I know is that lerp gives nice smooth movement effect, and that dt is required for a game to be frame rate independant.

But as to how, when, and even if they should be combined, well I would say the general target audience of C2 should just not use it.

Hehe I reckon this is pobably the most confusing thread I have read on these forums.

Really wish I paid more attention to math at school now....


the smooth movement of lerp comes from an unusual use of it, so indeed it is not easy to think it right, as this use of lerp is already kind of weird (tbh, most people hère I have seen using it just thinks it "looks good, not sure why but I will keep it"), I can understand that ashley gives the "good formula" for people to fix their games, but that does not mean it is a good idea, I would rather see an exponential like interpolation being added.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Tue Jan 27, 2015 8:03 am

Aphrodite wrote:I would rather see an exponential like interpolation being added.


Yes! I remain perplexed that c2 doesn't contain a native set of tweening functions / behaviour.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Post » Tue Jan 27, 2015 1:41 pm

Aurel wrote:But when you have to write tons of events, it would be so nice to have charts you can quickly reference to. Here on the forum, or even better inside C2.
Something like this:

lerp to an angle, use this:
lerp to a position, use this:
lerp to speed, use this:
lerip to scale, use this:
lerp to variable value, use this:
every tick events: don't use if this and this. Use if this and this.
every X second: don't use.


If you're rotating, moving, accelerating or basically anything else, the answer is just add s * dt. "Every X seconds" is already framerate independent because it measures time, not frames, but people often get confused about it so the original delta-time tutorial specifically covers it.

Lerp is kind of a special case so I added it to the tutorial. I think that basically covers everything?
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Tue Jan 27, 2015 4:35 pm

Pretty cool : )
Thanks a lot, Ashley! Very helpful : )
Image | @AurelRegard on twitter
B
19
S
6
G
1
Posts: 307
Reputation: 2,500

Post » Tue Jan 27, 2015 5:28 pm

@Ashley

s * dt


That would like "value + s * dt" right? I just want to be sure without a doubt
If we used say, bullet behaviour or platform behaviour. Do we need to make events to add dt to the behaviour values or are they already incorporated?
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Tue Jan 27, 2015 9:03 pm

@Nesteris

Nesteris wrote:
s * dt


That would like "value + s * dt" right? I just want to be sure without a doubt
If we used say, bullet behaviour or platform behaviour. Do we need to make events to add dt to the behaviour values or are they already incorporated?


It seems from the updated tutorial that all behaviors already use dt. Except for the physics behavior.
Image Image Image
B
61
S
19
G
6
Posts: 325
Reputation: 7,944

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests