Search Unity

Question Converting single-player to multiplayer :d

Discussion in 'Scripting' started by Gubity_Studio, Feb 15, 2024.

  1. Gubity_Studio

    Gubity_Studio

    Joined:
    May 1, 2022
    Posts:
    6
    Hello everybody. I have an FPS game project on Unity and all the weapon mechanics/animations are ready. All my weapon mechanics such as recoil, trails, bullet effects, damage, etc. work well. But the thing is that I want to make this game a multiplayer one. Since it was going to be my first ever multiplier game, I didn't know about the complexities of turning a game into multiplayer. Right now, I am struggling a bit. After some research, I decided to use a dedicated server model using photon fusion as a networking solution. But here questions occur: in order to synchronize needed mechanics, and make client-side predictions: do I need to write all my code again (shooting, movement, animation transitions, interactions, etc.) or do I just have to make some syntax differences? how is the procedure usually done? Aand most importantly: Did I make a big mistake/ decision by programming the mechanism on a single player first?

    Thanks for your time and answers,
     
  2. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    540
    This topic is far too big to be answerd by a forum thread.

    But here are some snippets:
    - Creating a multiplayer game with multiplayer in mind from the start is usually better / easier than converting a single player game to multiplayer later, especially if it is your first multiplayer game
    - You will have to rewrite a lot of code if you want to do dedicated multiplayer "correctly" (but not all of it)
    - Since this is your first multiplayer game, you should make a smaller example project first instead of learning all this things and trying to convert a existing single player game at the same time
     
    CodeRonnie and Bunny83 like this.