Page 1 of 1

No CSQC in demo playback

Posted: Sat May 31, 2014 3:26 pm
by frag.machine
So I was recording a new video for my WIP isometric view RPG thingie when I suddenly noticed that my CSQC HUD wasn't visible during demo playback. :?
Is there any way to fix/overcome that ? I am using Darkplaces, BTW.

Re: No CSQC in demo playback

Posted: Sat May 31, 2014 8:27 pm
by Max_Salivan
maybe do something with this

Code: Select all

float() isdemo = #349;
       Returns true if playing a demo.

Re: No CSQC in demo playback

Posted: Sat May 31, 2014 11:03 pm
by Supa
Which version of Darkplaces are you using? It should roll the csprogs into the demo so that it can display in the first place, and given that I've recorded multiple videos involving CSQC HUDs I'd be worried if it broke recently.

Re: No CSQC in demo playback

Posted: Sun Jun 01, 2014 1:47 am
by frag.machine
@Max_Salivan: not sure if I got it. How am I supposed to use this isdemo() builtin during demo playback ?

@Supa: I am using darkplacesengine20140507.

This is weird, because after posting I realized that CSQC actually seems to run during demo playback, but only stuff printed with drawstring() is rendered.
I have some code using drawpic() but this just renders during normal gameplay.
I thought this could be because I wasn't calling precache_pic () during CSQC_Init(), but this didn't work either.

/me reads the whole HUD code again
Hmm... I am using CSQC_InputEvent() to toggle the inventory on/off (using the key "I").
Thus, makes sense if the inventory don't show up during playback (the key press isn't captured by the demo).

/me runs the demo and hits the "I" key; inventory magically appears!

Well...
Image

:)

Re: No CSQC in demo playback

Posted: Sun Jun 01, 2014 4:30 pm
by goldenboy
So I guess to get CSQC GUIs working in demos, one would need to send every input event to the server, then have the server poke csqc via multicast() or whatever the Darkplaces equivalent is to run the code that was meant to get triggered by that input event.

A roundtrip.

Or is there an easier way?

Re: No CSQC in demo playback

Posted: Sun Jun 01, 2014 10:35 pm
by leileilol
Engineside, implementing a non-required accompanying clientdemo format which runs the CSQC code (but leaves out the file functions)?

Re: No CSQC in demo playback

Posted: Mon Jun 02, 2014 4:04 am
by Spike
do the roundtrip as a stat or something, and only use it if isdemo(). give up on mouse cursor positions.
I guess the engine could provide an 'onplayback(string command)' builtin or something, but meh...

Re: No CSQC in demo playback

Posted: Mon Jun 02, 2014 6:02 pm
by goldenboy
Before you spend any time writing some builtin for that, just disable the console unless in developer mode. Let people use FRAPS. Problem solved.

The only thing demos are useful for is playtesting, IMO.

Re: No CSQC in demo playback

Posted: Mon Jun 02, 2014 6:13 pm
by Spike
and quake-done-quick... a mapper's nightmare. :P

Re: No CSQC in demo playback

Posted: Tue Jun 03, 2014 8:27 am
by Spirit
And intro videos and cutscenes.

Re: No CSQC in demo playback

Posted: Tue Jun 03, 2014 10:49 am
by Spike
I'm not sure how its useful for random uis to appear during intros and cutscenes... If really needed you could always just temporarily add a stuffcmd in the ssqc for when it was recorded.

Re: No CSQC in demo playback

Posted: Tue Jun 03, 2014 11:25 am
by frag.machine
IMHO at least in the case of UI's I don't see the point in changes, I solved my problem just hitting the keys when required during playback. However, since CSQC is advertised as complete enough to one even implement a full game using only it, it's a bit disappointing to find out client side events are completely ignored by demos. I'd consider the possibility of recording such events (if a game is using CSQC the author is already willing to break compatibility anyway).

Re: No CSQC in demo playback

Posted: Tue Jun 03, 2014 5:44 pm
by ceriux
i personally would rather just get a little more creative with my demos. maybe disable ALL hud and everything during the demo and do some kind of atmospheric scene similar to half-life 2.

Re: No CSQC in demo playback

Posted: Tue Jun 03, 2014 11:57 pm
by frag.machine
@ceriux: the main objective behind the video was show off a CSQC HUD... :)

Re: No CSQC in demo playback

Posted: Thu Jun 05, 2014 4:21 am
by ceriux
oh , oh well then. i personally agree though the csqc replace what you see in a demo.