A scalable matchmaking system for video games, utilizing WebSockets for real-time state tracking and notifications.
Designed for flexibility and performance, this project enables efficient player queue management and match creation.
- Real-time matchmaking via WebSockets
- Flexible queue and match management
- Modular Rust backend
- HTTP API for queue operations
- Benchmarking tools for performance analysis
A matchmaker that pairs players based on their proximity in skill level. Uses an expanding range to pair players over time.
Max 2 teams
Settings
team_size: # Number of players per team
scaling_factor: # The rate at which the range expands over time (scaling_factor * time_in_queue in seconds)
max_skill_diff: # Maximum allowable skill difference between players to be considered for a matchRequired metadata
elo: # Numerical representation of player skill (e.g., Elo rating)A matchmaker that forms teams of variable sizes to reach a target team size, allowing for flexible group compositions.
Supports multiple teams per match and can accommodate entries of different sizes within defined limits.
Settings
target_team_size: # Desired number of players per team
min_entry_size: # Minimum allowed size for an entry (group)
max_entry_size: # Maximum allowed size for an entry (group)
num_teams: # Number of teams to form per matchRequired metadata
None (entries are grouped by size; no specific player metadata required).
| Folder | Description |
|---|---|
common/ |
Shared Rust library code for matchmaking logic |
http-api/ |
Rust HTTP API server for queue/match operations |
benchmark/ |
Python benchmarking scripts and tools |
bruno/ |
API testing scripts (Bruno) |
- 🦀 Rust (latest stable, recommended via rustup)
- 🐍 uv (for Python dependency management)
- 🧪 (Optional) Bruno for API testing
-
Clone the repository:
git clone <repo-url> cd matchmaker
-
Build the Rust workspace:
cargo build --release
-
Run the HTTP API server:
cd http-api cargo run --releaseThe server will start and listen for HTTP/WebSocket connections.
-
Install Python dependencies:
cd benchmark uv sync -
Run benchmarks:
uv run main.py
Contributions are welcome!
Please open issues or pull requests for bug fixes, features, or improvements.
This project is licensed under the MIT License.
