Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to implement multiplayer into my 2D card game

Discussion in 'Multiplayer' started by iCaramella, Apr 30, 2021.

  1. iCaramella

    iCaramella

    Joined:
    Apr 30, 2021
    Posts:
    4
    Hello guys!

    At first sorry for my english

    Now, I'm really new with Unity, and I just started to make a 2D card game (it will be an android app), my question is: how can I implement multiplayer into this game?

    I'm following many videos on youtube and I found one where the guy suggests to use Mirror.

    I really have no idea on how to start with multiplayer it seems difficult.
    Probably I need a database for players_data, win_rates and more

    HELP!
     
  2. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    120
    If you just started with unity I would highly recommend not trying to make a multiplayer game yet.

    Having said that, if you really want to....there are many options. Mirror will work, Photon PUN will also work. IMHO Photon PUN would be easier for you as it does some things for you like matchmaking and relay. Those things would have to be done by you if you used mirror. For player data you could start with just using PlayerPrefs or get a saving asset from the store, like Easy Save. There are also many options for services to handle player accounts: GameSparks, PlayFab, LootLocker.
     
    iCaramella likes this.
  3. iCaramella

    iCaramella

    Joined:
    Apr 30, 2021
    Posts:
    4
    I know that trying to learn too many things at once can be difficult but I really want to make this little app :D
    Also I know that I need to learn the most part of Unity definitions to be clear on the forum.

    I'm working very hard making a lot of tests and I want to try to complete the app in a month

    As I said I'm trying using Mirror due to that video on youtube that explains almost everything very clear

    But I didn't know about player accounts services like GameSparks, I though that I need database like MySql
    What player account manager and network manager do you suggest for my case

    I try to explain the network part of the game
    I need a server where all the people can join then, they can create a table(lobby) that needs 5 people to join to start the game
    That's it

    I'm really sorry for my dead english I will study that too xD
     
  4. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    120
    This sounds like a recipe for failure...

    You are new to unity, new to networking, but you are giving yourself a deadline of a month? Why?

    You can use a database for player accounts, but that is more stuff you have to code and create and learn. Using a service will speed up the process, just like using mirror or pun vs making your own networking solution will speed up your process.

    I would definitely look into lootlocker if you want accounts, or, as usual, there are assets on the store you can buy.

    You're explanation of what you need is the same as basically every networked game. Nothing out of the ordinary, and again I would recommend PUN for a beginner but Mirror is a perfectly viable solution. Why not make a new project with both and try to create and join a room with a friend, then decide which one to use?
     
    iCaramella likes this.
  5. iCaramella

    iCaramella

    Joined:
    Apr 30, 2021
    Posts:
    4
    Thanks for the responce

    So I dont have a deadline just challenging myself so I don't give up :D
    Of course I'm making many unity projects and tests

    Also all unity documentation is in english and it's not easy for me to understand but I'm trying

    I want to know if these things like Mirror and lootlocker are also used for professional apps.
    Also if they stops the service will my app die?

    Thanks, I appreciate your help
     
  6. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    120
    This is your first app, why are you even worried about those things? Just keep learning and trying things. Every new person to this seems to get stuck on "what happens when my game magically gets 10k players" and "what happens when everyone wants to cheat in my game" and "what happens when unity/mirror/lootlocker stops working in 20 years"....who cares?

    Just move forward and have fun. Use mirror and lootlocker. Then do it all again using PUN and GameSparks. Stop worrying and start learning :)
     
    iCaramella likes this.
  7. iCaramella

    iCaramella

    Joined:
    Apr 30, 2021
    Posts:
    4
    I undestand your point and you're right but,
    I'm not a 16yo guy who is starting Unity for fun (I mean I love programming and everything but)

    I'm starting Unity for a specific objective, to make apps, if I need a team I will look for a team if I need to pay I'll pay, just to reach my objective.

    Btw thanks for everything, today I'll try Mirror and lootlocker

    If I need some help, I found this very good forum thank you :D
     
unityunity