Skip to content

Mick3l/pvp_snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Multiplayer Snake Battle Arena

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.

Game Screenshot Two snakes competing for berries on a 64×64 grid

🎮 Key Features

🕸️ Modern Networking

  • WebSocket-based communication for real-time gameplay
  • Server supports multiple concurrent game sessions
  • Optimized network protocol with JSON payloads

⚡ Performance Optimizations

  • Multithreaded server with thread pool
  • Client-server architecture with efficient state synchronization
  • 60 FPS game loop with smooth rendering

🌍 Localization Support

  • Fully internationalized UI (English/Russian)
  • Easy to add new languages via Qt Linguist
  • Dynamic language switching

🧪 Comprehensive Testing

  • Unit tests for game logic (Google Test)
  • UI component tests (Qt Test)

🏗️ Technical Stack

Server Components

  • Core: C++17, Boost 1.80+ (Asio, Thread, System)
  • Networking: WebSockets over TCP
  • Concurrency: Thread pool with work stealing
  • Dependencies: nlohmann/json

Client Components

  • Framework: Qt6 (Core, Gui, Widgets, WebSockets)
  • Rendering: Custom QWidget-based canvas
  • Localization: Qt Linguist system

🖥️ Screenshots

Stage Screenshot
Start Screen Start Screen
Gameplay Gameplay
Victory Victory

🚀 Getting Started

Prerequisites

  • C++17 compatible compiler
  • Boost 1.80+ (available via find package)
  • Qt6 development libraries (available via find package)
  • CMake 3.25+

Building

# 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 .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •