Code Monkey home page Code Monkey logo

matchmaker's Introduction

matchmaker simulation

Example source code for https://mas-bandwidth.com/creating-a-matchmaker-for-your-multiplayer-game

To run the simulator:

make && ./dist/matchmaker

You should see output like this:

2024-02-18 04:57:15:      25312 players    2s average search time    33ms average latency
2024-02-18 04:57:16:      25288 players    2s average search time    33ms average latency
2024-02-18 04:57:17:      25308 players    2s average search time    32ms average latency
2024-02-18 04:57:18:      25300 players    2s average search time    32ms average latency
2024-02-18 04:57:19:      25308 players    2s average search time    33ms average latency
2024-02-18 04:57:20:      25308 players    2s average search time    33ms average latency
2024-02-18 04:57:21:      25296 players    2s average search time    33ms average latency
2024-02-18 04:57:22:      25284 players    2s average search time    33ms average latency
2024-02-18 04:57:23:      25296 players    2s average search time    33ms average latency
2024-02-18 04:57:24:      25288 players    2s average search time    32ms average latency
2024-02-18 04:57:25:      25276 players    2s average search time    33ms average latency
2024-02-18 04:57:26:      25268 players    2s average search time    32ms average latency
2024-02-18 04:57:27:      25256 players    2s average search time    32ms average latency
2024-02-18 04:57:28:      25260 players    2s average search time    32ms average latency

To view the real-time visualization of players on a map, just open map/index.html in a browser.

Or you can just watch it on YouTube:

image

The datasets are included under the "data" folder. In particular, players.csv defines the player lat/long coordinates joining each second.

The rest of the data defines the set of datacenters and the latency maps per-datacenter.

Tested on MacOS. Linux should work. Windows untested.

matchmaker's People

Contributors

gafferongames avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.