No CSQC in demo playback

Discuss CSQC related programming.
Post Reply
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

No CSQC in demo playback

Post 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.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Max_Salivan
Posts: 96
Joined: Thu Dec 15, 2011 1:00 pm

Re: No CSQC in demo playback

Post by Max_Salivan »

maybe do something with this

Code: Select all

float() isdemo = #349;
       Returns true if playing a demo.
Sorry for my english :)
Supa
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Re: No CSQC in demo playback

Post 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.
aut viam inveniam aut faciam
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: No CSQC in demo playback

Post 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

:)
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: No CSQC in demo playback

Post 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?
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: No CSQC in demo playback

Post by leileilol »

Engineside, implementing a non-required accompanying clientdemo format which runs the CSQC code (but leaves out the file functions)?
i should not be here
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: No CSQC in demo playback

Post 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...
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: No CSQC in demo playback

Post 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.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: No CSQC in demo playback

Post by Spike »

and quake-done-quick... a mapper's nightmare. :P
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Re: No CSQC in demo playback

Post by Spirit »

And intro videos and cutscenes.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: No CSQC in demo playback

Post 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.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: No CSQC in demo playback

Post 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).
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: No CSQC in demo playback

Post 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.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: No CSQC in demo playback

Post by frag.machine »

@ceriux: the main objective behind the video was show off a CSQC HUD... :)
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: No CSQC in demo playback

Post by ceriux »

oh , oh well then. i personally agree though the csqc replace what you see in a demo.
Post Reply