[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Improving "ProQuake" Demo Record At Any Time

Improving "ProQuake" Demo Record At Any Time

Post tutorials on how to do certain tasks within game or engine code here.

Moderator: InsideQC Admins

Improving "ProQuake" Demo Record At Any Time

Postby Baker » Mon Jan 09, 2012 5:00 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby qbism » Fri Jan 13, 2012 5:47 pm

I didn't realize this was possible in Proquake. Proquake vs. Vanilla quake demo record- would it be easy to see the changes with a diff of cl_demo.c, or is it more elaborate than that?
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby Baker » Fri Jan 13, 2012 9:01 pm

It is pretty straightforward to implement, I'd diff ProQuake 3.50 ( source link ftp://ftp.runequake.com/quake/engines/p ... /3.50/src/ ) versus GLQuake.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby qbism » Sun Jul 15, 2012 3:59 am

Just got around to trying this, works almost out-of-the-box diffing with Proquake 3.50 cl_demo.c as Baker mentioned.

Now thinking about saving particle info as well. Will have to reverse-engineer color based on particle type (if possible) so it can be saved correctly. In svc_particle message the color number is encoded w/ particle type. Even if successful, svc_particle doesn't send remaining time information (or alpha for some engines). The temptation is to create a new svc_ command that sends an absolute particle snapshot.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby r00k » Sun Jul 15, 2012 6:55 am

qBISM UR ICON STILL SCARES ME.;)

Edit: Hmm, i went to look and Qrack has had this since v1.5 maybe sooner, though i do remember talking about this in the past...
Last edited by r00k on Mon Jul 16, 2012 4:58 pm, edited 2 times in total.
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Improving "ProQuake" Demo Record At Any Time

Postby mh » Sun Jul 15, 2012 12:49 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby qbism » Mon Jul 16, 2012 2:36 am

Last edited by qbism on Mon Jul 16, 2012 2:54 am, edited 2 times in total.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby Baker » Mon Jul 16, 2012 2:43 am

I hate to be a killjoy -- and please do not let this thought stop your experimentation because unconventional thought benefits us all ----

But savegames are supposed to be from the perspective of the server. The server doesn't have particles or temp entities or R_(anything) since R_(anything) is "render" (which isn't something the server ever does).

[Again ... at the same time, wouldn't it be nice if savegames preserved the entire world state, so kudos to your ideas .... I have some terribly unconventional ideas in this department myself ... not the particles department, but things like the server thinking about lighting and knowing lighting levels without the Quake2 hackery where the client sends it back to the server ... solar powered armor, monsters that ignore pitch black players, players entirely in shadows not getting sent to the client, etc. ]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby qbism » Mon Jul 16, 2012 2:50 am

This is still only for demo recording at this point, rather than savegames. Yeah, savegames would involve another insane layer including clients sending their individual particle states up to the server.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby Spike » Mon Jul 16, 2012 4:49 am

its really not worth it.
1: you loose demo compatibility. different engines can have wildly different particle systems, so don't expect any sane workarounds for that.
2: doesn't help multiplayer at all. different clients still get different particle patterns.
3: 1/8th qu precision probably isn't enough for tight bunches of particles.
4: console tends to cover up everything when starting playback, so you miss the first halfsecond anyway.

if you're trying to capture a good bit of action, it would be best to write the data to memory even when not actually dumping to disk, so when you actually start recording you can rewind a bit and actually record the action that the user wanted to record, instead of only the parts after it.
you can keep whatever particle log active for a little longer.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Improving "ProQuake" Demo Record At Any Time

Postby qbism » Mon Jul 16, 2012 5:53 am

User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby taniwha » Mon Jul 16, 2012 7:48 am

The way it's always done: with a ring-buffer that stores X number of packets. Packets are stuffed into the head of the buffer, and read out of the tail. For this particular case, when not actually recording, when the buffer is full, packets are discarded from the tail.
Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby qbism » Mon Jul 16, 2012 5:08 pm

User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Improving "ProQuake" Demo Record At Any Time

Postby Spike » Mon Jul 16, 2012 7:15 pm

yes, there's a catch. if you have any large state info that can get destroyed/replaced (like stats) you need to provide some way to restore them to what they are at the start of the log, rather than just dumping whatever the client currently has and hope that it hasn't changed.
doing this with quakeworld is much messier with its state-based delta compression.
you can generate a keyframe every second or so if there's a lot of data, though if its just NQ's stats most of it is repeated anyway, memory usage probably allows you to just dump out a copy of that data each frame.
obviously, you'd not be able to rewind over an svc_serverdata. flush the log when you get such a message. perhaps also for static entities/sounds too. baselines shouldn't generate extra data, and shouldn't be changed mid-game so should be safe to rewind over (on account of that baseline not existing and thus not being relevent before).

5 secs is probably enough, 10 secs would be great.
if you've got enough memory, you could even try and record an entire match. a 30-min 4v4 (quakeworld) demo comes out as only 15mb.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Improving "ProQuake" Demo Record At Any Time

Postby taniwha » Mon Jul 16, 2012 9:59 pm

Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Next

Return to Programming Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest