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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

FPS / Racing Game Concept Multiplayer Problem

Discussion in 'Multiplayer' started by Sungold, Dec 29, 2014.

  1. Sungold

    Sungold

    Joined:
    Jan 13, 2013
    Posts:
    9
    So I was throwing around some ideas about a multiplayer videogame that would combine elements of fps's and racing games. Basically, the idea was that players spawn together in a room at the start of a round where they choose and equip weapons and items for the following race. They then move into a room with stalls in between the various players (to prevent them from attacking each other), and as the countdown for the round begins, they are "supercharged" and when the round commences, they exit the starting line with incredible speed. The track that they initially run through has long walls and scattered windows between the players' lanes, so they only have specific areas where they can fire into different lanes. After some preliminary checkpoints, the track exits into an office-style building where there is plenty of cover, and a new checkpoint is chosen at a landmark somewhere in the surrounding city. Now players must battle with each other as they race to different checkpoints throughout the city, and the first person to the last checkpoint wins.

    Apologies for the wall of text up there, I was just trying to give some context. After coming up with these ideas, I then reconsidered my ambitions because I figured that people would be moving so fast AND so many raycasts would be drawn AND there would be so much action, that the smallest ping would create HUGE lag. People's positions would be lerping over large distances, people would be dying from shots 2 seconds ago, etc. My question is: from your experience with online networking, is this the case?

    Specifications: 10 people on a server max. I would be using Photon Unity Networking. People would be moving at roughly 20 mph, and they are sized realistically (~2 meters tall or so). If every player shot another player with a shotgun, you would have 12 * 10 = 120 raycasts at the same time.

    Please tell me if there are any other specs that i need to include for this to be a complete question. Thank you for reading through my long paragraphs!
     
  2. margusmuru

    margusmuru

    Joined:
    Oct 8, 2013
    Posts:
    18
    There are racing games with much higher speeds. 120 raycasts isnt a problem aswell.
     
    Sungold likes this.
  3. Sungold

    Sungold

    Joined:
    Jan 13, 2013
    Posts:
    9
    Do you think that Photon Unity Networking would support it well? Or does the networking solution have less of an impact then the actual ping of the players?
     
  4. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    PUN (Photon Unity Networking) could work for your game.

    But with 10 players you are limited to a maximum of 5 messages per player/second, which means that for a fast paced game as your you need some crazy good interpolation/extrapolation/lag compensation. That is not easy, but possible. Personally i would not do it with pun and 10 players per room for a game like yours.
     
    Sungold likes this.
  5. Sungold

    Sungold

    Joined:
    Jan 13, 2013
    Posts:
    9
    I see. Thanks for the advice! But if not PUN, then which service would you use? Something like Amazon AWS?
     
  6. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Amazon is only a "server" not a solution like PUN as such. You could look into Photon Server, uLink, Bolt(Asset Store), smartfox server...
     
    Sungold likes this.
  7. Sungold

    Sungold

    Joined:
    Jan 13, 2013
    Posts:
    9
    Wow thanks! I will check those out!