Forum

Pure CSQC

Discuss CSQC related programming.

Moderator: InsideQC Admins

Pure CSQC

Postby Spike » Mon Oct 13, 2014 10:51 pm

What is Pure CSQC?
As a general term, it would be running quake using purely csqc. No ssqc, no menuqc either.

Here's a quick mod I hacked up (it REQUIRES an updated version of fte):
http://triptohell.info/moodles/junk/purecsqc.zip

Note that its by no means complete. Frankly I'm too lazy to bother myself. Read the included readme for a list of the stuff that I can think of that is missing. There'll likely be other things that I forgot about completely.
Note that multiplayer is not supported with this in any way.
It has not been tested in DP at all. DP lacks key functionality that this mod depends upon. As a result, there has been no consideration for DP compatibility at all. You may be able to emulate enough parts with a stripped down ssqc, but this would defeat the point of this concept mod.

My personal interest in this is as a test case, but other people will likely find other uses for it.
It might help a few people become more familiar with [FTE's dialect of] csqc. If this helps stop the unfounded paranoia, then hurrah.
I took the liberty of throwing in some really basic menus, just to make a point. These may find their way into other mods, once fleshed out a bit. If nothing else, its something for people to learn from maybe.
It includes a hud through necessity which was a quick hack of a previous one I had. It naturally lacks any stat use though, so how useful that is for a regular non-pure csqc mod is debatable.
The csqc parts are pretty much sepearate from the ex-ssqc parts. This theoretically means that you can easily take an existing ssqc mod, insert the extra code, and you're away. However, as its not a complete reimplementation of a quake server, and not everything will work as-is (only vanilla qc has any kind of guarentee... or expectation rather). Really it depends on what hacks or extensions the mod in question uses. It should be possible to hack pretty much any mod about a bit so that it works as pure csqc (other than deathmatch ones anyway), but emulation is often not the most practical way to achieve that.
Spike
 
Posts: 2884
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Pure CSQC

Postby ceriux » Wed Oct 15, 2014 8:08 pm

really cool, thanks spike. unfortunately i dont have a computer right now that can even handle fte -.-
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Pure CSQC

Postby toneddu2000 » Fri Oct 17, 2014 11:03 am

Thanks Spike for sharing this. I've always wanted in these months (but not free time to do it) to dig the "client only" side of fte. I compiled with your fteqccgui and it compiles ok. With my win32-fteqccgui.exe (probably downloaded 2 months ago) it throws this exception:
Code: Select all
Source file: progs.src
outputfile: ../csprogs.dat
compiling csapi.qc
compiling defs.qc
compiling csdefs.qc
in function WriteByte (line 55),
csdefs.qc:57: error: expected ), found .

************ ERROR ************
Errors have occured

Error in csdefs.qc on line 210


The line incriminated is
Code: Select all
if (svclen == (float)svcdata.length)

I
'll post more on this day of what I understood from this release. Thanks again for this code!
toneddu2000
 
Posts: 1329
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pure CSQC

Postby Spike » Fri Oct 17, 2014 2:34 pm

array.length is a recent feature.
use sizeof(array)/sizeof(array[0]) if you want the equivelent in an older build of fte.
array.length is just simpler, and if its supported, why not?
the cast being needed is annoying/stupid though. I will fix that some time. maybe. :s
Spike
 
Posts: 2884
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Pure CSQC

Postby toneddu2000 » Sat Oct 18, 2014 1:31 pm

Ok, with your version works. I created a .fmf file in the same exe folder (not 100% sure of every field)
Code: Select all
game purecsqc
name "Pure CSQC"
protocolname FTE-purecsqc
defaultexec "vid_fullscreen 0; gl_font cour;vid_width 640; vid_height 480;"
basegame data
disablehomedir 1 //get rid of pesky home directories. useful for development, less useful if you have some installer that installs to "c:\program files".


with your exe (version 4771) game starts with no errors and after launching a map, it spits out all the entities it can't find (all map entities, in essence) and after that, it prints:
Code: Select all
purecsqc cannot be used on a server, please disconnect

You can fly through the map but not much else
I issue the disconnect command via command line and player is now centered at his right position and the game can begin.
On my version (4728) it throws this sequence of errors (too lazy to memorize and write them down)
Disconnecting, in this case, doesn't do anything

****LITTLE OFF-TOPIC (that should need some attention imo, though) ****
1)with your exe (version 4771) engine loads every quake 1 map but with my simple quake3 map (posted here) it displays only a green screen with no errors (as if player was very far away from map bounds)
with my exe (version 4728) engine loads quake1 map AND my simple quake3 map.

2)Another strange thing: if I rename my .fmf file to fmz or whatever it launches EnemyTerritory game which is installed in a completely different path (same drive unity, though)!! :D

3)In the fmf file I put this line
Code: Select all
disablehomedir 1 //get rid of pesky home directories. useful for development, less useful if you have some installer that installs to "c:\program files".

But it doesn't work. Engine searches cfgs and stuff at "C:\Users\myuser\Documents/My Games/FTE QuakeWorld" which doesn't exist! (note the slash change at /My Games)
****/LITTLE OFF-TOPIC ****

Unfortunately that's why I wasn't able to use FTE for my personal projects. Things change with an acceleration speed from month to month and I can't stand the pace.
It's not meant to be criticism (sorry if it seemed), it's just what I saw. I would like to create a manual about how to create indipendent games with FTE but I notice that every time I download a new version it seems completely different from the older one! :?:
toneddu2000
 
Posts: 1329
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pure CSQC

Postby Spike » Sat Oct 18, 2014 3:15 pm

purecsqc depends upon a 'small' change that allows setmodel(world, "maps/foo.bsp") to affect more than just qc fields. it will not work with older exe builds. This was aluded to in the readme: 'Expect to need to update'.
Anything before revision 4758 simply WILL NOT WORK.
Revision 4758 involved a rewrite of most of fte's loading code and will likely have introduced bugs in unrelated content, the sort of bug expected from this is primarily just missing textures (resulting in the checkerboard fallback texture turninig up).
my q3bsp testmap works fine with purecsqc. I cannot fix it without being able to reproduce it. No part of fte will clear the screen to green (typically that would be a result of non-conformant sli workarounds, and gl_clear 1 will clear it to red instead).
if purecsqc starts erroring out when trying to load a map after you disconnect, use the start-new-game menu to reset the game state (this is equivelent to setting the purecsqc_state cvar to empty and then disconnecting again). this can be needed if the map does not contain a spawn spot or if the qc errors out some other way that prevents the map from being restarted.


purecsqc expects to not have any ssqc running at the time, because that can affect things in awkward ways (ie: the server changing the world model, adding static entities, etc. that way lies duplicates and erroneous effects). This is specified in the readme.
Use the csmap command to switch maps. It will load up a map automatically. Again, consult the readme if this fails to happen.


your manifest file does not specify the id1 gamedir. it does not even specify the purecsqc gamedir. you should not even need an fmf file at all - especially not a badly made one. fmf files are for stand-alone mods that want to completely break from any existing game, or mods that need autoupdates for some reason (ie: mods where only the fmf is linked and the rest of the data just gets downloaded automatically), and purecsqc is neither of these two types of mod. just install the mod as a subdir in your quake directory, and run the engine from there. load the mod with the gamedir console command, or the -game commandline argument. again, purecsqc is NOT a standalone mod, and fully depends upon quake's content.
the fact that you are badly trying to hack around things by using greater complexity will have resulted in none of the quake content being findable, which is why when you try using the _SERVER_ (which you should not be trying to do, I should point out once again), it fails to find the progs.dat file and gives you lots of errors about entities and noclipping movement.
if you have multiple base games installed in your base directory, you can explicitly choose between them with -quake as well. add -nohome if you don't want to use a home directory.
if you use -quake or one of the other arguments and the specified game does not exist in the working directory nor where the exe is located, it will look at the registry for where you have previously told it that the specified game is installed. if you've not previously told it then it'll prompt and remember the location that you told it.
if you have erroneously told it that your Enemy Territory basedir should be used as your quake base dir, you can override the registry setting with the '-basedir c:/games/quake' argument, and it'll use that directory regardless of where the exe is installed or where the registry says the game it thinks it should be running is.

If you wish to see which base directory etc its using, the location of the home directory, the ordering of the basedirs, the priorities of the paks, and the flags that might be active on the various packages, you can use the path command. This is true for *ANY* quake engine, including vanilla quake, including quake2, including quake3.


randomly renaming the exe will cause it to think that it should always be running a specific game, if that game's 'codename' appears as part of the file name. you can use -quake to override this and revert it to running quake content only. it will already no longer ever try running ET based on the filename, so again, use an updated version of the engine as specified in the readme.
Spike
 
Posts: 2884
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Pure CSQC

Postby toneddu2000 » Sat Oct 18, 2014 10:05 pm

yep, csmap did the trick even on my q3test map, thanks! :D At least we know it wasn't a map issue!

Just to make clear, I did what I was expecting. I didn't add purecsqc src into Quake dir. I don't use FTE or DP to make Quake based mods(a little countercurrent, huh?). I only create new standalone projects. That's why I created a new data directory and I add only the models purecsqc asked for. I also added a Quake1 map just to test purecsqc entities but, of course, I'll leave only "the skeleton" of the source and weave it to suit my needs.
Regarding the manifest file, I've to admit I use the one you sent me once! :D So, if it's not correct, could you please add an example here, so this will be useful for everyone?
You talked about the PATH command, can you please make some example?
Thanks
toneddu2000
 
Posts: 1329
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy


Return to CSQC Programming

Who is online

Users browsing this forum: No registered users and 1 guest