Cake is the new Jake2 client implementation built on libGDX with the LWJGL3 desktop backend.
Main game client logic: rendering, audio, input, HUD, networking integration, and gameplay screen flow.
Desktop platform launcher/wrapper for core.
Standalone desktop launcher for the Cake model viewer.
Standalone desktop tooling for engine asset generation workflows.
From repository root:
./gradlew :cake:cake-client:run- runs the desktop client launcher directly../gradlew :cake:cake-modelviewer:run --args="/absolute/path/to/file.md2"- runs the model viewer launcher directly.
Main desktop entrypoint:
Cake now uses a dedicated Q2PRO-inspired world BSP batch renderer by default (no legacy per-face world ModelBatch path).
Runtime diagnostics:
r_bsp_batch_debug(default0) - prints throttled world/entity/sprite/beam/particle submission stats.
Q2PRO references for the target path:
q2pro/src/refresh/world.c(GL_DrawWorld,GL_WorldNode_r)q2pro/src/refresh/tess.c(GL_AddSolidFace,GL_DrawSolidFaces,GL_Flush3D)
Profiling workflow:
- Enable debug graphs:
set r_debug_drawcalls 1set r_debug_texturebindings 1
- Enable
r_bsp_batch_debug 1and capture representative maps/views. - Enable gameplay fps overlay (Yamagi-style):
set cl_showfps 1(avg fps)set cl_showfps 2(min/max/avg fps)set cl_showfps 3(adds frame-time line)
Screenshot output:
screenshotcommand writes PNG files to$HOME/.cake/<mod>/scrnshot/.- Shared VFS diagnostics commands are available in Cake too:
fs_filesfs_mountsfs_overrides
Generate a libGDX bitmap font (.fnt + .png) from a TTF:
./gradlew :cake:engine-tools:run --args="--ttf /absolute/path/MyFont.ttf --out /absolute/output/dir --name font --size 21"
Notes:
- Uses libGDX default glyph set:
FreeTypeFontGenerator.DEFAULT_CHARS. - Output is intended for manual copy into engine assets.
App-level client entrypoint and lifecycle owner:
- initializes commands/cvars/network state,
- initializes and owns shared asset/input systems,
- switches between menu/console/game contexts,
- creates and disposes game screens.
In-game screen (per-level lifecycle) responsible for:
- world/entity/effects rendering,
- HUD integration,
- frame-level input consumption,
- server message processing for active gameplay.
Detailed docs for specific Cake subsystems: