# Lithios **Repository Path**: CoderPPX/lithios ## Basic Information - **Project Name**: Lithios - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-19 - **Last Updated**: 2026-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Lithios A small but genuinely playable Minecraft-like voxel sandbox for Fedora Linux. C++20 · CMake + Ninja · LLGL (Vulkan) · Slang → SPIR-V shader packs · miniaudio · multithreaded world streaming · deterministic generation. ## Requirements - Fedora Linux x86-64 with a Vulkan-capable GPU - `gcc-c++`, `cmake`, `ninja-build`, `python3` - Development libraries: ```bash sudo dnf install -y vulkan-headers vulkan-loader-devel vulkan-tools \ vulkan-validation-layers spirv-tools glm-devel doctest-devel \ fmt-devel spdlog-devel json-devel libzstd-devel \ libX11-devel libXi-devel libXrandr-devel libXcursor-devel ``` ## Setup ```bash git submodule update --init --recursive # LLGL, stb, FastNoiseLite, miniz, miniaudio scripts/setup-slang.sh # extract supplied Slang into thirdparty/slang ``` ## Build / Test / Run ```bash cmake -G Ninja -B build/dev -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build build/dev # builds both shader packs + the default resource pack ctest --test-dir build/dev --output-on-failure # unit + dependency + regression suite ./build/dev/src/lithios play --world myworld # play (headless capture by default) LITHIOS_WINDOWED=1 ./build/dev/src/lithios play --world myworld # interactive window ``` ### Commands | command | purpose | | --- | --- | | `lithios play [--world NAME]` | first-person sandbox; saves on exit | | `lithios server --world NAME [--port P] [--max-players N] [--view-dist N] [--motd S]` | dedicated authoritative server (Ctrl+C saves + exits) | | `lithios connect [port]` | join a server (`LITHIOS_USERNAME`/`LITHIOS_PASSWORD`; the GUI login screen is the interactive path) | | `lithios demo` | streaming-world orbit (offscreen capture by default) | | `lithios visual-test --output F` | deterministic offscreen renders | | `lithios worldgen-diagnostic [seed]` | biome/height overview maps | | `lithios stream-stress [--seconds N]` | multithreaded streaming stress + integrity | | `lithios benchmark [--seconds N]` | performance report (markdown) | | `lithios check-env` | environment self-check | Scenes: `basic-cube`, `chunk-boundary`, `worldgen[-desert|-forest|-jungle|-mountains|-tundra|-sunset|-night]`, `gui-*`. ### In-game controls (LITHIOS_WINDOWED=1) WASD move · Space jump · Shift sprint · F fly · T chat · mouse look · LMB break · RMB place · 1-9 / wheel hotbar · Esc menu. Every action is rebindable in Options → Controls (persisted in `settings.json` `keybinds`). ### Packs and asset paths - The runtime reads everything from packs; there is no loose asset tree. Shader packs (`shaders/*/` → `build/assets/shader_packs/*.lspack`) and the resource pack (`assets/default/` → `build/assets/default.rpack`) are built by CMake. See `docs/shader-packs.md` and `docs/resource-packs.md`. - Shader pack selection: settings `shaderPack` (`core.simple` default, `core.pbr` = PBR profile); `LITHIOS_SHADER_PACK=` overrides for A/B. - Resource packs: settings `texturePack`/`soundPack` (both `default`); `LITHIOS_PACKS=` adds a scan directory. Worlds save under `~/.local/share/Lithios/worlds` (override with `LITHIOS_WORLDS`). ## extra.md activation record Per AGENTS.md §8 the extra roadmap is implemented only when explicitly activated. Activated so far (each recorded in `artifacts/problem.md`): - **E1/E1b** — cubiomes-based worldgen (MC 1.21.3 semantics), climate-driven biomes, caves, ores, vegetation, boar/sheep habitat spawning. - **E2** — enhanced lighting: day/night cycle + sky, HDR + bloom + ACES, sun shadows (single eye-anchored cascade), analytic water. The `core.pbr` shader pack (GGX + per-texel normal/ORM) implements E2's material profile; SSAO/SSR/IBL remain unactivated options. - **E4 (minimal subset)** — resource packs (`.rpack`) and the versioned shader-pack contract v2 (`.lspack`). - **E3 (2026-08/09)** — advanced shader packs: manifest v3 (deferred topology over closed engine pass slots, pack-declared intermediates / textures / options / profiles), the offline C++ `shaderpack_compiler` driving the prebuilt slangc binary, archive v3 (per-target layout, sha256 manifest, dependency graph, content-addressed build cache), and `core.unbound` — a deferred pipeline port of Complementary Unbound (gbuffer MRT, deferred lighting, screen-space volumetric light, TAA, raymarched clouds, blended deferred water) as the acceptance use case. **Deliberate descope, recorded per AGENTS.md §9:** E3's text names the "official prebuilt libslang API"; the compiler drives the prebuilt `slangc` CLI as a subprocess instead (same external prebuilt distribution, no ABI coupling, SPIR-V interface extraction replaces libslang reflection). E3 pieces NOT implemented: SSBO/compute-image contracts (compute slot is declared but inert), archive signing, and full Complementary feature parity (colored-light voxelization, WSR, LOD-mod passes are out of scope; see `artifacts/HANDOFF.md`). - **E6 (2026-11)** — authenticated client/server multiplayer: one authoritative `GameServer` shared by single-player (in-process loopback transport) and dedicated servers (`lithios server`); encrypted TCP with X25519 key agreement + secretbox frames (libsodium), Argon2id account storage (no plaintext, no user enumeration, brute-force lockout), session-token reconnect, chunk/edit/entity replication over the same wire protocol both transports speak, server-list status probes. - **E5 (2026-11)** — Python mods through embedded pybind11: mod packages (`mod.json` + common/server/client entries, dependency-sorted, api-version gated), the `lithios` Python API (log/events/world/commands/ audio/blocks), server-side world edits routed through the authoritative pipeline, client-side block registration before the renderer binds. - **E9 (2026-11)** — advanced GUI: server list + direct connect + login/ error screens, in-game chat, mod management, resource/shader pack selection, graphics profile presets + lighting toggle, key rebinding, UI scale, text seeds in world creation. E7/E8/E10/E11/E12 are **not** implemented by design. ## Architecture See `architecture.md` (invariants) and `docs/` (decision records, research notes, environment report). Highlights: - world/simulation is LLGL-free (enforced by the depcheck test); - rendering variation lives in versioned Slang shader packs (`.lspack`, no compiler at runtime); - deterministic, scheduling-independent world generation; - multithreaded chunk streaming with a per-chunk state pipeline; - versioned saves: only player-modified chunks persist; - single-player and multiplayer share one authoritative simulation (`server/GameServer`) behind loopback / encrypted-TCP transports; - Python mods run in an embedded interpreter with hot paths kept in C++/Slang (`docs/mods.md`).