Search Unity

How to connect multiple computers with different networks to a game database in real-time?

Discussion in 'Multiplayer' started by ParhamXTT, Aug 1, 2021.

  1. ParhamXTT

    ParhamXTT

    Joined:
    May 24, 2020
    Posts:
    28
    I want to create an online game which is decentralised and stores gameplay information on all computers which are playing at the same time. I don't want to use a weird method like Blockchain or Ethereum network because I want my game to run at least 60 fps.
    My game is a Medieval Real time strategy game like Stronghold.
    Blockchain makes my game extremely slow.
    I don't use a server simply because I can't afford one.
    I am looking for a C# code that connects multiple computers from different networks using global ip address and share game info to all computers which are connected to the game.
    There are at least 2 players and at most 32 players in the game.
    Some of the players might be AI in some games.
    I just want to share database, I don't want to force other computers to confirm them as it takes a lot of performance from both CPU and GPU.
     
  2. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    sadly you really need a central server or denote one of the players as "the server" that stores the information. there is just to many syncing issues your going to run into if your distributed as was as tons of cheating since its not server authoritative.
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You'll need a server of some kind. That can be a server you maintain yourself, or it can be using a 3rd party service like Photon Cloud, but you'll need a server that everyone can connect to somehow. You could even use a dynamic DNS service which points to your home internet IP and updates as it changes (though that service costs as much as the cheapest server rentals).
    Then I'm not sure what your options are outside of reconsidering how you want your multiplayer functionality to work.