# Keeping Matches Open After Players Leave

**URL:** <https://forum.heroiclabs.com/t/keeping-matches-open-after-players-leave/3079>\
**Category:** Game Design\
**Created:** [September 26, 2022, 4:00am UTC](https://forum.heroiclabs.com/t/keeping-matches-open-after-players-leave/3079 "2022-09-26T04:00:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob161](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@Rob161](https://forum.heroiclabs.com/u/Rob161)\
**Post date:** [September 26, 2022, 4:00am UTC](https://forum.heroiclabs.com/t/keeping-matches-open-after-players-leave/3079/1 "2022-09-26T04:00:33Z")

</div>

Hi, I’m not the most experienced programmer, but I have managed to create a 2 player turn-based, ‘chess-like’, game in Unity and have successfully made it an online PvP using Nakama. I followed the 16 episode ‘Nakama In Unity’ tutorial video on YouTube. It uses the Docker and synchronisation between players is done through sending/receiving match states - which all works perfectly.

My query now is, how do I make keep the match open after players temporarily leave, so they have the ability to re-join the same match to continue on from wherever they left off? (just like Words With Friends).

Are there any tutorials on this that I could use?

Thanks in advance for any help you can provide

```auto
{code or log snippet}

```

📺 **Media:**

---

<div class="post-metadata">

**Author:** ![ftkg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ftkg/32/1180_2.png) [@ftkg](https://forum.heroiclabs.com/u/ftkg)\
**Post date:** [September 26, 2022, 12:55pm UTC](https://forum.heroiclabs.com/t/keeping-matches-open-after-players-leave/3079/2 "2022-09-26T12:55:57Z")

</div>

Hello,

A client relayed match will expire as soon as the last player leaves the match. They are kept in-memory and cannot be persisted.

In order to have persistent matches you should use a server authoritative match, where you will have full control of the match lifecycle. We have a game tutorial using authoritative multiplayer here: [Nakama: Ninja Battle | Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/tutorials/unity/ninja-battle/).

---

<div class="post-metadata">

**Author:** ![Rob161](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@Rob161](https://forum.heroiclabs.com/u/Rob161)\
**Post date:** [September 27, 2022, 3:21pm UTC](https://forum.heroiclabs.com/t/keeping-matches-open-after-players-leave/3079/3 "2022-09-27T15:21:47Z")

</div>

Thanks for your help on this. I have started reading through the Ninja Battle documentation. Bit by bit and I will fully understand it and be able to convert the current coding to apply to a server authoritative setup.
