Time rewind demo (like in Braid)

Post your Construct-made creations!

Post » Sat Apr 23, 2011 3:38 am

[quote="MrMiller":3e7ckkg0]I wonder if this can be adapted somehow to make a replay system for sports video games? I've never been able to figure out how to do that in Construct.[/quote:3e7ckkg0]

With the normaly array(like I used), I could do that.
With the S-plugin, I have to test it out how to manipulate the position of the arrys X index.
But yeah, why not :P.
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Sat Apr 23, 2011 3:46 am

[quote="zyblade":gjss551r]With the normaly array(like I used), I could do that.
With the S-plugin, I have to test it out how to manipulate the position of the arrys X index.
But yeah, why not :P.[/quote:gjss551r]

If you could do an example of a replay system that would be awesome.

No pressure though :D
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Sat Apr 23, 2011 4:06 am

The only thing i didn't figure out is, how to replay everything slowly.
Timescale is impossible, because it won't affect the replay at all.
I only could replay every 2nd frame. I'd call it "fake slowdown" lol.
Maybe someone has an idea or I will figure it out anytime soon.

Until then, I will make the replay system without a slowdown on the replays.

edit: I didn't mean every 2nd frame, that would be a fast forward :lol:
I mean replay every 0.5 frame...can't explain it in other words^^
But it won't look fluently.
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Sat Apr 23, 2011 4:02 pm

Heyyy Mr. Miller,

the good news is,
Tulamide explained me a few things so I know now everything
I need to know about the S plugin.

and the...good news is :lol:
I will now make a replay system.

So, no bad news today :mrgreen:
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Sat Apr 23, 2011 6:03 pm

I've made 3 simple changes to toralord's "Braid type warp"-demo and you now have a slow motion replay. I wouldn't recommend doing it this way in a full game (vectorizing the movements/angles would be the better approach), but as a tech demo it shows that it is relatively easy to get something working.

The changes:
Instead of inserting at index 0 in event 4, it is inserting at "end", which makes the reverse order a normal order again.
Instead of replaying on every tick, every x milliseconds is used with this formula[code:fvlmo5f4]1000 / (1 / TimeDelta) * 3[/code:fvlmo5f4]
This corresponds to the third change: As soon as the replay key is pressed, the timescale ist set to 1/3. This keeps the animations and movements smooth.

Just change both values at the same time if you want another replay speed. For example, to play at 25% speed, set
every x ms to 1000 / (1 / TimeDelta) * 4
and timescale to 1 / 4



Braid test slomo replay.cap
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Apr 23, 2011 6:24 pm

Still didn't look in the .cap, but it sounds awesome!
But how the timescale effect, affects the speed in replay?
I tried it one day, but of course, the speed I've recorded each value,
the same speed it's replaying^^. But I understand the timedelta thing :P
Maybe because your really big pm lol.
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Wed Apr 27, 2011 3:32 pm

So how is your replay example coming? I'm really anxious to see it :)
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Fri Apr 29, 2011 1:00 pm

Don't know what other people have said but I think I've already seen one of these :) not to sound rude but it was kinda like tutorial style anyways good work! Always good to see people make something with Construct
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Sat Aug 06, 2016 6:36 pm

Hi there. I really want to learn how to rewind time like in Braid. Can you please send me the capx file so I can see how it's done. I will even pay for it. Please. Thanks.
B
5
Posts: 1
Reputation: 229

Post » Tue Nov 15, 2016 9:59 am

@mattcoder23
I was inactive on these forum for a pretty long time.
Basically, you need to setup 2 events. You also need an array.

on X pressed ->
start ignore user input
set "rewind" to 1 (custom variable)
and
on X released->
stop ignoring user input
set "rewind" to 0

when "rewind" is set to 0, you could to use the arrays push function to fill in the characters X,Y, also vectorX and vectorY. Later on maybe also the animation state and Ismirrored y/n? etc...(all comma separated)

if "rewind" is 1, you set all those information, according to the players position x,y etc...use the tokenat function to read the comma separated data in that arrays first index. don't forget to "pop on front axis" on the array after that. so the next frame will read the next position vector etc...
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

PreviousNext

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 3 guests