Authoritative tournament

Hi , I new to Nakama and my english is poor. But thank you for developing a so good server for everyone !

when I use buildin tournament , I find that do not have a authoritative option like leaderboard, so how can I prevent client to wirte record?

And I find a problem with tournament_records_haystack runtime function of Lua, it do not return a “rank” value, the same funtion in Go runtime work OK.

My Nakama version is 2.13.0

Thanks!

Hi @xiaoNiuNew welcome :wave:

when I use buildin tournament , I find that do not have a authoritative option like leaderboard, so how can I prevent client to wirte record?

That’s a good question. The reason that there’s no flag to pass in to tournaments to create them and mark them authoritative is that they’re already marked authoritative inside the game server when they’re created.

And I find a problem with tournament_records_haystack runtime function of Lua, it do not return a “rank” value, the same funtion in Go runtime work OK.

Sounds like you found a small bug. Please can you open an issue on the repo and we’ll resolve it as part of the next server release. Also be sure to include the Lua code you used to test as a reference example to help us reproduce the issue faster.

Finally thanks for the kind words about the game server! :pray:

But there is a write record funtion of client in Doc here
https://heroiclabs.com/docs/gameplay-tournaments/#write-tournament-record
Althonght I did not test this clinet funtion :sweat_smile: , is it deprecated ?

OK, I have open a issue

Althonght I did not test this clinet funtion :sweat_smile: , is it deprecated ?

No. When I mentioned that tournaments are already authoritatively controlled I meant it in the natural language sense of the word “authoritative”. A user must request to join a tournament and may only join if the tournament is not already full. This means it is controlled authoritatively by logic on the server.

If you’d like to perform velocity checks on scores submitted by users to a tournament or want to prevent the use of the client API to submit scores for tournaments you can simply attach a before hook to the API: https://heroiclabs.com/docs/runtime-code-basics/#before-hook

1 Like