"Killcam" like feature?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
lelSkrub
Prole
Posts: 6
Joined: Fri Jan 09, 2015 2:27 am

"Killcam" like feature?

Post 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]
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: "Killcam" like feature?

Post 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"

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: "Killcam" like feature?

Post 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
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: "Killcam" like feature?

Post 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.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: "Killcam" like feature?

Post by adrix89 »

Record all actions, be deterministic, replay.
I use Workflowy but you can check out Dynalist as its the better offer.
Muris
Party member
Posts: 131
Joined: Fri May 23, 2014 9:18 am

Re: "Killcam" like feature?

Post 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.
lelSkrub
Prole
Posts: 6
Joined: Fri Jan 09, 2015 2:27 am

Re: "Killcam" like feature?

Post 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
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 1 guest