Is it possible to forcefully terminate any match from server side? If yes, how?
Hi @Shahariar_Ashik,
If you’re using authoritative matches with a server runtime match handler then you can absolutely terminate a match. You can achieve this by returning null
from one of the match handler functions, such as the matchLoop
function.
You can see an example of this here Nakama: Authoritative Multiplayer | Heroic Labs Documentation where it is used to terminate a match that has been empty for >100 ticks.
“These functions are called only by Nakama, they cannot be called directly by clients or other runtime code.” - It is said here that There are 7 functions required in any match handler. And they can’t be called directly by clients or other runtime code. Became Confused.
That’s correct, you do not call these functions directly yourself; instead you implement them as shown in the example and then register them as a match handler (an example is given on the page I linked).
How are you currently creating your matches? Are you doing this from the client? Please can you share some of your code.
Actually currently we are just researching if the feature is available in Nakama. Thanks for your answer.
Understood. Hopefully this helps make things clearer. We’re continuously improving our documentation so any feedback (particularly around areas you find confusing) is very welcome.
I would recommend reading through our Client Relayed Multiplayer and Server Authoritative Multiplayer documentation to learn more about the two approaches and specifically how they are handled in Nakama.
We have in-depth Client Guides which you may also wish to look at as they provide a full coverage of using Nakama’s feature set from our various client SDKs.
If you’re interested in learning more about our server runtime then please see our Server Framework documentation.
I hope this helps.