Is it possible to add multiplayer to an already existing game?

I have a game which I’ve been working on for about 17 hours and I really want to add multiplayer (it is envisioned as a multiplayer game). Is there a way I could do this or is it just best for me to start from scratch and just use the same assets and scripts but with one of the many YouTube tutorials on how to make one from scratch. I’m pretty well-versed on Unity, but I’ve only ever made singleplayer games before.

Yes, a single player is just a multiplayer game waiting to be enabled. If you are doing Co-op, it’s quite easy. If you are doing competitive/PvP then there are more considerations, and it is different from the way you build a single player game (in order to prevent cheating). If you are doing a game where you want people to drop in/out, and not have a “host” necessarily and just want it to handle “host migration” then PUN2 is great. If you want a little more defined “host” and are doing a character controller driven game with more animations etc then use Photon Fusion or Bolt. If you are doing a competitive game with possible cheating, you will want to do Fusion or Bolt also.


Typically you will write one code base, the exact same as your single player game currently does, but have IF() statements in some places to detect if you are the Host/Server/MasterClient and add remote RPC calls in other places to get either the Clients or Server to execute code in certain instances. You do have to learn the concept of Client/Host (Server) and understand how to control where code runs. 90% of code runs on the clients, and all machines but you will need to understand the concept and be able to have the Host/Server order Clients to do things, or update things.


One advice I can give, get used to thinking “My Host/Server/Masterclient orders every player’s game to do things” and it will be easier if you use that mindset rather than “how do i decide when clients run code versus host/server/master”.

In multiplayer, the Host/Server/Master ORDERS clients to do things, and they do it. Think of it that way whenever you say “how do I get the game to do this”.


“How do I get the game to share a variable?” Order your clients to set the variable to the value you pass via RPC. (some networking solutions might make it easier with a State, or SyncVar, or other easy way)


“How do I get the game to show that one player picked up an item and equipped it?” Order your clients to show that the player picked up the item and equipped it. Some networking solutions already have an easy way to add a component that will synchronize the AnimatorController for you, otherwise you will need to send an RPC and make the clients set the Animator’s parameters to play the animation. In either case, your RPC call would make it equip the item. If you code well, you can reuse the same functions like EquipItem() for both local and RPC calls.

Is it possible to add multiplayer to an existing game?
I have a game that I’ve been working on for about 17 hours and I really want to add multiplayer (it’s meant to be a multiplayer game). Is there a way I could do this, or am I better off starting from scratch and just using the same assets and scripts but with one of the many YouTube tutorials on how to do it from scratch. This is becoming a big issue for me as I want to release some new online games on my site bestallgames.com I’m pretty good with Unity but I’ve only made single player games before. Therefore, I would like to find useful tips in this forum. I think that multiplayer online games with cool game plots are very popular with all players and therefore I want to update my site.