slo mo replays?
Moderator: InsideQC Admins
16 posts
• Page 1 of 2 • 1, 2
slo mo replays?
Is it possible, in Quake C, to show a slow motion replay of how you got killed? It would play after you died and it could show the last couple of seconds before you got killed?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
Impossible. Unless if you modify the engine, but it's another story, because of different language than QC.
To do that I'd imagine "time traveling" in QC messing around with 'time'. But even in the virtual world you can't get back or forward into time, just "fake time traveling", but then it doesn't use replays.
So, unfortunately, it's impossible. It's only possible to make the whole server slow-motin by using host_framerate 0.001 or so, but this will affect all players at once.
BUT, just do a little test yourself, create an impulse command with just one line in it: (time = time - 5; ) without parenthesis. See what happens. I guess the game will crash... But I'm without enough time to test...
To do that I'd imagine "time traveling" in QC messing around with 'time'. But even in the virtual world you can't get back or forward into time, just "fake time traveling", but then it doesn't use replays.
So, unfortunately, it's impossible. It's only possible to make the whole server slow-motin by using host_framerate 0.001 or so, but this will affect all players at once.
BUT, just do a little test yourself, create an impulse command with just one line in it: (time = time - 5; ) without parenthesis. See what happens. I guess the game will crash... But I'm without enough time to test...
-

Orion - Posts: 476
- Joined: Fri Jan 12, 2007 6:32 pm
- Location: Brazil
The client would need to store the last N updates (where N = number of frames sent in the last 3 seconds or so) and replay it in slow motion.
Something that may be easier to do is to move the dead player camera to focus on the killer, pretty much like in TF2 when you get dominated by someone. But even that need some engine support.
Something that may be easier to do is to move the dead player camera to focus on the killer, pretty much like in TF2 when you get dominated by someone. But even that need some engine support.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
gnounc wrote:Modifying the engine to constantly record 10 seconds of demotime and overwrite that same 10 seconds constantly to have a replay I think would be the best way to go about it.
But I'm not really the person to ask.
Yeah, that sounds about right except... the constant recording of demos every 10 seconds would probably lag the game.
I'm not sure how fast it is to start recording a demo, but what if there was some sort of death prediction that would start a demo just before the kill shot?
Good God! You shot my leg off!
-

Junrall - Posts: 191
- Joined: Mon Sep 21, 2009 12:27 am
- Location: North West Oregon, USA
You're getting colder. Always recording a demo is the right way to go, in can be optimized. That's what sports games do. But you'd be crazy to do it in Quake... unless you REALLY want that feature.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
As mentioned before, this couldn't really be done from QuakeC, however, it seems that with minor engine modifications, it would be possible.
As Quake already has robust demo recording facilities, the basic capability to implement such a system already exists. What would be needed is a way to trigger demo playback from QuakeC when the player died.
In a traditional single player game, I believe this would actually quite simple as on death, the level's state is reset, so it can be abandoned and (the appropriate portion of) the demo simply run.
In a multiplayer game (or one with bots, such that it emulates multiplayer), things get more complicated. As the game must continue running (for the other actors) while the demo is being played. This would require that the playback be handled mostly independently by the client.
On a purely theoretical level, I think it could be possible using client side QuakeC. The way this would work is to have the CSQC record it's own "demo" and then, when the player died, replay the relevant portions. However, the complexity of building such a system would probably make it impractical to actually implement.
As Quake already has robust demo recording facilities, the basic capability to implement such a system already exists. What would be needed is a way to trigger demo playback from QuakeC when the player died.
In a traditional single player game, I believe this would actually quite simple as on death, the level's state is reset, so it can be abandoned and (the appropriate portion of) the demo simply run.
In a multiplayer game (or one with bots, such that it emulates multiplayer), things get more complicated. As the game must continue running (for the other actors) while the demo is being played. This would require that the playback be handled mostly independently by the client.
On a purely theoretical level, I think it could be possible using client side QuakeC. The way this would work is to have the CSQC record it's own "demo" and then, when the player died, replay the relevant portions. However, the complexity of building such a system would probably make it impractical to actually implement.
- Karatorian
- Posts: 31
- Joined: Tue Aug 17, 2010 4:26 am
- Location: Rindge, NH, USA
csqc can do everything... whether its sane to do everything or not is a different matter... yeah... good luck with that... rofl.
Doing it with engine code is a _far_ more sane way. imho csqc is a hinderance in this regard rather than a help.
The main issue when recording 10-second demos is with delta compression. You'd need to record a potential extra 5 seconds and generate keyframes every 5, or something. Having said that, NQ protocols don't really use delta compression anyway (only a baseline). That applies whether you're trying to record in csqc or in c code.
Doing it with engine code is a _far_ more sane way. imho csqc is a hinderance in this regard rather than a help.
The main issue when recording 10-second demos is with delta compression. You'd need to record a potential extra 5 seconds and generate keyframes every 5, or something. Having said that, NQ protocols don't really use delta compression anyway (only a baseline). That applies whether you're trying to record in csqc or in c code.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
This might be 1/4 offtopic but what if slow motion would initiate at the moment of death? That's what I did in my ChipQuake. The moment your health reaches 0, camera turns to 3rd person view and slow motion is activated. Looks a bit Jedi Outcast-ish.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
Chip wrote:This might be 1/4 offtopic but what if slow motion would initiate at the moment of death? That's what I did in my ChipQuake. The moment your health reaches 0, camera turns to 3rd person view and slow motion is activated. Looks a bit Jedi Outcast-ish.
Prototype used this effect, too. And can be easily done using QuakeC.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
This might be 1/4 offtopic but what if slow motion would initiate at the moment of death? That's what I did in my ChipQuake. The moment your health reaches 0, camera turns to 3rd person view and slow motion is activated. Looks a bit Jedi Outcast-ish.
This sounds like a pretty good compromise. How many frames are there though after health hits zero? Can't be too many. I guess it depends on the animation?
Where can I get this ChipQuake?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
there are none, if you were gibbed. :)
Many engines have a 'slowmo' cvar. You can set that cvar in order to slow the game down upon death. Don't forget to speed it up again after the player has died (note: will annoy people in multiplayer).
Many engines have a 'slowmo' cvar. You can set that cvar in order to slow the game down upon death. Don't forget to speed it up again after the player has died (note: will annoy people in multiplayer).
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Spike wrote:there are none, if you were gibbed.
Many engines have a 'slowmo' cvar. You can set that cvar in order to slow the game down upon death. Don't forget to speed it up again after the player has died (note: will annoy people in multiplayer).
Good point, this can be acceptable if rare (for example, in the last kill due fraglimit/timelimit is reached), but people will soon ask to disable it if happens all the time.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
redrum wrote:This might be 1/4 offtopic but what if slow motion would initiate at the moment of death? That's what I did in my ChipQuake. The moment your health reaches 0, camera turns to 3rd person view and slow motion is activated. Looks a bit Jedi Outcast-ish.
This sounds like a pretty good compromise. How many frames are there though after health hits zero? Can't be too many. I guess it depends on the animation?
Where can I get this ChipQuake?
Most death animations has at least 9 frames. If you slow down only 50% this becomes almost 2 seconds, which sounds reasonable (more than that becomes annoying).
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
