Search Unity

Asynchronous Multiplayer - Starter Guide?

Discussion in 'Multiplayer' started by Aerhart941, May 30, 2019.

  1. Aerhart941

    Aerhart941

    Joined:
    Apr 7, 2019
    Posts:
    61
    I am trying to make an asynchronous multiplayer mobile game. I have written code for the player movement, spells and game systems so far. Then I was thrown for a loop when I looked into actually making it multiplayer.

    I feel very discouraged as UNet seems like an entirely new beast for me to tackle. It appears I need to rewrite every single interaction Ive done so far in order to store each player's actions and send it to the server.

    Is there a resource specifically for asynchronous, multiplayer turn-based games I can look at? Everything I am finding (Brackeys UNet tutorial for instance) doesn't quite help as it only accounts for an FPS where you only control your one character.

    In my game, you control a team of characters, each with different abilities, and teams can be chosen by the user. I am using NavMesh for movement and I just cant wrap my head around how to send all the information like each unit's position, and spells casted (and where they were casted) back and forth. IDeally I would like you to be able to run the game on and view the opponents turn - have it play back to you in real time.

    What do I do? Where do I start??
     
  2. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    check baas instead like nakama, playfab or gamespark, they are what traditional turn based game use, do you need for real time multiplayer?

    you basically just send all the information players did at end of each turn ?
     
  3. Aerhart941

    Aerhart941

    Joined:
    Apr 7, 2019
    Posts:
    61
    That is interesting. Can you tell me what a Baas is? Are these use with Unity? That’s encouraging
     
  4. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    backend as service, they are usable with unity. its basically a slow paced server, that can handle more player, easier to develop and cheaper to run
     
  5. Aerhart941

    Aerhart941

    Joined:
    Apr 7, 2019
    Posts:
    61
    Thank you. I downloaded DarkRift 2 to start poking around with.

    Maybe you can help me answer this next question. If I set my game to work by deactivating all units that you shouldn't be able to move on your turn, would that suffice? Would the units I DO move around actually update on the other players game when he/she turns it on? Or do I still need to put network identity code on each unit?
     
  6. rivstyx

    rivstyx

    Joined:
    Sep 6, 2018
    Posts:
    38
    I can relate. The problem with going with a third party BaaS is you are at the mercy of their architecture and if they are bought out you may be left with no back-end.

    My game is 100% turn based and server authoritative. I originally developed my prototype using my own BaaS based on Azure functions, Cosmos DB and Unity. I moved to GameSparks because I wanted the user management, economy, leaderboards and matchmaking features. GameSparks worked very well and I was able to complete the project but right before I was ready to go early access they were bought out by Amazon. Amazon promptly sunsetted them and started pushing GameLift. So I was practically back to the drawing board.

    I have been searching for a GameSparks equivalent for a few months now.
    I have tried...
    GameLift(Not really an integrated solution. It consists of server code you write in Node.js and place in "fleets", no features to speak of and rudimentary matchmaking)
    PlayFab(Not server authoriative and relies on Photon for matchmaking)
    Chilliconnect(Not event driven and so you have to poll the server constantly for messages and they were just bought out by Unity :))
    BrainCloud(Currently Using)
    and many others...

    UPDATE
    In the end I went with BrainCloud. They have been fantastic and I am working diligently towards early access on their developer plus plan.

    I am excited about the new Unity tools but I cannot wait years for them to be viable so Ill build my own.

    You can see a trailer for my game here if you are interested...


    Chris,
    Rivstyx Game Studio
     
    Last edited: Jan 4, 2021