Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

devforgood/GameServerFramework

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

230 Commits
230 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game Server Framework

A game server framework built with open-source technologies to accelerate game server development. Supports MMORPG, MORPG, PVP, Action, and other genres. Primary languages: C# and C++.

🌍 Language Selection

🏗️ Project Structure

📁 Server Projects

  • Battle/ - Battle Server (In-game character movement and skill synchronization)
  • Lobby/ - Lobby Server (User authentication, matching, etc.)
  • Login/ - Login Server
  • Chat/ - Chat Server
  • Cache/ - Cache Server
  • IAP/ - In-App Purchase Server
  • GmTool/ - GM Tools

📁 Core Libraries

📁 Data & Tools

📁 Client

  • Client/ - Unity Client (includes pathfinding test tools)

📁 External Libraries

🚀 Quick Start

Requirements

# Install dependencies via vcpkg
./vcpkg install behaviortree-cpp
./vcpkg install protobuf:x64-windows

Key Dependencies

🏛️ Server Architecture

Server Architecture

Server Composition

  1. Lobby Server - User authentication, matching, and all features except in-game
  2. Battle Server - In-game character movement and skill synchronization
  3. AI Server - AI state management, pathfinding

In-Game Synchronization

  1. Character Movement Sync - Client key input → Server simulation → Client correction
  2. State Synchronization - Periodic sync of only changed objects (replication)
  3. Skill Synchronization - Skill information sync via RPC calls

Protocols

  • gRPC - Stateless protocol suitable for mobile environments
  • RUDP - Secures latency without unnecessary TCP processing

📊 Sequence Diagrams

Login Sequence

Login Sequence

Game Result Sequence

Game Result Sequence

Matching Sequence

Match Sequence

Matching v2 Sequence

Match v2 Sequence

🛠️ Development Tools

Unity Client Tools

  • Sample Terrain Generator - Terrain generation for pathfinding tests
  • Advanced Terrain Generator - Advanced terrain generation (various test scenarios)
  • Pathfinding Test Manager - Pathfinding agent management

Data Pipeline

  • JSON → Protobuf Conversion - Fast loading and automatic code generation
  • Factory Pattern Auto-Generation - ID-based object creation code automation
  • Reusable Property Structure - Component-based design

📈 Performance Optimization

GridManager

  • SIMD Vectorization - Simultaneous calculation of 8 distances using AVX2 instructions
  • Trigonometric Look-up Tables - Fast angle calculation using pre-computed values
  • Adaptive Grid Structure - Automatic Vector/HashMap selection based on data density

Processing Performance

  • 10,000 entities: AoE queries < 1ms
  • 100,000 entities: Line of sight range search < 5ms
  • SIMD optimization: 3-8x performance improvement over conventional methods

🤝 Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is distributed under the MIT License. See the LICENSE file for details.

📞 Contact

Project Link: https://github.com/yourusername/GameServerFramework

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.