New Construct broke my super speed :(

For questions about using Classic.

Post » Sun Nov 16, 2008 8:00 am

Here's a slightly revised version of my super speed example that i posted ages ago

[url:3adibh0x]http://www.mediafire.com/?nq2zmenzncm[/url:3adibh0x]

I always had a problem with it using motion blur, where if the player was moving when you slow time down, the player would move REALLY fast, basically as fast as he would be going if time wasn't slowed down.

Now with the new timedelta change, almost the opposite happens, regardless of motion blur, at the end of the slow down, he still kinda jumps a bit, but as soon as you start returning to normal timescale (i made the game ease in and out of slow time rather than just change the speed instantly), the player goes the speed he was going when the timescale was really slow, which is REALLY FAST. For the example's sake, i only made the player move 100 times faster, but if you change the TimeScaleTarget variable in the 'start of layout' to like 0.000001, try it out and watch the craziness.

If I haven't fully explained how this works, basically, the game speeds the player up the same ratio that timescale slows the game down, giving the appearance that the player is still moving normal speed while everything else slows down. Still rather buggy now.
Anyone know a better way to do this? Or can this be fixed due to my bad coding?
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sun Nov 16, 2008 12:43 pm

The only difference this build is that 'Set Timescale' immediately affects the value returned by 'TimeDelta', as opposed to only taking effect next tick. This is actually really useful, because you can set timescale to 0 to pause, and still have timedelta'd scrolling around and such. However, it means the place you set the timescale is important. Because you have events involving timedelta following the set timescale action, those will all be affected immediately.

So all you need to do is move your 'Set timescale' action to the end. Either move the event down to the bottom of the list, or add a deferred change (I set another global variable 'TimeScaleToSet' instead of setting the timescale, then at the end of the events list, always set the timescale to 'TimeScaleToSet').
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Sun Nov 16, 2008 2:05 pm

Yay thanks you fixed it :)
I still don't quite understand the timedelta scrolling thing you mentioned, but any improvment on construct is good news
B
3
S
2
G
5
Posts: 351
Reputation: 2,377


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests