Info: Code Layout - Subject9x/battleMETAL GitHub Wiki
This is to help give you a quick read of where code is kept.
Top-level layout
As noted here, the code is split into 3 main modules.
/Common
/Common/ is a edge-case folder of code; this contains most of battleMETAL's runtime 'data.' You'll find all the Mech, Vehicle, Building, Weapon data here. If you just want to noodle around with values, this is pretty much where you want to go.
SSQC (Server-side Quake C)
The bulk of the game code lives here. main/ has several folders for various sub-modules, but also contains key files like:
-
t_damage : Quake C convention suggests that the damage function for all game logic be housed in 1 file, and 1 main function, t_damage().
-
entityFactory_player : responsible for standing up and tearing down the player between types - Observer and Mech.
-
entityFactory_vehicles uses Factory Pattern for initializing any-and-all vehicles, turrets, and mechs. This covers both AI and Players.
-
data_system : Covers loading data from common/ files for all units and equipment.
SSQC sub-folders:
- ai/ - the entire AI sub-module [ref] (TODO)
- controllers/ - state-manager code for specific game objects like mech parts.
- extensions/ - code that explicitly extends original Quake C code such was world.qc or player.qc.
- headers/ - simple folder for header files at this directory depth.
- map/ - sub-module for all map-logic entities. [ref] (TODO)
- models/ - similar to original Quake, this contains frame macros for animations in the game (there's not much).
- sv/ - express location for all 'server' code files, prepended by sv_.