Simple game. Multiplayer mode = extremely slow, singleplayer = fast

Hello everyone!

I am making a multiplayer space sim. Currently, it’s a very simple game that spawns a ship that can move and shoot lasers.

When I followed the Unity Multiplayer Tutorial to convert the game to multiplayer, the game became very slow, no matter if I am playing it locally, or on two different machines over a network. If I revert the game back to singleplayer mode, it runs perfectly again.

I am having a hard time understanding why such a simple game is running so slowly. There are barely 10 objects in the scene at a time. Can you guys help me figure this out? Let me know what other information is needed.

I think some update function or some other script is looping badly, trying to say that you have bad script somewhere what eats machine power. Recheck everything

Are you processing network messages in Update or in FixedUpdate? The animated Unity application that I implemented uses FixedUpdate, at a rate of 200ms. You do have to consider the round trip time to the server and back with networked games - if your local client is waiting for the server to respond before it shows the move that it just made, then you will notice lag. Many games just go ahead and display the local moves immediately, and the remote moves when the messages about them arrive. It’s tough in a shooting game though.