Developer Guide¶
Version:
0.1.0Status: early alpha. Internal systems are still being reshaped, so public-facing promises should stay conservative.
Architecture Overview¶
The project is split into four main module areas:
src/engine: gameplay state, input, main loop, networkingsrc/world: world generation, chunks, blocks, items, save persistencesrc/entities: player and mob implementationssrc/renderer: terminal rendering
Top-level entry points:
src/main.rs: CLI mode selection and process startupsrc/lib.rs: module exports
Runtime Shape¶
Single-player local mode:
maincreates the terminal rendererGameLoopprocesses crossterm input- input is normalized into
ClientCommand GameStateapplies the command and advances simulationRendererdraws the visible world and UI
Experimental multiplayer path:
- the server runs authoritative simulation ticks
- clients send
ClientInputFrame - the server streams
ServerSnapshotand chunk deltas - the protocol is version-tagged in
src/engine/net.rs
Current network protocol version in code: 5
Public positioning recommendation:
- do not market the current server/client path as a flagship feature
- describe it as experimental until local-play parity and networking parity are materially closer
Input Boundary¶
ClientCommand in src/engine/command.rs is the transport-neutral input boundary.
That is the right layer to change if you want to:
- add a new keybind
- add a network-safe player action
- keep local and remote input behavior aligned
Rendering Approach¶
Rendering is terminal-native rather than tilemap-based.
Important traits of the renderer:
- dimension-aware sky/background treatment
- scene-aware entity contrast adjustments
- terminal-friendly glyph palettes rather than pixel sprites
- view-relative world draw with UI overlays rendered afterward
The main renderer lives in src/renderer/terminal.rs.
Save And Persistence Model¶
- chunk saves live in
src/world/chunk.rs - progression saves live in
src/engine/state.rs - both use atomic temp-file writes
- chunk saves use a compressed
MCCFenvelope - progression saves are versioned bincode payloads
See World Format for the current file layout.
Contribution Workflow¶
Recommended local checks:
cargo fmt --all
cargo test --quiet
cargo clippy --all-targets -- -D warnings
./scripts/release_smoke.sh
Useful operational files:
README.md: public-facing overview and quick startdocs/: detailed player and developer documentationscripts/release_smoke.sh: local release smoke gateRELEASE_CHECKLIST.md: release/tag checklist in the repo root
Documentation And Media¶
Docs publishing is built from:
mkdocs.ymldocs/.github/workflows/docs.yml
Current checked-in media used by the public docs:
docs/assets/termcraft.gif: README teaserdocs/assets/termcraft.mp4: docs landing-page highlightdocs/assets/termcraft-teaser.mp4: source teaser clip used to generate the GIF
See Media Credits for soundtrack and asset attribution.
Contact¶
For contributor questions, release coordination, or bug reports, contact: pagel.sebastian.1@gmail.com