Search Unity

Unity Multiplayer Which networking architecture should be used for an Hearthstone like game ?

Discussion in 'Connected Games' started by Mangzor, Aug 3, 2019.

  1. Mangzor

    Mangzor

    Joined:
    Jun 11, 2019
    Posts:
    1
    Hi,

    I want to make a game using unity networking (UNet) with a layout like Hearthstone, i.e. : your player in front with buttons or objects you can interact with with your mouse and your opponent in the back (with objects you can't interact with). Vice-versa on your opponent's client screen.
    I'd like to have every client's mouse action synchronised to the other client.
    I don't know which networking architecture to make : what should be handled by the clients and what should be handled by the server ?
    Is the Unity Networking UNet really suited for this kind of games ?

    Thank you very much for any reply/advice,

    Mangzor
     
  2. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    188
    When it's meant for online play you need a dedicated server. If that server is running Unity or custom software doesn't really matter.
    Network messages can be received and sent from different platforms.
    Nothing wrong with using UNet and even Unity in headless state as server. Unet HLAPI, Mirror, MLAPI are all good candidates.

    > what should be handled by the clients and what should be handled by the server ?
    Well, the only thing the client handles is presentation and sending messages which commands were made. The rest is handled by the server and results are sent back to clients.

    > Is the Unity Networking UNet really suited for this kind of games ?
    Anything that is able to send and receive data is suited for a game like this. You might get the usual network problems though, being unable to connect, port forwarding, firewalls, NAT punch through, etc... You need to read up on these, but most network solutions got this handled by now.
     
    MrsPiggy likes this.
  3. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    78
    Yes and no.I don't think it has all the necessary features you need for this genre of games. I've worked on multiplayer card games before and I've used SmartFoxServer. I would recommend a product like that or an equivalent.
    SmartFox has a lot of tools that help dealing with logins, security, user permissions, match making, room management, storage and all that good stuff. It's very solid and I can only report good things.
    Their website is www.smartfoxserver.com

    As @Enzi suggested all of the game logic has to on the server side, so that you can validate every single request to avoid cheating as much as possible.
     
  4. jaybdemented

    jaybdemented

    Joined:
    Sep 2, 2013
    Posts:
    112
  5. Lantha_

    Lantha_

    Joined:
    Aug 28, 2017
    Posts:
    1
    Thank you all for your answers. (I'm also working on Mangzor's project)
    We'll try following your advices and we'll get back to you for any further question.
    Cheers