[v2.1.0] MatchmakingService - ON HOLD

Seems to be completely functional now. Thank you for your quick responses!
I will be pushing this new update to my live build now.

1 Like

I dont know if i missed anything while reading the documentation, but is there a way to make a server list of queue-able servers? Kind of like this

image

You can use GetRunningGames()

https://steven4547466.github.io/MatchmakingService/maindocs/#getting-running-games

This accepts a filter function, if you want to get every joinable running game:

local games = MatchmakingService:GetRunningGames(math.huge, function(data) return data.joinable end)

This will return an array that looks like this:

{
    {
        key=gameCode;
        value=gameData;
    },
    {
        key=gameCode;
        value=gameData;
    },
    ...
}

Passing math.huge for max should return every game that passes the filter. For more info please see the linked docs.

EDIT: Iā€™m going to edit this 3 hours later to avoid future questions from other people.

You can add players to running games using:
MatchmakingService:AddPlayerToGame(player, gameId, updateJoinable) (https://steven4547466.github.io/MatchmakingService/maindocs/#adding-a-player-to-an-existing-game)

gameId is the key part in the dictionary.

2 Likes

Here to report another error lol (Version 1.3.1).

ServerStorage.Modules.MMService:1151: invalid argument #1 to 'pairs' (table expected, got nil)
ServerStorage.Modules.MMService, line 1151 - function RemovePlayerFromQueueId
ServerStorage.Modules.MMService, line 225

Update: This error is getting annoying because it seems to happen any time someone leaves. I donā€™t even run the function RemovePlayerFromQueueId, so I donā€™t even know why this is happening.

Update 2: Now there is another error that occurs when iā€™m trying to RemovePlayersFromQueue.

Argument 3 missing or nil
ServerStorage.Modules.MMService, line 1319 - function RemovePlayersFromQueueId
ServerStorage.Modules.MMService, line 1445 - function RemovePlayersFromQueue
ServerStorage.KnitServices.LoadService, line 820 - function Cancel

Will look into this, I have a quick fix but it wonā€™t solve the full problem.

Version 1.3.2

Changes (breaking):

  • None

Changes (non-breaking):

  • None

Fixes:

  • [Fix] Delimiter for memory is now two underscores. This allows maps to have names with a single underscore.

  • [Fix] Added a quick fix for an issue where queue would not be removed if no one was in it, which caused an error.

Sorry to bother you so much, but while this did fix my previous issues now thereā€™s a new error.

Argument 3 missing or nil
ServerStorage.Modules.MMService, line 546
1 Like

Youā€™re fine, and yeah I did miss something. Iā€™ve merged a fix into 1.3.2. Let me know if you encounter anything else.

2 Likes

Do you need to call update ratingS?

No, you do not need to call update ratings. If you never call updating ratings, it basically keeps everyone at 0 rating which is the same as having no ratings at all.

1 Like

Oh and thank you for this service! I used it in my game BigSnow.io - Roblox

If you encounter any bugs, let me know!

Hi @steven4547466 , I needed to use this service for my own game. However, iā€™m not sure if you need a seperate matchmaking place or the queue system queues up multiple players from different servers when they are finished with the main menu.

Let me explain:

This is how my game works:

  1. The player joins the main menu place and chooses their stuff, gamemode and gets ready to join a game. (note the main menu place is made specifically for 1 player to ready up and choose what they want to play. Its not a place where players join up to choose things then teleport to another place)

  2. Using this matchmaking system, it brings in a group of players and teleports them to the main game.

When i saw the MatchmakingService topic that you created. I thought what you meant by hub is a seperate place from the main menu, where players join and get listed in the queue in that specific server they joined of that Matchmaking place then they teleport. However, im not sure if thats neccessary at all.

All this service does, essentially, is pool together players into an array and then sends them into games once thereā€™s enough players. You could do this from any game in your universe which is not marked as a game server.

So basically call QueuePlayer from anywhere in your gameā€™s universe (except servers marked as a game server) and it will work. You can get more info here: Matchmaking Service.

Basically, you can let players queue from the main menu, or you can add a hub. Either works, it depends on how you want to do it. Players donā€™t need to be in the same server to get into the same game as other players as itā€™s fully universal. Just know that all games need to be within the same universe for this to work.

1 Like

oh ok, now thats better. Now i know its fully universal and i also know what to do. TYSM

Now i dont need to use MemoryStore or any other cheesy and hacky way to do the Matchmaking system for my own game.

This is very simple indeed, well done.

1 Like

Hey, can you add a function that you give it a player, and it gives you the game its in (Mainly show it shows like 6/10 players)

You should be able to do this with MatchmakingService:GetRunningGame(MatchmakingService:GetPlayerInfo(player).curGame). This works becauses GetPlayerInfo returns curGame in it which is the game code that you can pass to GetRunningGame.

You can do this with user ids as well: MatchmakingService:GetRunningGame(MatchmakingService:GetPlayerInfoId(UserId).curGame)

2 Likes

Heya! This module sounds extremely beneficial for a dungeon queue system Iā€™m working on, but I was wondering should I rely on this module for a fully shipped game?

This module should be in a stable state for pretty large games. I havenā€™t had any bug reports since the latest version and a few games that I know use the module and actively speak with when problems come up havenā€™t told me about any issues recently. If you are making a game with this, feel free to send me a friend request on discord (pm me so I can reply with my username and tag) so you can notify me of any issues or ask any questions, I usually respond faster on there and I love to talk with users of my modules.

1 Like

If the round data is sent through TeleportData, wouldnā€™t an exploiter be able to modify it?