As a quake modder, I was thrilled as to learn a few years back that popular quake engines would finally get a client-side counterpart to the server-based game VM (progs.dat). Client-Side QuakeC (CSQC) has become the sine qua non of modern quake total conversions such as Nexuiz and Steel Storm. However, its implementation remains divided between the two major engines supporting it - FTE and Darkplaces (DP). The incompatibility of CSQC csprogs.dat between these two engines has caused confusion in the community as to the proper way to implement it, leading to many people giving up on the idea of client-side mods altogether.
At the behest of LordHavoc, I am creating a thread here to discuss and iron out the differences - and hopefully create some semblance of a standard - for CSQC implementation in FTE, DP, and any future project supporting such.
It is the aim of this thread to point out differences in the implementation of CSQC which lead to conflict across engines. This thread is not here to point fingers at anybody or to play the blame game. I believe, with some discussion and cooperation, we can revive CSQC and regain the community's interest in the medium.
Although this might fall under the purview of Urre's Quake Standards Base project, I feel that CSQC deserves a consideration of its own. Listed below are some of the differences that I have noted in my CSQC modding. I urge the rest of the community to post any other differences which you may have encountered. Please also let me know if there are any changes that have now fixed or resolved the incompatibilities/inconsistencies listed below:
(this post will be updated periodically..)
trailparticles (ext 336) arguments inconsistent
in FTE:
wrapper used:
//DP got the arguments the wrong way around...
void(entity ent, float effectnum, vector start, vector end) trailparticles_dp = #336; // (EXT_CSQC),
void(float effectnum, entity ent, vector start, vector end) trailparticles =
{
trailparticles_dp(ent, effectnum, start, end);
};
project (ext 311) and unproject (ext 310) are incompatible
in FTE:
(un)project(vector v): v_z is inferred from farclip (1.0)
in DP:
(un)project(vector v): v_z distance must be specified
CSQC_InputEvent does not pick up mouse movements
in FTE:
Mouse movement is handled in CSQC_InputEvent through
Code: Select all
if (eventtype == 2) {}If I want CSQC_InputEvent to handle mouse inputs, it must be called with a wrapper after renderscene(), IE:
Code: Select all
mousemoves = getmousepos();
if (mousemoves)
CSQC_InputEvent( 2, mousemoves_x, mousemoves_y );
in FTE:
Must utilize deltalisten() to ascertain player's position
in DP:
pmove_org is set to player origin
drawstring (extension 321)
in FTE:
void(vector position, string text, vector scale, vector rgb, float alpha, ...) drawrawstring = #321;
in DP:
void(vector pos, string text, vector sizee, vector rgb, float alphaa, float flags) drawstring_dp = #321;
drawpic (extension 322)
in FTE:
void(vector position, string pic, vector size, vector rgb, float alpha, ...) drawpic = #322;
in DP:
void(vector pos, string picname, vector sizee, vector rgb, float alphaa, float flags) drawpic_dp = #322;
CSQC over QW protocol
This is a bit of a nit-pick, but as there has been an increase in DP users among the QuakeWorld (QW) community, this has become somewhat more pertinent.
in FTE:
CSQC progs loaded on both NQ (regular quake) and QW (QuakeWorld) servers
in DP:
CSQC progs only works on NQ servers