Page 1 of 1

"Killcam" like feature?

Posted: Fri Jan 09, 2015 6:48 pm
by lelSkrub
Hi, i was wondering if replaying the death of a player about 1 second before was possible at all?
Basically Like this xD [youtube]https://www.youtube.com/watch?v=4EV2Xf1ws0w[/youtube]

Re: "Killcam" like feature?

Posted: Fri Jan 09, 2015 8:16 pm
by s-ol
lelSkrub wrote:Hi, i was wondering if replaying the death of a player about 1 second before was possible at all?
Basically Like this xD [youtube]https://www.youtube.com/watch?v=4EV2Xf1ws0w[/youtube]
Of course its possible, you write the game. You just need to do it. This is entirely up to the programmer.

Every damn "Can löve be used to...?" question I have seen asked boils down to "yes, you can. Whether it's a good idea is another question, as is how"

In this case the two other answers are "Might be" and "save the last second somehow"

Re: "Killcam" like feature?

Posted: Sat Jan 10, 2015 3:59 am
by veethree

For future reference, For the youtube tag to work you give it the ID of the video not the URL.
https://www.youtube.com/watch?v=4EV2Xf1ws0w

Re: "Killcam" like feature?

Posted: Sat Jan 10, 2015 5:27 am
by Jeeper
To answer your question, yes it is possible. You need to store information such as player coordinates and other variables and then when the player dies you use this information to recreate the death again.

Re: "Killcam" like feature?

Posted: Sat Jan 10, 2015 7:36 am
by adrix89
Record all actions, be deterministic, replay.

Re: "Killcam" like feature?

Posted: Sat Jan 10, 2015 11:56 am
by Muris
I think something like using games state as immutable object would help long way. Just creating new table every time you need to change the state, although this might cause some performance / memory issues. Then just keeping a stack of old states and playing through the stack for replay.

The memory issue could probably be covered partially by using circular queues, but varying fps might cause some oddities to lenght needed for the circular queue.

Re: "Killcam" like feature?

Posted: Mon Jan 12, 2015 11:57 pm
by lelSkrub
Thanks. Lol maybe it is a little advance for me to try atm.

And sorry about the youtube video! that was one of my first posts, I am still learning the etiquitte