# Multiplayer game with physics

**URL:** <https://forum.heroiclabs.com/t/multiplayer-game-with-physics/270>\
**Category:** Local Setup\
**Created:** [October 11, 2019, 10:13am UTC](https://forum.heroiclabs.com/t/multiplayer-game-with-physics/270 "2019-10-11T10:13:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [October 13, 2019, 7:05pm UTC](https://forum.heroiclabs.com/t/multiplayer-game-with-physics/270/2 "2019-10-13T19:05:42Z")

</div>

@mnarimani That’s been done quite a few times with Nakama so far but the exact integration depends on the environment you run servers within but I can give some general advice on the best approach to use:

- Use Nakama for the authentication and other parts of your game server logic.
- Use the `matchmaker_matched` server side hook (intercept function) that is called when players have just been matched. Use that to share the info needed for the players to receive the server details to join the headless Unity instance (once it’s been spun up).
- Use the session tokens from each peer to validate on the Unity headless instance that the players joining are who was expected/invited to join.
- Run the authoritative Unity headless game as normal.

---

_[View the full topic](https://forum.heroiclabs.com/t/multiplayer-game-with-physics/270)._
