fteqcc

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

fteqcc

Postby Cinquero » Sun Aug 20, 2006 8:13 pm

Is there any complete documentation for fteqcc?

Looks to me like the first thing to do with Nexuiz is to replace fteqcc .qc files with regular C/C++ code.

Or how do I use hashes in .qc files?
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm

Re: fteqcc

Postby divVerent » Sun Aug 20, 2006 8:43 pm

Cinquero wrote:Is there any complete documentation for fteqcc?

Looks to me like the first thing to do with Nexuiz is to replace fteqcc .qc files with regular C/C++ code.


If you volunteer to do that rewrite, why not. Preferred target engine would be something Q3A based ;)

Seriously, it is more than just changing the compiler - QC is far too different from C for that. One COULD however make a C++ interface that imitates how QC works (note: C++ allows operator overloading so the vector type could be made work the same as in QC) - it wouldn't be object oriented, but it would be easily possible to automatically convert QC code to that.

Or how do I use hashes in .qc files?


You can't, but what do you want to use them for?
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Re: fteqcc

Postby Cinquero » Sun Aug 20, 2006 10:05 pm

divVerent wrote:
Cinquero wrote:
Or how do I use hashes in .qc files?


You can't, but what do you want to use them for?


Collecting player stats.
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm

Re: fteqcc

Postby divVerent » Sun Aug 20, 2006 10:50 pm

Cinquero wrote:
divVerent wrote:
Cinquero wrote:
Or how do I use hashes in .qc files?


You can't, but what do you want to use them for?


Collecting player stats.


And why a hash for that? You can just append them to the player entity.

If you mean loading and saving an external database with stats, forget it. QC is reinitialized every game, so variables don't persist between games. Only cvars and files do - and FRIK_FILE is only usable for flat files.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Re: fteqcc

Postby Cinquero » Mon Aug 21, 2006 12:00 am

divVerent wrote:Only cvars and files do - and FRIK_FILE is only usable for flat files.


FRIK_FILE? What's that? Could one use that to store the results of the last N games in a specific map?
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm

Re: fteqcc

Postby divVerent » Mon Aug 21, 2006 6:31 am

Cinquero wrote:
divVerent wrote:Only cvars and files do - and FRIK_FILE is only usable for flat files.


FRIK_FILE? What's that? Could one use that to store the results of the last N games in a specific map?


FRIK_FILE is the extension that adds functions like fopen() to QuakeC.

Yes, it can be used for that; no, you don't want to use it unless for small files. You don't want to store a list of all players you've ever seen with that... however, you can abuse the file system as a database. There is no "mkdir" commnand, however, when you open a file for writing, missing directory levels are automatically created.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Urmel » Mon Aug 21, 2006 8:01 am

You both really like the "quote" button in an extreme way dont ya :D
uncomfortable
random
mean
embarrassing
limited
Urmel
Forum addon
 
Posts: 1744
Joined: Fri Mar 03, 2006 10:06 am
Location: Offline

Postby divVerent » Mon Aug 21, 2006 12:05 pm

Urmel... wrote:You both really like the "quote" button in an extreme way dont ya :D


Yes.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Urmel » Mon Aug 21, 2006 12:16 pm

divVerent wrote:
Urmel... wrote:You both really like the "quote" button in an extreme way dont ya :D


Yes.


I knew :mrgreen:
uncomfortable
random
mean
embarrassing
limited
Urmel
Forum addon
 
Posts: 1744
Joined: Fri Mar 03, 2006 10:06 am
Location: Offline

Postby esteel » Thu Aug 24, 2006 10:34 am

I guess this deserves to be posted here:
LordHavoc on Inside3D: Reasons QuakeC is better than C++ for Quake-based games
http://forums.inside3d.com/viewtopic.php?t=474
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron