Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Car Multiplayer Game Photon vs Mirror vs Smart Fox Server

Discussion in 'Multiplayer' started by dbordzo, Aug 17, 2019.

  1. dbordzo

    dbordzo

    Joined:
    Aug 14, 2015
    Posts:
    34
    Hello, I wanna create some simple car multiplayer game.

    But I'm not sure what kind of system to multiplayer use.

    I was programmer in company for two yers, I know a little bit about UDP, and TCP.
    Of course I know how to build a server, and how to send data.

    But honestly, I don't know excally what is the best option to create race game in UNITY.


    ----------------------------------------------------------------------------------
    First of all I thought about UDP protocol, because car game need to be fast.



    And I will tell you guys what I made for test, just for 2 players:
    - I created Car_Game_Client. Where I added some simple physics. WSAD to control a car.
    By udp protocol I'm sending: accel, break, steer, position, and rotation to server.

    - I create Car_Game_Server also in Unity, exported it to Linux Server. where I read this data. And sends: to 1 player - > 2 player data, and to 2 player -> 1 player data.

    - Of course in client I read opponent player data, and of course everything works fine.

    -------------------------------------------------------------------------------------
    And as you know, that shouldn't be done like that I think.
    Because on Player 1 I sends Players 1 physics and everything. So some player can cheat very very easy.


    So What do you guys think about this:
    1. Player should sends all his data ?
    ( I think that for sure, but server should analyze that, in some Sync way. And here I have no idea how to sync it, and how to server should do more :) )


    -------------------------------------------------------------------------------------
    Or maybe I should give a try and use Photon, Photon 2, Mirror or Smart Fox Server or something else?


    What do you guys think about this ? What is the best to car game?
    Oh and I would like to create something more like mario cart game, I mean I don't wanna to hide from problem using a ghost mode car : ))


    Thank you for all opinions in advance : )
     
    CandraWi likes this.
  2. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    403
    If the server has to have the physics and map - you're probably best with a unity instance as a server - unless you can add a physics library to your server and the convert the unity terrain and colliders into something your physics library can understand.