Skip to content

utfunderscore/matchmaker-rs

Repository files navigation

Matchmaker Logo

Rust MIT License Build Status


🎮 Matchmaker RS

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.


Features

  • Real-time matchmaking via WebSockets
  • Flexible queue and match management
  • Modular Rust backend
  • HTTP API for queue operations
  • Benchmarking tools for performance analysis

Matchmakers

Elo

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 match

Required metadata

elo:              # Numerical representation of player skill (e.g., Elo rating)

Flexible

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 match

Required metadata

None (entries are grouped by size; no specific player metadata required).


📁 Project Structure

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)

Prerequisites

  • 🦀 Rust (latest stable, recommended via rustup)
  • 🐍 uv (for Python dependency management)
  • 🧪 (Optional) Bruno for API testing

Build & Run (Rust Backend)

  1. Clone the repository:

    git clone <repo-url>
    cd matchmaker
  2. Build the Rust workspace:

    cargo build --release
  3. Run the HTTP API server:

    cd http-api
    cargo run --release

    The server will start and listen for HTTP/WebSocket connections.


Benchmarking

  1. Install Python dependencies:

    cd benchmark
    uv sync
  2. Run benchmarks:

    uv run main.py

Contributing

Contributions are welcome!
Please open issues or pull requests for bug fixes, features, or improvements.


License

This project is licensed under the MIT License.

About

Videogame matchmaker written in rust

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •