No description
- Rust 69.4%
- JavaScript 18.7%
- CSS 7.1%
- HTML 2.5%
- Makefile 1.8%
- Other 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| static | ||
| .dockerignore | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Makefile | ||
| poong.jpg | ||
| README.md | ||
p∞ng
Multiplayer polygon Pong — one always-on arena where players sit on the edges of a regular N-gon (minimum 4 sides, up to 32 players). Each player has their own ball and scores by shooting it into another player's goal. Every client sees the arena from their own perspective with their paddle at the bottom.
Stack
- Rust + Axum — game simulation, HTTP, WebSocket, SSE
- Datastar — real-time scoreboard and activity feed via SSE
- WebSocket — paddle input and game state at ~30 Hz
- Canvas — POV-rotated arena rendering
Run
cargo run
Open http://localhost:8197 in one or more browser tabs. Use ← → (or A / D) to move your paddle.
Architecture
| Transport | Purpose |
|---|---|
POST /join |
Drop-in join with optional reconnect via player_id |
GET /events |
Datastar SSE — scoreboard, activity feed, player count |
GET /ws?player_id= |
Game state snapshots + paddle input |
Empty edges on a sub-4-player quadrilateral are solid walls. When a player leaves, the polygon reshapes after a 30s reconnect window.
