Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

I need help in converting a single-player card game to multiplayer game

Discussion in 'Multiplayer' started by kostic017, Aug 30, 2022.

  1. kostic017

    kostic017

    Joined:
    May 25, 2019
    Posts:
    9
    I'm making a version of the Egyptian Rat Screw. I've finished the single-player version where two players play on the same phone. Now I want to make it so they can play on two different phones over the internet.

    I lost an entire day trying to figure out how am I supposed to do that. First of all, there are many Unity multiplayer solutions, and I don't know which to choose. I would go with the official ones like Netcode, Lobby, and Relay, but there are not many tutorials out there, and I'm completely new to networking.

    Could someone take a look at the project and provide me some help, guidance, tutorials, samples, or anything really because I'm completely lost? Just tell me what to do now :).
     
    Last edited: Aug 30, 2022
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,331
    It's usually easier to start from multiplayer.
    Converting single player to multiplayer is a bit of a myth, this can get quite difficult.

    There are plenty of netcode libs, all of them should be able to handle card games :)
     
  3. kostic017

    kostic017

    Joined:
    May 25, 2019
    Posts:
    9
    Yeah, that's not very helpful :) I've found a Blackjack UNet/Mirror sample on the forum, but it's kinda too complex for me. Ughhh, I just need to see a code for a very simple two-player turn-based (card) game. Or a simple tutorial that covers how to make a multiplayer game using XYZ library from start to finish. There aren't any.
     
    Last edited: Aug 31, 2022
  4. kostic017

    kostic017

    Joined:
    May 25, 2019
    Posts:
    9
    I've lost a lot of time trying to make this work. I'm even considering giving some cash to someone that can do this for me. In that case, official Unity solutions like Netcode, Lobby, and Relay should be used (whichever is needed). And whoever does this must fork my project and build upon it. Also clean code, comments, etc.

    If I'm doing it on my own, the library is not relevant, I just wanna make it work. I just need concrete guides.
     
  5. cerestorm

    cerestorm

    Joined:
    Apr 16, 2020
    Posts:
    603
    There's some good videos explaining multiplayer concepts and a basic setup with Mirror here: https://www.youtube.com/c/ShrineApp/videos

    Once you understand the basic principles take your pick on a solution, they should all work basically in the same way. Create some small projects implementing the fundamentals, you should be able to find videos on whichever solution you choose. Once you feel you have a sufficient level of understanding have a look at re-writing your project for multiplayer.
     
  6. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Multiplayer is hard, a day is not anywhere enough to learn how to make a working multiplayer game if you never done so before. Converting from single player to multiplayer usually means heavily rewriting all of your logic: however long it took you to get the single player working, expect it to take at least twice as long to get a basic multiplayer working.
     
  7. kostic017

    kostic017

    Joined:
    May 25, 2019
    Posts:
    9