How to use Nakama's Matchmaking with Unreal's netcode

Hello .
I was reading the docs about matchmaking and i noticed Default approach is to create a nakama server and then join players via matchmaking .
but unreal already has a netcode and creating a nakama server is not necessary .So how can i notify matchmaker that a server is running at an specific ip and port so it passes it to players when matched without Creating overhead?
p.s : my Game uses dedicated servers .
p.2 : its my first time Creating Game Backends .

Have a look at creating server-side matchmaking hooks.

In that code example we use it to create an authoritative rather than relayed match in Nakama, but you can just as easily use it to integrate with however you’re hosting dedicated servers and return connection information to the clients instead of a Nakama match ID.

I’m sorry but which part of my system should i deploy these go or lua codes in ? In Dedicated servers?

Have a look at Nakama’s runtime documentation. The logic should live in Nakama since that’s your matchmaking component and needs to know where to direct players to.

btw may you guys consider putting nakama in epicgames store . that store has 200k dev users .and free category is checked by users monthly because of monthly content .its not too much work since your plugin is already shipping-ready .

@irajsb That’s a great idea. Do you have any idea what is involved to get it added to the Unreal Marketplace?

rules:

publish:
https://publish.unrealengine.com/v2/welcome

1 Like

I have written a simple .ts file, shown below

let InitModule: nkruntime.InitModule = function (ctx: nkruntime.Context, logger: nkruntime.Logger, nk: nkruntime.Nakama, initializer: nkruntime.Initializer) {
        initializer.registerMatchmakerMatched(getServerIp);
        logger.info('RPC Registered');
}
let getServerIp: nkruntime.MatchmakerMatchedFunction = function (ctx: nkruntime.Context, logger: nkruntime.Logger, nk: nkruntime.Nakama) : string{
        logger.info('Matched With server IP 127.0.0.1')
        return JSON.stringify({"serverIP":"127.0.0.1"})
}

it should return a string with the server ip, but how does the client access the data sent by the server?

is it possible to start an authoritative match without nakama auto closing the session since we aren’t replicating data through nakama.

@SnappierSoap318 It’s best to set up a new thread to discuss your use case. This thread is over a year since it was marked solved. Thanks