No description
- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| migrations | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| gameplay.json | ||
| README.md | ||
cascade
Realtime authoritative server for the "falling columns" match-3 puzzle game (described in the game design document): 5x12 wells, columns of 3 figures, cuts in 4 directions (including both diagonals), cascades, duel garbage and a server-side AI opponent.
- Rust (axum + Tokio), MariaDB (sqlx, auto-migrations)
- Modes: single survival, duel by room code, duel vs AI — all server-side
- Player accounts (argon2), admin password reset, per-mode player analytics
- Global Hall of Fame, ping measurement with
net_statusbroadcasts - Full match recording: timestamped replay of every input and event, the latest replays kept on the server and downloadable for local playback
Quick start
systemctl start docker # or however you start the daemon
docker compose up -d # MariaDB 11 on 127.0.0.1:3306 (db/user cascade)
cp .env.example .env # DATABASE_URL is required; admin is optional
cargo run # binds 0.0.0.0:8080 by default
In production point DATABASE_URL at your own MariaDB instance; everything
else is optional. Migrations apply automatically at startup.
All gameplay numbers (board size, figure types, speed curve, garbage, AI,
rounds, ...) are configured server-side in gameplay.json — see AGENTS.md
for the full field reference.
Documentation
- AGENTS.md — the complete implementation guide for AI agents: rules + decision log, protocol message catalog, database schema, replay format, config reference, testing and extension points.
Overview
| Area | Where |
|---|---|
| Game engine (pure, deterministic) | src/game/ |
| Rooms, match loop, persistence | src/room/ |
| WebSocket sessions and protocol | src/ws/ |
| REST: auth, stats, hiscores, replays, admin | src/api/ |
| Replay recorder / re-simulation | src/replay/ |
| Migrations | migrations/ |
cargo test # engine, auth and replay determinism tests
cargo clippy --all-targets # expected to stay at 0 warnings