Lightweight multiplayer game lobby server built with Go, Swagger, and planned WebSocket support.
game-server is a backend project written in Go for managing game rooms and players.
It started as a simple HTTP API project and is being extended toward real-time multiplayer communication with WebSockets.
The main goal of this repository is to practice backend engineering through a practical project instead of building only basic CRUD apps.
- HTTP API built with Go
- room creation flow
- joining players to rooms
- room state fetching
- Swagger documentation
- UUID-based identifiers
- project structure split into
cmd,internal, anddocs
- WebSocket support for real-time communication
- live room events
- player disconnect handling
- better validation and error responses
- tests
- persistence layer
- Docker support
- Go 1.25
net/httpgithub.com/google/uuidgithub.com/swaggo/swaggithub.com/swaggo/http-swagger
game-server/
├── cmd/
│ └── game-server/
│ └── main.go
├── internal/
│ └── ...
├── docs/
│ └── ...
├── go.mod
└── go.sum
git clone https://github.com/SculptTechProject/game-server.git
cd game-servergo mod tidygo run ./cmd/game-serverThe server should start locally on:
http://localhost:8080
Swagger UI should be available at:
http://localhost:8080/swagger/index.html
If you change endpoint annotations, regenerate the docs with:
swag init -g cmd/game-server/main.goThis project is centered around a simple multiplayer room flow:
- Create a room
- Join a player to a room
- Fetch room state
- Extend communication toward real-time gameplay events
Example endpoint ideas used in the project:
POST /create-roomPOST /join-roomGET /get-roomGET /health
The next major step for this project is WebSocket support. The idea is to move from a simple request-response lobby API into a real-time multiplayer server foundation.
Planned WebSocket-related goals:
- keep live player connections per room
- broadcast join and leave events
- push room state updates instantly
- support game events without constant polling
- prepare the codebase for real-time match logic
I built this project to learn backend development in Go in a more practical way. Instead of stopping at basic REST endpoints, I want to grow it into something closer to a real multiplayer backend.
This project helps me practice:
- backend architecture in Go
- API design
- shared state management
- Swagger integration
- real-time server thinking
- evolving a project from prototype to stronger backend foundation
- Basic HTTP server
- Room creation
- Join room flow
- Swagger integration
- Better request validation
- Improved error handling
- Unit and integration tests
- WebSocket connections
- Real-time room events
- Persistent storage
- Docker setup
Suggestions, issues, and improvements are welcome.
Created by SculptTechProject