Forum

How does the Engine read csprogs.dat?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

How does the Engine read csprogs.dat?

Postby Mexicouger » Wed Jun 30, 2010 4:02 pm

Do you have to install something in the Engine to read Progs.dat? Basically I am wondering if the Engine needs alot of attention when Adding csprogs.dat. I would really want to add it, And it seems Like an awesome Feature. I have been reading up about it, And Would like to know more, But preferably that.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby frag.machine » Wed Jun 30, 2010 4:20 pm

What do you mean by "read" ? Literally speaking, is pretty much the same way it reads the original progs.dat, but it's client-side only.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Spike » Wed Jun 30, 2010 4:28 pm

Only FTE and DP (seriously) support csprogs.dat right now.
The qc vm in regular engines needs a lot of changes to add support, due to its (ab)use of globals. Its also not entirely generic, with a few expectations of server-only use.

I did provide some code to add support to other engines a while ago, which basically resulted in two qc vms in the same engine.
Not clean, but it gets the job done. Disclaimer: frankly it sucks. Also don't expect qclib to be happy on a psp, due to its internal (large) heap.
I keep meaning to make a simpler, easier to integrate version, but it would also be more limited (pretty much hud only).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Mexicouger » Wed Jun 30, 2010 4:32 pm

Well there has to be Something that Tells the engine That csprogs.dat is there along with progs.dat. Maybe I can combine them?

Can't I just add the Function into defs.qc In regular progs? add whatever needs to be added?
Ok answer me this: Is there any client side stuff Involved when Using csqc?

Last question: Is It available for Fitzquake.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Spike » Wed Jun 30, 2010 4:37 pm

Mexicouger wrote:Ok answer me this: Is there any client side stuff Involved when Using csqc?

That made me smile. For all the wrong reasons. :D
What the hell do you think cs means? Counter Strike? :P

If you're making a single player game then yeah, you can probably pile it all onto the progs.dat and kill all csprogs.dat stuff, and then it'll crash any time you try connecting your client to any other server (or demo).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Mexicouger » Wed Jun 30, 2010 4:40 pm

Ohh Ok I got my head wrapped around it now. The functions Are installed IN the engine. Then you call them in csprogs.dat right?

Well I only want to add like cl_drawpic. Is it possible to add like 2-3 functions and not the whole things?

EDIT:

Code: Select all
#ifdef __linux__
#define PNG_SUCKS_WITH_SETJMP   //cos it does.
#endif


:lol:
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Spike » Wed Jun 30, 2010 4:47 pm

csprogs.dat runs on the client
progs.dat runs on the server.
they have different builtins available to them, which reflects their role.
progs.dat cannot directly draw on a client's screen
csprogs.dat can, but cannot directly talk to other clients, or directly change any entities unless it asks the progs.dat to do it.

You'd have a much easier time implementing svc_showlmp (or at least part of tei_showlmp2) than you would implementing a simple csprogs vm.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Mexicouger » Wed Jun 30, 2010 4:50 pm

All I want is A hud Image at the Moment. I want to Get farther into the Code later and Add health Into the HUD as well.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Swift » Wed Jun 30, 2010 5:22 pm

Can I ask, what is the point of client side QuakeC, if you're coding specfically for the PSP Quake? I'm presuming you probably wouldn't be playing multiplayer, unless you have access to wifi. And if you are coding for multiplayer, then PSP Quake would have to have good netcode.
Swift
 
Posts: 60
Joined: Tue Jan 26, 2010 11:02 am

Postby Arkage » Wed Jun 30, 2010 9:08 pm

If you only want CSQC for a hud then I don't see much point in adding it. Just code the HUD and client side effects into the engine.
User avatar
Arkage
 
Posts: 66
Joined: Thu Nov 19, 2009 4:17 pm

Postby Mexicouger » Wed Jun 30, 2010 9:34 pm

I find it very entertaining to Just randomly say "Arkage" in a British accent :lol:

Anyways, Yea, I will probably just actually just make the engine draw the Hud picture when I enter a game or something.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Swift » Thu Jul 01, 2010 11:42 am

Do you know what the PSP people need? A port of FTE or DP.
Swift
 
Posts: 60
Joined: Tue Jan 26, 2010 11:02 am

Postby frag.machine » Thu Jul 01, 2010 12:18 pm

Swift wrote:Do you know what the PSP people need? A port of FTE or DP.


Do you know what the PSP people need ? A PC.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby goldenboy » Thu Jul 01, 2010 3:35 pm

Doesn't a HUD only csqc support kinda miss the point?
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Postby Downsider » Thu Jul 01, 2010 8:57 pm

Do you know what the PSP people need? A fucking brain.
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest