How do I record player input to simulate it afterwards?

Get help using Construct 2

Post » Sat Apr 25, 2015 5:38 pm

Hello,
I'm making a platformer game where the player has to clear the level, and the next time he plays it, a new computer player appears that does exactly what he did last time.

What would be a good way to approach this? Record the time and input in an array and then simulate it? I'm not sure how to do this.
B
35
S
4
G
5
Posts: 84
Reputation: 4,860

Post » Sat Apr 25, 2015 5:55 pm

Recording player input and playing it back may work ok, but it will probably deviate and not be exactly like the original path of the player if the framerate isn't exactly the same. A better way would be to just record the position, animation and direction of the object each frame. Like this:
viewtopic.php?f=147&t=77587&p=639426&hilit=record#p639426
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Post » Sun Apr 26, 2015 2:33 am

That seems like a great idea! Thanks. I'll test it.
B
35
S
4
G
5
Posts: 84
Reputation: 4,860


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests