A fast-paced, competitive multiplayer Snake game where players battle head-to-head on a shared battlefield. Built with modern C++ (C++17), Boost.Asio for networking, and Qt6 for a cross-platform client UI.
Two snakes competing for berries on a 64×64 grid
- WebSocket-based communication for real-time gameplay
- Server supports multiple concurrent game sessions
- Optimized network protocol with JSON payloads
- Multithreaded server with thread pool
- Client-server architecture with efficient state synchronization
- 60 FPS game loop with smooth rendering
- Fully internationalized UI (English/Russian)
- Easy to add new languages via Qt Linguist
- Dynamic language switching
- Unit tests for game logic (Google Test)
- UI component tests (Qt Test)
- Core: C++17, Boost 1.80+ (Asio, Thread, System)
- Networking: WebSockets over TCP
- Concurrency: Thread pool with work stealing
- Dependencies: nlohmann/json
- Framework: Qt6 (Core, Gui, Widgets, WebSockets)
- Rendering: Custom QWidget-based canvas
- Localization: Qt Linguist system
| Stage | Screenshot |
|---|---|
| Start Screen | ![]() |
| Gameplay | ![]() |
| Victory | ![]() |
- C++17 compatible compiler
- Boost 1.80+ (available via find package)
- Qt6 development libraries (available via find package)
- CMake 3.25+
# Server
mkdir server/build && cd server/build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
# Client
mkdir client/build && cd client/build
cmake .. -DCMAKE_PREFIX_PATH=/path/to/qt6
cmake --build .
