Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.29 KB

File metadata and controls

74 lines (52 loc) · 2.29 KB

Pongo

A multiplayer Pong game built with Rust + WebGPU (client) and Cloudflare Durable Objects (server).

Play now →

Pongo gameplay

Buy Me a Coffee at ko-fi.com

Quick Start

cargo install wasm-pack       # Prerequisites: Rust, Node 20+
npx wrangler login            # One-time Cloudflare auth
npm run build && npm run dev  # http://localhost:8787

How to Play

Mode How
Multiplayer Click CHALLENGE → share link → JOIN
VS AI Click PLAY

Controls: Arrow keys or W/S · Touch on mobile
Rules: First to 5. Hit position affects ball trajectory.

Architecture

See ARCHITECTURE.md for the system diagram and component deep dive.

Key design decisions:

  • Shared game_core — Same ECS physics on client and server for prediction
  • Binary protocol — Minimal postcard serialization over WebSocket
  • Durable Objects — Each match is a stateful instance with 60Hz game loop

Project Structure

pongo/
├── game_core/       # ECS game logic (hecs) — shared by client/server
├── proto/           # Network protocol (postcard)
├── client_wasm/     # WebGPU renderer (wgpu)
├── server_do/       # Durable Object server
├── lobby_worker/    # HTTP endpoints + routing
└── worker/          # Built WASM + assets

Commands

npm run build        # Build WASM
npm run dev          # Local server
npm run test         # Run tests
npm run deploy       # Deploy to Cloudflare

Troubleshooting

Issue Fix
Build fails cargo install wasm-pack
Port in use Kill process or edit wrangler.toml
Reset state Delete .wrangler/state/

See ARCHITECTURE.md for technical details and game constants.

License

MIT