Forum

[DarkPlaces] QC drawing graphics onto the screen?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

[DarkPlaces] QC drawing graphics onto the screen?

Postby Nash » Fri Oct 19, 2007 9:49 pm

Hi, does anyone know if it's possible to draw some graphics onto the screen during gameplay using QuakeC?

I've perused all the built-in functions of QuakeC and scanned dpextensions.qc but I can't seem to find anything that would help me do this.

What I intend to achieve is along the lines of a "current objectives" panel similar to Quake 2, and maybe an in-game inventory screen thingy.

I have made custom graphics for the windows, consoles and stuff using Photoshop, but I can't seem to find a way to draw them in-game using QuakeC.

Do I have to resort to modifying DP's source to achieve this?
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby Sajt » Fri Oct 19, 2007 11:12 pm

That would be a job for Client-Side QuakeC.


... Unfortunately, nobody knows how to use it. Or if it even exists.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Nash » Fri Oct 19, 2007 11:50 pm

Looks like I'll just have to modify the source to do this. :(
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby xaGe » Sat Oct 20, 2007 3:23 am

..And if it did exist a tutorial on how to use it would be great...


Sajt wrote:That would be a job for Client-Side QuakeC.


... Unfortunately, nobody knows how to use it. Or if it even exists.
User avatar
xaGe
 
Posts: 461
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York

Postby leileilol » Sat Oct 20, 2007 3:32 am

what happened to tei's showlmp :S
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Nash » Sat Oct 20, 2007 12:47 pm

I guess this mod has it hard-coded then?
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby GiffE » Sat Oct 20, 2007 1:56 pm

Nash wrote:I guess this mod has it hard-coded then?

Chris uses CSQC
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby Nash » Sat Oct 20, 2007 2:26 pm

So why this is Client-Side QuakeC so secretive, so mysterious? Is there a good reason why no one really wants to talk about it in particular?
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby xaGe » Sat Oct 20, 2007 2:27 pm

CSQC is an abbreviation for Client-Side QuakeC... Which has very little if no documentation and apparently only a handful of people in the world understand how to use with regards to Darkplaces & FTEQW... :(


GiffE wrote:
Nash wrote:I guess this mod has it hard-coded then?

Chris uses CSQC
User avatar
xaGe
 
Posts: 461
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York

Postby Nash » Sat Oct 20, 2007 3:01 pm

After some searching, I found out that Nexuiz has CSQC code in it. So off I went to download the game, and copied over the CSQC sources into my mod's folder.

I'm going to try figure it out, but before that, I need to find out how to get it to even compile. Here is what frikqcc 2.6 spits out:

Code: Select all
warning: LINK:0:System defs do match internal crcs.


Anyone knows what's going on?
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby Sajt » Sat Oct 20, 2007 4:27 pm

Well that's just a warning. It means it won't work as server-side QC progs.dat, which is quite the point, so you can ignore it.

For the record I use FTEQCC. If you can't get something to compile in FrikQCC, there's a chance it uses some FTEQCC only features. (see here for the latest build of FTEQCC)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Nash » Sat Oct 20, 2007 7:50 pm

Thanks. I used to have trouble deciding which compiler to use, but I went with Frik's for some reason I can't remember. :?

(I think it was the lax error check/warnings... FTEQCC always produces tons of warnings even with the stock ID1 QC)
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby leileilol » Sat Oct 20, 2007 10:59 pm

fteqcc has issues with functions like trace_plane_normal though :(
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Nash » Sun Oct 21, 2007 8:14 am

Yeah I went back with FrikQCC because FTEQCC doesn't support arrays.
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby Chris » Mon Oct 29, 2007 7:37 pm

FTEQCC supports arrays just fine.


Code: Select all

 float NUMBER_OF_SLOTS = 12;
 .entity myslot[NUMBER_OF_SLOTS];      /* FTE compiler arrays, you must use fteqcc to compile this */




Then in a function...

Code: Select all

for(nCnt = 0; nCnt < NUMBER_OF_SLOTS; nCnt++)
   {

    self.(myslot[nCnt]) = spawn();
      self.(myslot[nCnt]).owner = self;
   }



stuff about FTEQCC arrays:

* they can only be declared globally, no
local entity army_array[50]; etc

* You cannot compare 2 arrays unless referenced as a pointer using an entity, in example:

Valid:

Code: Select all
local entity slot, slotb;

slot = self.(myslot[(self.activeslot - 1)]);

slotb = self.(myslot[(self.activeslot)]);

slot.power = slotb.power;


Invalid:

Code: Select all
self.(myslot[(self.activeslot - 1)]).power = self.(myslot[(self.activeslot)]).power;
Chris
 
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest