Hi,
So I am making a game and using the lovely matchmaker using one parameter to match the player, CupsCount
players in the same range of CupsCount
will be matched. I could make the player submit the query and parameters but I want to avoid cheating (submitting lower CupsCount
to match with low experience players)
So I used RegisterBeforeRt hook with Id “MatchmakerAdd” to create the query and assigned the CupsCount
CupsCount
is stored in the account metadata so I have to retrieve the user account.
Next the played added to the pool and get matched,
when the player join the match i will retrieve his account to use some data in metadata in the game logic
To avoid reading the player account twice (before adding the pool and when joined the match), Do you recommend me to pass user metadata fetched before adding player the pool to match like below
envelope.GetMatchmakerAdd().StringProperties["user_metadata"] = accountMetadata
matchID, err := nk.MatchCreate(ctx, modulename, entries) // entries contains StringProperties["user_metadata"]