How jacoders/openjk works
OpenJK maintains the engine and game runtime for Jedi Academy and Jedi Outcast, preserving compatibility rather than introducing major gameplay changes. The main player loop runs from input through client prediction and game simulation to server snapshots and rendered/audio output; menus, scripted behaviors, and persistence are important adjacent capabilities. The tree also contains distinct single-player, multiplayer, and JK2 implementations. Edges reflect the conventional runtime boundaries visible in module names and the sampled APIs; most subsystem internals were not sampled, so uncertain wiring is omitted.
Main entry points: cl_main.cpp Client Core · cg_main.cpp Client Game · g_main.cpp Game Rules · net_chan.cpp Network Channel
Components 17
Client Runtime
- Input
code/client/cl_input.cpp - Client Core
code/client/cl_main.cpp - Client Game
code/cgame/cg_main.cpp - Menus UI
code/ui/ui_main.cpp - Renderer
code/rd-vanilla/tr_main.cpp - Audio
code/client/snd_dma.cpp
Game Simulation
- Game Server
code/server/sv_main.cpp - Game Rules
code/game/g_main.cpp - Shared Movement
code/game/bg_pmove.cpp - MP Rules
codemp/game/g_main.c - JK2 Rules
codeJK2/game/g_main.cpp
Engine Services
- Network Channel
code/qcommon/net_chan.cpp - Save Games
code/qcommon/ojk_saved_game.cpp
Game Capabilities
- ICARUS Tasks
code/icarus/TaskManager.cpp - Bot AI
codemp/botlib/be_interface.cpp
Other components
- Player
- Game Installation
Connections 19
- Player → Input: provides controls
- Input → Client Core: submits commands
- Client Core → Client Game: dispatches calls
- Client Game → Shared Movement: predicts movement
- Client Game → Renderer: submits scene
- Client Game → Audio: starts sounds
- Client Core → Network Channel: sends messages
- Network Channel → Game Server: delivers messages
- Game Server → Game Rules: invokes game module
- Game Rules → Shared Movement: uses movement
- Game Server → Network Channel: sends snapshots
- Network Channel → Client Core: delivers snapshots
- Client Core → Menus UI: dispatches UI
- Game Installation → Client Core: loads game data
- Game Rules → ICARUS Tasks: runs scripted tasks
- Game Rules → Save Games: uses save support
- MP Rules → Shared Movement: uses movement
- JK2 Rules → Shared Movement: uses movement
- MP Rules → Bot AI: uses bot library