[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - DarkPlaces client server relationship

DarkPlaces client server relationship

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

DarkPlaces client server relationship

Postby toneddu2000 » Wed Oct 23, 2013 9:14 am

Hi guys, in these days I was thinking if it's possible to join client-server part in only one for a totally single player game in DP (no multiplayer whatsoever). I searched for an explanation of the client/server relationship on quake engine and I found , but I noticed that the functions names don't match with DP ones. I started looking deeply at the code and I tried to make my own conclusions and share them with you to see if I'm right or wrong:
the main files SHOULD be sv_main.c (for server) and cl_main (for client).
Client has CL_Init() which fires up CL_Parse_Init() but this function actually doesn't pase anything.

The two important functions I found that seems to start parsing a line containing map information,client socket information(I don't know what is it - I presume is related to the net location), crypto passed phrase, etc. are
NetConn_ClientFrame() and NetConn_ServerFrame() which lead respectively to
NetConn_ClientParsePacket() and NetConn_ServerParsePacket().

both NetConn_ClientFrame() and NetConn_ServerFrame() are called by Host_Main() which I can't desume is it related to client or server (I presume server)

Is it possible to melt client and server together? Where should I start? I don't want you guys make the work for me, I just like to know how is the client/server relationship from whom knows Quake/DarkPlaces better than me

Thanks in advance
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby frag.machine » Wed Oct 23, 2013 9:47 am

In theory, yes. The server and client limits are defined by the boundaries in the network subsystem. I remember that some first generation engines like Telejano even checked for single player mode to bypass the network support for things like sound playback. It may turn some things easier, like complete control over the UI from the QuakeC side without CSQC support, but besides this I personally dont see the point.
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: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: DarkPlaces client server relationship

Postby toneddu2000 » Wed Oct 23, 2013 10:13 am

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby Spike » Wed Oct 23, 2013 3:16 pm

merging the client and server parts of the engine will remove any possibility to play/record demos.

if you can fix sv_phys.c to also work in csqc, and fix its csqc to actually be able to parse maps entities, then you can just gut all of the server+networking parts and go pure csqc.

the 'host' is the underlying commonality between client and server. its the part that handles 'shared' console commands and framerate timings. In QuakeWorld, the 'host' ended up firmly as part of the client, with all the server parts of the host rewritten pretty much from scratch. This helped reduce the negative effects of fixed-rate server frames.

why you'd want to cripple it like that I have no idea.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: DarkPlaces client server relationship

Postby toneddu2000 » Wed Oct 23, 2013 3:32 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby frag.machine » Wed Oct 23, 2013 3:57 pm

If you don't have any previous programming experience in other language, I'd strongly advise you to not use Quake as a C study case.
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: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: DarkPlaces client server relationship

Postby toneddu2000 » Wed Oct 23, 2013 4:12 pm

Yeah, you're right frag.machine, I should have started with some simpler but, honestly, I don't want to give up now. This is the only part that I didn't comprehend completely but I think is doable in some way
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby jitspoe » Wed Oct 23, 2013 8:00 pm

This is a bit of a catch 22. In order to make this change, you'd have to have a pretty good understanding of how the client/server architecture works. If you have a good understanding of it, then, well, you don't need to make the change, because you're trying to make the change to make it simpler and easer to understand.

My advice would be to embrace the client/server architecture, even if you're not planning on making a multiplayer game. If you want to add coop or PVP later on, it will be much easier, and understanding good multiplayer architecture tends to be a rarity in game development, so it's worth learning if you plan to use your programming skills to make games in the future.

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: DarkPlaces client server relationship

Postby toneddu2000 » Wed Oct 23, 2013 9:25 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby jitspoe » Mon Nov 04, 2013 10:49 pm

What are you trying to accomplish that the client/server architecture is making difficult?

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: DarkPlaces client server relationship

Postby toneddu2000 » Tue Nov 05, 2013 9:32 am

To be honest, is the first time I see a list of replies that, not only not help anyone, but they are more problematic than the question! :) When I try to reply to a question in this forum, I just do it, I don' t try to get into the thread author's mind to understand if he/she is right, if it's usable, or whatever..

IT WAS JUST FOR UNDERSTAND HOW DARKPLACES WORKS BETWEEN CLIENT AND SERVER. IT WAS AN ACADEMIC/LEARNING PURPOSE. Just that.

I would like to know how packets are melt together in a string and send via Client/ServerParsePacket() funtion.

If anyone here in the forums doesn't know ho to accomplish it(but I think that someone could start a discussion at least), there's no problem, let's move along, but please, stop posting questions to question!
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby frag.machine » Tue Nov 05, 2013 11:13 am

Well, sorry if our answers didnt help. Maybe the problem lies in the question ? :roll:
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: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: DarkPlaces client server relationship

Postby toneddu2000 » Tue Nov 05, 2013 12:16 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: DarkPlaces client server relationship

Postby frag.machine » Tue Nov 05, 2013 3:43 pm

No, I didn't say anything that could imply it's impossible. Given enough time and effort, you can achieve pretty much anything.

This may help you to better understand how the server client is implemented, at least NetQuake wise. Don't know if there's an equivalent documentation on QuakeWorld. I'd suggest paying special attention in the loopback driver section.
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: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: DarkPlaces client server relationship

Postby toneddu2000 » Tue Nov 05, 2013 10:02 pm

Thanks a lot frag.machine, I had a look at the documentation you posted and I've only a doubt, what is NetQuake? I found over the net and I deduced this (correct me if I'm wrong).
NetQuake is the first implementation of a client server architecture in Quake, back in 1996, where were more the cons than the pros in multiplayer playability due to high latency problem.
QuakeWorld is a rewrite of NetQuake, improving NetQuake's flaws.

So, if I understood right, it's better for me to take a look at original quake source, because in that code Multiplayer part is less consistent and it's probably easier to get rid of it, right?
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests