🎉 Play with your friends here 🎉
Open-source HaxBall implementation with Rust WebSocket server and TypeScript client.
packages/
├── server-rust/ # Rust WebSocket server with physics engine
├── client/ # Browser client with rendering
└── shared/ # Shared TypeScript game logic
- Rust (1.70+)
- Node.js (18+)
# Install dependencies
npm install
# Run both server and client
npm run devThe Rust server runs on ws://127.0.0.1:3001 and the client dev server runs on http://localhost:8080.
Server only:
npm run dev:server
# Or directly: cd packages/server-rust && cargo runClient only:
npm run dev:client- Real-time multiplayer physics
- WebSocket communication with binary protocol
- Collision detection and resolution
- Player movement with keyboard input
- Canvas rendering
Binary WebSocket protocol with MessagePack serialization:
Join- Client joins roomInput- Player keyboard stateGameState- Server broadcasts physics state (60 tick/s)
MIT