Real-time multiplayer arena shooter with classic Pacman characters
Live Demo • Getting Started • Tech Stack • Contributing
Pacman is an open-source multiplayer battle game where players control Pacman-style characters in fast-paced arena combat. Built with modern web technologies, it showcases real-time game development with WebSocket communication and Protocol Buffers.
- Real-time Multiplayer - Up to 6 players per room
- Low Latency - 16ms tick rate with binary WebSocket messages
- Canvas Rendering - Smooth 60fps gameplay
- Room System - Create or join game rooms
- Responsive - Works on desktop browsers
# Clone repository
git clone https://github.com/akashwarrior/pacman.git
cd pacman
# Setup backend
cd backend
cp .env.example .env
go run .
# Setup frontend (new terminal)
cd frontend
cp .env.example .env.local
pnpm install
pnpm devOpen http://localhost:3000 to play.
| Key | Action |
|---|---|
W A S D / Arrow Keys |
Move |
Space |
Shoot |
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4 |
| Backend | Go, gobwas/ws, Protocol Buffers |
| Rendering | Canvas 2D API |
| Communication | WebSocket (binary), Protobuf |
pacman/
├── frontend/ # Next.js application
│ ├── src/
│ │ ├── app/ # Pages & routing
│ │ ├── components/ # UI components
│ │ ├── hooks/ # Game & room hooks
│ │ ├── lib/ # Renderer, constants
│ │ ├── services/ # API & WebSocket
│ │ └── types/ # TypeScript & Protobuf
│ └── public/map/ # Arena maps
│
└── backend/ # Go game server
├── main.go # HTTP server
├── room.go # Game rooms & logic
├── game.go # Physics & collision
├── player.go # Player state
└── map/ # Server-side maps
PORT=8080
ALLOWED_ORIGINS=http://localhost:3000
ROOM_IDLE_TIMEOUT=300
MAX_REQUEST_BODY=4096NEXT_PUBLIC_BACKEND_URL=http://localhost:8080
NEXT_PUBLIC_WS_URL=ws://localhost:8080/api/playContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/new-feature) - Commit changes (
git commit -m 'Add new feature') - Push to branch (
git push origin feature/new-feature) - Open a Pull Request
This project is open source.
Made with ❤️ by Akash
