Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
140544a
Keep embedded Host alive and attach clients after local startup
demoth Oct 27, 2026
e5a5d5c
Replace legacy hosting commands with standard server commands
demoth Oct 27, 2026
d215f90
Reset gameplay startup inputs when switching Cake profiles
demoth Oct 27, 2026
a89c604
Initialize saved callbacks before loading games in a fresh process
demoth Oct 27, 2026
f27ce8e
Verify New Game alias failures, waits, and pause recovery
demoth Oct 27, 2026
5098776
Add profile save catalog and typed singleplayer save/load access
demoth Oct 27, 2026
46bb34d
Preserve campaign autosaves when hosting deathmatch
demoth Oct 27, 2026
efa2840
Add singleplayer save/load menus and death recovery
demoth Oct 27, 2026
59f4810
Group new game and save/load under Singleplayer menu
demoth Oct 27, 2026
f1538c9
Use Escape navigation instead of redundant Resume buttons
demoth Oct 27, 2026
b88a2ac
Refresh saved games on entry without a manual Refresh button
demoth Oct 27, 2026
bff0e5c
Add save list and preview layout with confirmed checkpoint deletion
demoth Oct 27, 2026
ac50ab4
Label save checkpoints with date, map title and map name
demoth Oct 27, 2026
1d3fb42
Name the automatic checkpoint slot autosave
demoth Oct 27, 2026
a47724b
Capture and display thumbnails for manual menu saves
demoth Oct 27, 2026
24964d5
fullgame native fix
demoth Oct 27, 2026
1d85ddd
Fix network packet size boundary and explicit-IP port fallback
demoth Oct 27, 2026
12e015a
Introduce owned Kotlin datagram endpoints and immutable network values
demoth Oct 27, 2026
93bb25b
Extract stateless packet envelope decoder with explicit rejection out…
demoth Oct 27, 2026
25013a3
Extract deterministic reliable channel with transactional sends
demoth Oct 27, 2026
4aaa14f
Extract instance-owned network transport
demoth Oct 27, 2026
aff5352
Allow connection adapters to borrow owned transports
demoth Oct 27, 2026
6fb6f2c
Inject server networking and owned transport lifecycle
demoth Oct 27, 2026
a51d8c0
Own client networking and wire private fullgame transports
demoth Oct 28, 2026
a0132ba
Own standalone transports and deprecate compatibility networking
demoth Oct 28, 2026
baf8525
Share client and server packet I/O and bind policy
demoth Oct 28, 2026
c10dfeb
Remove legacy networking defaults and isolate host fixtures
demoth Oct 28, 2026
fdd7ede
Bound client and server packet polling work per pass
demoth Oct 28, 2026
d6f40fb
Extract client handshake retry and target validation controller
demoth Oct 28, 2026
66a5008
Extract server connection admission and packet routing
demoth Oct 28, 2026
85f072c
Remove implicit global channel and address ownership
demoth Oct 28, 2026
f785ed9
Track opt-in graphics and game test environment inputs
demoth Oct 28, 2026
f243f2b
Remove NET facade and migrate its regression fixtures
demoth Oct 28, 2026
9803f36
Review network message hierarchy and Kotlin migration risks
demoth Oct 28, 2026
ef4dff9
Preserve entity and sound wire values during re-encoding
demoth Oct 28, 2026
ab25efe
Decode payload strings with the protocol Latin-1 charset
demoth Oct 28, 2026
81300e4
Separate client message codecs from immutable Kotlin values
demoth Oct 28, 2026
93ff4dc
Convert server control and text messages to Kotlin values
demoth Oct 28, 2026
5969b91
Group compact Kotlin message values by protocol role
demoth Oct 28, 2026
e94fbde
Convert server metadata and firing effects to Kotlin values
demoth Oct 28, 2026
ece2081
Own inventory download and frame message payloads
demoth Oct 28, 2026
a79aa00
Make sound messages immutable with owned vector positions
demoth Oct 28, 2026
4204a86
Convert temporary entities to sealed immutable Kotlin values
demoth Oct 28, 2026
00eaf51
Snapshot movement commands and encode CRCs with packet context
demoth Oct 28, 2026
c7cdf31
Snapshot entity baselines and preserve their wire delta masks
demoth Oct 28, 2026
b92825f
Make packet entity deltas immutable Kotlin values
demoth Oct 28, 2026
b90541e
Make player state deltas immutable Kotlin values
demoth Oct 28, 2026
4877961
Replace legacy netchan adapter with Kotlin ConnectionChannel
demoth Oct 28, 2026
76b6cdc
Replace legacy network addresses with immutable values
demoth Oct 29, 2026
4e80338
Consolidate Kotlin networking settings and inject live configuration
demoth Oct 29, 2026
f9d4004
docs: network doc update
demoth Oct 29, 2026
76c31e9
Omit unchanged weapon model indices from player snapshots
demoth Oct 29, 2026
a98fbb2
docs: network doc update
demoth Oct 29, 2026
ab7d09a
Clarify sequenced and connectionless packet documentation
demoth Oct 29, 2026
160191e
Label sequenced and connectionless traffic in connection diagram
demoth Oct 29, 2026
a60578a
docs: network doc update
demoth Oct 29, 2026
e820fed
Bump version to 1.2.6 for networking rework
demoth Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.2.6
- reworked networking with owned client/server transports, immutable Kotlin messages and addresses, and injected settings
- preserved Quake II protocol 34 compatibility and reduced player updates by omitting unchanged weapon model indices

1.2.2
- added cake-fullgame desktop distribution with Singleplayer and Host Game menus
- embedded server and game modules for local singleplayer and multiplayer hosting
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ What is Cake? Important note about client side code
---------------------------------------------------

Jake2 client in its vanilla form is archived in `jake2-legacy` branch and will not be maintained.
The historical `client/` sources are excluded from the current Gradle build and may reference retired engine APIs.
Use the `jake2-legacy` branch to build that client; network wire compatibility remains required for the current applications.
Even though one of the core ideas of this project was to reuse and improve (rather than reimplement from scratch) -
the client side code was particularly hard to maintain and develop.
Firstly, because it is written on top of the unmaintained and obsolete second LWJGL version,
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ subprojects {
apply plugin: 'jacoco'

group = 'org.demoth'
version = '1.2.5'
version = '1.2.6'
ext.appName = 'cake'

kotlin {
Expand Down
53 changes: 44 additions & 9 deletions cake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,21 @@ experimental native executable:
```sh
./gradlew -PenableGraalNative=true :cake:cake-client:nativeCompile
./gradlew -PenableGraalNative=true :cake:cake-viewer:nativeCompile
./gradlew -PenableGraalNative=true :cake:cake-fullgame:nativeCompile
```

These tasks require GraalVM 25 or newer with Native Image. Set `GRAALVM_HOME` to
that installation; Gradle can continue running on the regular project JDK.
Native resources are detected from the runtime classpath, including repository
assets and dependency libraries. Ordinary JVM builds and ZIPs omit the Graal helpers.
All three launchers use the shared native configuration and explicit reflection
metadata for audio and Scene2D skin/pool classes. Native compilation and basic
startup are verified on Linux ARM64; fullgame hosting and save/load still need
runtime validation.
metadata for audio and Scene2D skin/pool classes. The `game` module supplies
type registrations for its callback preload list; keep these aligned with
`GameExportsImpl.preloadclasslist`. The `qcommon`, `server`, and `game` modules
also register their save DTOs for Jackson reflection.
Native compilation, basic startup, local map transitions, and console save/load
are verified on Linux ARM64. Multiplayer hosting still needs native runtime
validation.

## Playing and hosting

Expand All @@ -115,14 +120,44 @@ and Host Game menus, using the selected profile's game data and mod.
Hosting automatically connects the local player. Disconnect before switching
profiles or starting another session.

Console equivalents:
Switching profiles resets built-in gameplay startup settings before loading the
selected profile's config. Video and client preferences are not reset. Initial
startup preserves command-line overrides; loading a save restores its saved
latched settings, including difficulty.

- `host_start <map> [singleplayer|deathmatch|coop] [skill] [maxclients]`
- `host_stop` — disconnect and stop hosting.
- `map <map>` / `gamemap <map>` — change maps while hosting.
Console equivalents:

Saves are stored in `~/.cake/<profileId>/save/`. Console `save <slot>` and
`load <slot>` currently require an active game.
- `map <map>` / `gamemap <map>` — start a local game or change maps while hosting.
- `disconnect` — disconnect and stop the local game, retaining the idle Host.
- `killserver` — stop the hosted game, retaining the idle Host.

For multiplayer, set `coop`, `deathmatch`, and `maxclients` before starting the
map, for example `set coop 1; set deathmatch 0; set maxclients 4; map base1`.
The Host Game menu configures these settings for you.

Saves are stored in `~/.cake/<profileId>/save/`. Console `load <slot>` restores a
game even while disconnected. `save <slot>` requires an active game.

Fullgame's Singleplayer submenu contains New Game, Load Game and Save Game.
New Game opens difficulty selection. The submenu stays accessible during play,
with each action enabled when eligible; Back from these screens returns there.
Escape goes back through the menus and returns to gameplay from the main menu.
Saved games refresh automatically whenever Load Game or Save Game is opened.
Each screen shows a scrolling checkpoint list alongside preview space and save
details, with actions along the bottom. Manual saves from the menu include a
thumbnail of the scene without menus (up to 320×240). Missing or unreadable
thumbnails show a placeholder; image capture/write failures leave the save usable
and display a warning. Autosaves and console saves do not capture thumbnails.
Replacing a checkpoint clears its old contents, including any previous thumbnail.
New Save creates a checkpoint; Save asks before replacing the selected manual save.
Delete asks before removing the selected checkpoint. Autosave is
listed for loading and reserved against manual overwrite. Save requires a living,
spawned local player. Loading is available from startup and during singleplayer;
the singleplayer respawn action opens Load Game automatically.

`menu_loadgame` and `menu_savegame` open those screens from the console. Errors
remain visible in the menu so an invalid save or failed restore can be retried.
Deathmatch does not create autosaves. Coop save/load remains console-only.

## Subsystem Guides

Expand Down
5 changes: 5 additions & 0 deletions cake/cake-fullgame/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ dependencies {
// Real-application tests bootstrap process-wide engine state and replace user.home.
// Keep each opt-in test class in its own application process.
tasks.test {
// Opt-in flags and content location affect which tests run and what they load.
// Changing them must invalidate results that may otherwise contain only skipped tests.
listOf("CAKE_HOST_GAME_TESTS", "CAKE_HOST_GL_TESTS", "CAKE_TEST_BASEDIR").forEach { name ->
inputs.property(name, providers.environmentVariable(name).orElse(""))
}
if (providers.environmentVariable("CAKE_HOST_GAME_TESTS").orNull == "1") {
forkEvery = 1
}
Expand Down
Loading
Loading