Babylon server side

Good morning everyone,i get started with babylon and colyseus, and start to use the babylon null engine for server side because i want to compute only on server, null engine has authority such as when gamer click somewhere the game simulate in client also server, once server compute new state and send it back all clients and override their state but i don’t know how to implement it. this is my repo with simple demo: GitHub - ghtrse/demo so do anyone can show me how to use null engine on server side and purpose of it?
i watched some examples and see they duplicate the code as client but they don’t use it i don’t understand why they duplicate code as client when using null engine on server side. Can anyone explain for me about that ad give me some examples about null engine on server side and colyseus?

Hello and welcome!

You may have a look here - GitHub - aeon0/multiplayer-babylon-js-game: Multiplayer BabylonJS game with Server and Client-Side physics engine synchronization


Thank you! btw when use null engine on server side in this example

has the player and world, arena why server need to duplicate the logic code player and world and arena like thee client? Can you explain that?

The answer is here - Error when getting access to classes with BabylonJS and Colyseus - #7 by Rangerz132


Thanks a lot!