Campaign picker, Hollow Point, campaign-driven protocol v2. Version code 6.
de-praxis
A cooperative cassette-futurist horror terminal game. Kotlin Android client, Kotlin/JDK 17 server, persistent rooms, and an optional local LLM narrator.
Download the testing release · Release and F-Droid instructions
First playable slice: one authored scenario, one or two operators, simultaneous action rounds, server-side d20 rolls, three endings, and an Android terminal interface. This is a foundation for the larger AI dungeon-master game.
Run the server
Install JDK 17, then from this directory:
./gradlew -PserverOnly :server:test :server:installDist
./server/build/install/server/bin/server
The relay listens at http://127.0.0.1:1337. GET /health returns {"status":"ok"}. Room files are saved atomically under ./data; keep this directory across restarts. Run one server process per data directory.
LAN mode (no Caddy, no HTTPS): for phones on the same Wi-Fi, run
./server/build/install/server/bin/server --lan # or: --lan --port 4242
The relay listens on every interface, prints the address to enter in the app, and answers the app's Scan this network button on UDP 1337. It refuses clients outside private networks (10/8, 172.16/12, 192.168/16, link-local, IPv6 unique-local), so an accidentally forwarded port is not an open relay. Allow the HTTP port and UDP 1337 through the computer's firewall. LAN mode cannot be combined with PUBLIC_ORIGIN or proxy settings; use the hosting guide for internet play.
To configure the relay from another device on your trusted LAN, add --lan-admin:
./server/build/install/server/bin/server --lan --lan-admin
Open the printed http://<relay-IP>:1337/admin URL and enter the key from data/admin.key (or your configured data directory). Use the relay's numeric IP, not a hostname. Admin access stays local-only without this explicit option. Leave ADMIN_REMOTE_ACCESS unset/false; it is for HTTPS proxy administration, not LAN mode.
Server control room: open http://127.0.0.1:1337/admin and unlock it with the key in data/admin.key (the startup log shows its path). Configure LLM endpoints, discover models, test generation, tune narration, and monitor crews without restarting. Control panel guide.
Internet hosting: use the HTTPS deployment guide and bundled deploy/ templates. The supported setup keeps Java/inference ports private, exposes game routes through Caddy, and administers the relay over an SSH tunnel. Request, room, and inference limits are enabled in the application as well.
Configuration (command-line flags override environment variables; --help lists them):
| Environment variable | Flag | Default | Purpose |
|---|---|---|---|
PORT |
--port N |
1337 |
HTTP port |
HOST |
--host ADDRESS |
127.0.0.1, or 0.0.0.0 in LAN mode |
Listen address |
LAN_MODE |
--lan |
false |
Serve phones on the local network directly over HTTP |
LAN_ADMIN_ACCESS |
--lan-admin |
false |
With LAN mode, allow keyed administration at the relay’s numeric IP over HTTP |
DISCOVERY |
--no-discovery |
on in LAN mode | Answer app scans on UDP 1337 |
DATA_DIR |
--data DIR |
data |
Private room files, including operator credentials |
LLM_URL |
unset | Full OpenAI-compatible chat-completions URL | |
LLM_MODEL |
local |
Model identifier accepted by the inference server | |
LLM_API_KEY |
unset | Optional inference server bearer token | |
ADMIN_TOKEN |
generated data/admin.key |
Admin panel credential (at least 24 characters) |
LLM environment variables initialize the configuration on first start. After that, settings saved in the control room take precedence and persist in data/server-settings.json.
For a local llama.cpp-compatible inference server:
LLM_URL=http://127.0.0.1:8081/v1/chat/completions \
LLM_MODEL=your-storytelling-model \
./server/build/install/server/bin/server
The game works without an inference server. Model calls have a six-second timeout and fall back to the authored narration. The initial model integration adds atmosphere after resolved rounds; it does not yet interpret arbitrary actions or override rules. Authoritative outcomes are saved before the model is contacted.
Run Android
Open the project in Android Studio with an Android 35 SDK installed, or:
./gradlew :android:assembleDebug
adb install -r android/build/outputs/apk/debug/android-debug.apk
Both debug and testing release APKs support local HTTP connections. Use HTTPS for servers outside a trusted LAN. The app trusts CA certificates installed by the user (Settings → Security → Encryption & credentials → Install a certificate → CA certificate), so a relay behind a private or self-hosted CA, such as Caddy's internal CA, works once its root certificate is installed on the phone. The app has two relay modes. LAN connects over plain HTTP to a server started with --lan: tap Scan this network to find it, or enter its IP and port. Over USB, run adb reverse tcp:1337 tcp:1337 and use 127.0.0.1 (the emulator default is 10.0.2.2). Hosted takes the https:// address of a relay behind a proxy.
Turn alerts: while a game is unfinished and the app is in the background, de-praxis checks the relay every 10 seconds and notifies you when a new cycle starts, the host begins, a crewmate joins or is waiting on you, and when the game ends. A quiet "relay watch" notification shows while it runs; it stops when you return to the app, when the game ends, or after two hours without changes. Turn it off with ALERTS ON/OFF in the game screen or Stop alerts on the notification. No Google services are involved, so it works with self-hosted relays and F-Droid builds.
Create a transmission, share its six-character room code, and let the other operator join before the host begins. The host can also begin alone. Each round advances once every operator has submitted. A successful action is shown to both operators on the next poll (every 1.5 seconds while the app is visible).
The client keeps its room and operator token across restarts. LEAVE forgets that device's session; it does not remove the operator from the room. Keep the app session if you intend to reconnect to an active two-player game. There is no timeout, host kick, or session transfer yet.
Play the first campaign: Dead Channel
North Sea Relay 09, November 1986. The evacuation alarm has been playing for thirteen years. Tonight, it says your names.
You have twelve rounds before an unknown signal reaches the mainland. Restore emergency power and decode the evacuation signal. Then escape, optionally containing the presence first.
| Tactic | Effect |
|---|---|
| Observe | Automatically prepare yourself: +3 to your next check |
| Restore | DC 10 to bring emergency power online |
| Decode | DC 10 to recover the evacuation code |
| Contain | With power and code already available, DC 10 to isolate the presence |
| Escape | With power and code already available, escape without a roll |
| Improvise | Free-form description; DC 10 to grant everyone preparation |
Engineers receive +4 on Restore and Contain. Analysts receive +4 on Decode. Other checks receive +1. Preparation adds +3 and is consumed by a check; it does not stack. Teammates' actions resolve in crew order, with Escape last, so containment can finish before a teammate opens the airlock. Requirements are checked when submitting: you cannot choose Contain or Escape until power and the code are already available.
Free text is preserved in the transcript. For this slice, the selected tactic determines its mechanical effect. Flexible intent interpretation, combat, generated campaign graphs, lore ingestion, and DM exceptions are future work.
Campaign endings (spoilers)
- SILENT SHORE: contain the signal, then escape.
- CARRIER: escape while the signal remains active.
- DEAD AIR: spend all twelve rounds before escaping.
Write your own campaign
Campaigns are JSON files in the de-praxis/campaign@1 format: roles, actions, checks, scenes, clues and endings, with no code. Dead Channel itself is written this way in dead-channel.json; hollow-point.json adds locations, items, stats and private information. Check a campaign with:
./server/build/install/server/bin/server campaign validate my-campaign.json
See the format reference. The app lists the campaigns a relay offers when you create a room; today those are the built-in Dead Channel and Hollow Point. Importing your own campaigns, the Studio editor and sharing are planned in campaign-system.md.
Verify
./gradlew -PserverOnly :server:test
./gradlew :android:assembleDebug :android:lintDebug
python3 scripts/smoke.py http://127.0.0.1:1337
The smoke test creates its own room on a running server. Unit tests cover shared rounds, prerequisites, role bonuses, preparation, all endings, replay protection, authorization, capacity, and recovery of pending actions after restart.
Layout
shared/: serializable request/response types shared by client and server.server/: campaign rules, atomic room storage, HTTP API, optional model adapter.server/.../campaign/: campaign format, validator, engine andcampaign validatecommand.android/: Jetpack Compose terminal, network client, session recovery.docs/architecture.md: contracts and next steps.
This prototype uses original setting material and a small original dice system. For public testing, follow the internet-hosting guide. It remains an anonymous game service with bounded resources; accounts and recoverable user identities are future work.
License
de-praxis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.
See presentation and pacing for the current Dead Channel story flow, action rules and isolated Android Preview builds.
