Quake3World.com
https://www.quake3world.com/forum/

Overall architecture: coupling between game, cgame, etc?
https://www.quake3world.com/forum/viewtopic.php?f=16&t=50785
Page 1 of 1

Author:  vinny [ 01-05-2015 03:34 AM ]
Post subject:  Overall architecture: coupling between game, cgame, etc?

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?

Author:  Ganemi [ 12-29-2016 10:53 PM ]
Post subject:  Re: Overall architecture: coupling between game, cgame, etc?

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.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/