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

Unity multiplayer without Unity Networking?

Discussion in 'Multiplayer' started by Mazer83, Jun 29, 2017.

  1. Mazer83

    Mazer83

    Joined:
    Mar 14, 2016
    Posts:
    19
    I was wondering if it is possible to use the Unity Multiplayer service while using your own custom networking code to send messages between server and client.

    Why would I want to do this?

    I'm developing a turn-based game, and Unity networking doesn't seem to be the best fit for that.

    Unity Multiplayer has a pricing system that works for me: $0.50/GB doesn't come out to a lot for a turn-based game, so this is the best bang for my buck.
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,390
    Just curious, what specifically is stopping you with UNet? There's fundamentally nothing different in turnbased game communication than there is in anything else. The biggest difference is managing who has permission to 'move', which is a server authority design thing, not a networking middleware thing.
     
  3. Mazer83

    Mazer83

    Joined:
    Mar 14, 2016
    Posts:
    19
    I only want the server to update the game once a turn has been "locked in" by a player. So, for example, if you move a fleet from one place to another, buy a new technology, build some units, etc.., I want the client to send their move to the server, then I want the server to send a message to the other clients, so they can see what happened, while only sending them the information that they are allowed to know. (fog of war will prevent them from knowing some things)

    Looking through the docs, I suppose I could just use NetworkWriter/NetworkReader for this, so come to think of it... I don't need to write my own network code. I'm still curious though if UNet is a requirement for Unity multiplayer.
     
  4. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,390
    Thats basically all up to how you write your network code and still doesn't have anything to do with your choice of network solution. They all basically can handle this.

    You can strictly use RPC calls for games like this and it should be fine. Pretty sure the HLAPI has all you need. I'm not sure if UNet is a requirement for Unity Multiplayer, though. Sorry.
     
    TwoTen likes this.