Files
de-praxis/README.md
T
juli 523a6c0d1d Release 0.1.0-alpha.2 under GPL-3.0-or-later
Bump version to 0.1.0-alpha.2 (code 2), add release notes and F-Droid changelog, license the project under the GNU GPL v3 or later, and pick release notes by version when publishing.
2026-10-24 23:23:49 +02:00

6.5 KiB

de-praxis

de-praxis — cooperative terminal horror

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:8080. GET /health returns {"status":"ok"}. Room files are saved atomically under ./data; keep this directory across restarts. Run one server process per data directory.

Server control room: open http://127.0.0.1:8080/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.

Configuration:

Environment variable Default Purpose
HOST 127.0.0.1 Set 0.0.0.0 for a LAN device or container
PORT 8080 HTTP port
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 defaults to http://10.0.2.2:8080 on an emulator and http://127.0.0.1:8080 on a physical device, which works over USB after adb reverse tcp:8080 tcp:8080. Over Wi-Fi, start the server with HOST=0.0.0.0 and enter your computer's LAN address.

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.

Verify

./gradlew -PserverOnly :server:test
./gradlew :android:assembleDebug :android:lintDebug
python3 scripts/smoke.py http://127.0.0.1:8080

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.
  • 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. It is intended for local/LAN play. Internet hosting needs TLS termination, request/room limits, operational timeouts, and an account/session recovery design.

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.