Rocket Networking Docs🚀
  • About this Documentation
  • Basics of Rocket Networking
    • Room based multiplayer (Auto State Sharing)
      • Clients and clientId
      • Entities
      • Smart Entities
    • Single Message Sharing
    • Persistent Objects on the Server
    • Easy Matchmaking
    • Discord Server Integration
    • Database for your Account
    • Server Side Scripting
    • Global Multiplayer(Cross play)
  • Rocket Networking Code
    • Connecting and Disconnecting
      • ConnectToServer()
      • callback_ConnectToServer()
      • DisconnectFromServer()
      • callback_DisconnectFromServer()
    • Rooms
      • ChangeRoom( new_room_name )
      • callback_ChangeRoom()
      • LeaveRoom()
      • callback_LeaveRoom()
      • ShowAllClientsInRoom(room_name ) and callback_ShowAllClientsInRoom()
      • ShowAllRooms() and callback_ShowAllRooms()
    • Private Messaging
      • SendEventToClient
      • callback_ReceivedEvent
      • SendMessageToClient
      • callback_ReceivedMessage
    • Persistent Objects
      • CreatePersistentObject(roomId , persistentObjectStruct)
      • callback_CreatedPersistentObject()
      • EditPersistentObject(persistentObjectId , new_persistentObjectStruct)
      • DestroyPersistentObject(persistentObjectId)
      • ShowPersistentObjectsInRoom(room_name)
      • callback_ShowAllPersistentObjectsInRoom(array_of_persistent_objects)
    • Database Functions
      • SetSimpleData()
      • callback_SetSimpleData()
      • ReadSimpleData()
      • callback_ReadSimpleData()
      • AddToSimpleData()
      • callback_AddToSimpleData()
      • DeleteSimpleData()
    • Discord Integration
      • SendDiscordMessage()
      • callback_DiscordMessageReceived()
    • AI Functions
      • CallSimpleAI
      • callback_CallSimpleAI
      • CallGeneralAI
      • callback_CallGeneralAI
  • KickPlayer(client_id)
  • ViewServerActivity()
    • callback_ViewServerActivity()
  • oBrain - ping and pseudoHost
  • Admin Callbacks
  • API
    • Database
    • AI
  • Server Side Scripting
    • Basics
    • Understand the heirarchy on the server
    • Create a Persistent Object from Server
    • Important Scripts
      • "step" Script format
      • "client_sent_event" Script format
      • "game_server_created" Script format
    • Send Event to a Client from Server
    • Database Functions on Server
    • AI Functions on the Server
Powered by GitBook
On this page
  1. Basics of Rocket Networking

Easy Matchmaking

Rocket Networking comes equipped with a very easy to use matchmaking system.

Credit for this idea goes to @nils0445 on discord!

What is a match? In terms of Rocket Networking, it is an RNet room right? Because players/clients in that RNet room will be able to "see" each other.

So matchmaking is just the problem of taking players/clients from some lobby (which is also a RNet room), pair them up or make a set of them and put them in this "match" RNet room. And every "match" must be a different RNet room.

Auto Matchmaking System

If a client wants to be in the matchmaking lobby waiting, all they have to do is ChangeRoom() to the room name "auto_matchmake_<size>" , where size is the number of players that should be in your match. For example ChangeRoom("auto_matchmake_2")

Every 10 seconds, all the players in the room "auto_matchmake_2" will be paired up and put into some other rooms called "auto_match_<someuniqueidentifier>" like "auto_match_Lb5vJ8" and so on.

So if there are 7 players waiting in room "auto_matchmake_2" , then 3 pairs will be created and put into 3 different rooms like "auto_match_7BjvM7", "auto_match_vmdk8", "auto_match_osm4m", and 1 player will not be matched(because there is no one to match this player with) and will stay in waiting.

You can do this for a match of any size.

PreviousPersistent Objects on the ServerNextDiscord Server Integration

Last updated 1 year ago