No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-13 15:28:18 +03:00
migrations feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00
src * wip 2026-09-13 15:28:18 +03:00
.env.example feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00
.gitignore feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00
AGENTS.md * wip 2026-09-13 15:28:18 +03:00
Cargo.lock feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00
Cargo.toml feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00
docker-compose.yml feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00
gameplay.json * wip 2026-09-13 15:28:18 +03:00
README.md feat: cascade realtime game server (rust, axum, mariadb) 2026-09-09 20:04:21 +03:00

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_status broadcasts
  • 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