Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Multi players requirement

Discussion in 'Game Design' started by sunnypi, May 13, 2022.

  1. sunnypi

    sunnypi

    Joined:
    May 12, 2022
    Posts:
    1
    Hi, I am trying to create a simple multi user game for my uni dorm, basically between two buildings and each building has around 10 flat mates so say 20 people, each will be in their own room, each has own internet access and a tablet or phone.
    For example if it is a simple run and collect hamburgers, and the first to collect the target amount wins, and that player's score will be logged as accumulated points, assuming each user will have their unique ID.

    Which part of Unity will control the multi user play ? as it will have to monitor all 20 devices so they can all start the same time and to see who finished first before logging the user details and points to a database. If this theory is a workable one, my goal is to create one that will allow even more players in each game, I can create a Linux server with mySQL if this is needed to hold scores and ranking.

    Apologise for such loose question but I am just trying to determine the correct way to approach this and see if it is something within my limit, or something I need to seek real designers.

    Thanks for any help.
     
  2. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    460
    There is no part of unity that controls the multiplayer, the official networking of unity was removed years ago, and now there is a bit of chaos.

    Your game looks like something casual, so hosting dedicated servers for that is not a good idea, instead, it should be client hosted.

    If all the players are on the same network, you can use something like Mirror or FishNet, and connect using the ipv4 of the host this will be free.

    If there are in different networks, port forwarding will be needed, so Photon Fusion will be a good idea, since you connect using the photon cloud, you will have 20 free ccu (Concurrent users, people playing at the same time) and then pay for extra ccu.

    If it is a game to play with your friends, don break your mind with cheat prevention, instead, you should make the game p2p, where you control the state of your player, an then is synced with the others players. Is very easy to hack a p2p game, but since it doesnt look like something competitive, it doesnt really matter, and it will reduce lag, increase preformance and make the game easier to make.