Quake3World.com Forums
     Programming Discussion
        Overall architecture: coupling between game, cgame, etc?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Overall architecture: coupling between game, cgame, etc?

Grunt
Grunt
Joined: 20 Feb 2011
Posts: 57
PostPosted: 01-05-2015 03:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


I have decided to rewrite most of the code inside cgame, by slowly deactivating old code and migrating to newer code. However, i'm not completely sure about the Quake 3 architecture. Is there any other dependency between cgame and the engine, other than the vmMain and the events it receives? There seems to be some tight coupling with other parts of the system, and i'm afraid about global variables and shared global state. Or is it really completely isolate and i should just care about vmMain and drawing the current frame properly?




Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 563
PostPosted: 12-29-2016 10:53 PM           Profile Send private message  E-mail  Edit post Reply with quote


I think this might be what you're looking for:

http://fabiensanglard.net/quake3/

The main thing in c_game and g_game is that they transmit information through playerstates and entitystates, which is why if you want to change any info in either of those datetypes you have to update msg.c for the game to run properly.

I do know that since your movement is predicted, a ton of the bg_ code is used by both sides of the game. So the server will run the pmove code with a call from the game code, and the clientside will call pretty much the exact same code between valid snapshots received from the server, just to fill the gap and create a smooth experience.

Other than movement, keeping record of which events have been triggered by entity interactions, and transmitting playerstates and entitystates, I'm not sure what else the local and server code rely upon eachother for.

Edit: Super necro, I need to check the dates on things.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.