Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Battle Royale Game in Unity.

Discussion in 'Getting Started' started by THHamiltonSmith, Oct 8, 2017.

  1. THHamiltonSmith

    THHamiltonSmith

    Joined:
    Mar 5, 2017
    Posts:
    125
    Hey. So recently I have been playing PUBG and my friends have Fortnite btu I was wodnering how I could make something like this in unity. I have seen there is an asset on the Unreal Engine asset store but I would prefer to use unity. Anybody have any tutorials or some steps on how?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,914
    You're not going to find any tutorials or step by step guides to make such a game because it's a far more advanced topic than it appears at first glance.
     
  3. josehzz112

    josehzz112

    Joined:
    Mar 22, 2016
    Posts:
    43
    Lets start with whats the minimum amount of stuff you need to make something similar:
    • FPS controls + some weapons to use.
    • A map with some buildings and random drops every time its initialized.
    • Player spawn: in PUBG/Fortine you drop from a plane/bus, lets simplify this and make the player spawn on a selected zone on the map.
    • 100 players multiplayer: You could use Unity Multiplayer Libraries, but I don't think this solution can handle 100 player (I might be wrong about this), the amount of packages send would be too much, so maybe limit this to ~10 players.
    You also will need some basic menus and in game stats. Now you have a MVP for a PUBG/Fortnite clone.

    Everything is manageable except for the multiplayer, where you might need a dedicated server to handle multiple instances of 100 player rooms.

    Theres no tutorial for making a game like this that I know of but there's info for each bullet point on the list.
     
    rogueknight and Sanhueza like this.
  4. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    54
    A little bit unrelated: PUBG is notoriously poor performing.

    If one decided to try to clone as much of PUBG as one could, but implemented in Unity, would you expect better or worse performance?
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,855
    Well... I'm sure this is not the answer you are looking for, but I don't think there's a more accurate one.

    It depends.
     
  6. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    54
    Can you elaborate? Do you have any theories as to what makes PUBG run "poorly"? Based on your existing knowledge of Unity vs Unreal (which PUBG is written in), in which scenarios would one be better than the other?
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,855
    I don't have theories. On a game of that size any number things can go wrong and I don't see the value of guessing. I've read the dev team (at least at the beginning) is quite inexperienced, and a lot of the assets they use from the unreal marketplace are intended to be full levels, not copy pasted all around the map along with other assets.

    So... I don't think the game is optimised to a level that engine differences start to factor in too much.
     
    Last edited: Jan 15, 2018
  8. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    Yep, the engine is not the deciding factor here when it comes to performance.

    Actually, I think Unity might even get better results with some good LODing and Streaming, but even now in UE4 the game could run a lot faster, the current culling and LODing is just crap.
     
  9. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    180
    I love Unity, but to be honest, Unreal performance are hundred of times better. Just try to run the Adam's demo on a medium PC (get an AMD FX and a HD7850) and it won't even start running. With that same specs, you can run any UE4 demo which has the same or better graphics.

    Anyway, I don't think PUBG is bad optimised at all, just count 100 players sending 15msg/s and then add some RPCs for the item loot, and then... anyone who has worked in any multiplayer project knows that that has a REALLY big computing cost.

    In fact, Rust performs worse with half of players and it's done in Unity.
     
  10. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    To be fair, 20 players are killed during the first minute, and during that minute it also lags like hell.
     
    THHamiltonSmith likes this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,523
    Fixed that for you.

    You can run it but from my own personal experience with an aged computer (Phenom II X4 w/ GTX 460) the performance will be horrendous. At best you might occasionally see 20 FPS, but more realistically it'll be in the teens. That's no more acceptable than trying to run a tech demo only for it to not start.
     
    Last edited: Jan 17, 2018
    Martin_H likes this.
  12. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    Have fun playing the kite demo on that GPU
     
  13. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    180
    That machine (FX 8320 and HD7850) is in fact a capable machine that runs even a really bad optimised Forza 6 APEX, or any other actual title at 1080 (not at max setting obviously). It can run the Elemental UE4 demo at maxed settings. But it can't even run the Adam demo.

    That Phenom and GTX460 is really far from the machine I said. And that's not my actual machine (I've a better one).

    C'mon, I've been using Unity since the first version, it makes game developing really fast and fun, but in terms of technology is clearly under UE/CE.
     
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,523
    They're only another year or two behind the hardware you mentioned but regardless both machines are significantly far behind the hardware Adam was intended to target. For that matter they're both far behind the hardware Unreal 4 targets.

    I'm not denying that you're capable of running them. I'm denying that you'll achieve good performance. Additionally what do you mean by "not at max setting"? Are you referring to one step below that or multiple steps below it?
     
    Last edited: Jan 17, 2018
  15. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,914
    PUBG absolutely is poorly optimised, especially when you compare it to its biggest competitor, Fortnite's Battle Royale mode, which follows the same general rulesets but doesn't have nearly as severe lag issues.
     
  16. THHamiltonSmith

    THHamiltonSmith

    Joined:
    Mar 5, 2017
    Posts:
    125
    Yea but High Poly > Low Poly
     
  17. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,914
    Except polycount has a negligible impact on performance nowadays and PUBG isn't doing anything that graphically intensive. Not only that, but the lag is server wide, so even when models are being culled you're still getting severe performance impacts.
     
  18. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,038
    I think if you have to ask how to do it on this forum, then you're probably not yet capable of doing it.
     
  19. THHamiltonSmith

    THHamiltonSmith

    Joined:
    Mar 5, 2017
    Posts:
    125
    Yea. I sort of realized that. I'm going to keep developing my Survival Game until I'm good enough to make a Battle Royale game
     
  20. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,870
    Holy mother of apples and oranges!
     
    AcidArrow and THHamiltonSmith like this.
  21. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,038
    I didn't mean that in a snide way, incidentally :)

    In my own experience, I found that I reached a point where I didn't need to ask questions anymore, I just knew how to do things (only some things - not saying I'm any sort of expert).

    When I did run into a BIG question that I didn't know the answer to, it was usually an indication to me that I'd bitten off more than I could chew at that particular point in my "evolution as a game developer" and I needed to dial it back a notch until I'd levelled up a little.
     
    rogueknight and Martin_H like this.
  22. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,500
    PUBG has terrible network rubber banding until around half the players are dead. That usually happens within minutes of the round start so for most of the game the network performance is ok. If you can accept terrible performance with a full server then I'm sure UNET is up to the task.

    What PUBG has done isn't anything all that technically remarkable. Their secret sauce was putting together a lot of existing elements that other games had tried out, all into a game that encourages matches to end rather quickly with evenly spaced but short breathers. I'd argue that the pace of the game as the player transitions between phases of it is the most amazing thing they have done.
     
  23. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    632
    [Just for the record, I am not saying that all of that below is bad, it's just my perception of reality and what we all have to face at some point. Sometimes you just can not make it the way you want due to many circumstances.]

    I think a lot of Early Access, especially open world games, suffer from those issues. I doubt that the first thing most developers think about is performance optimization. But from own experience I can say that you should at least deal with the very basics of optimization early. Otherwise you might have a hard time to optimize things later and eventually it will never happen.

    It is very easy to fill a scene with dummy objects just to see how it performs. If that doesn't work you should not start to add content but work on that first. Also implement your loading and networking routines and if it already lacks without gameplay you really got to look into it.
    Once you got all the game data and scripts in it is hard to adjust the roots of your game. I made that mistake already myself. Working on the roots without any game content on the other hand is very reliefing as you can focus on one feature after the other.

    Also I know that even in established studios lack of technical quality is often an issue, not only by lack of knowledge but also by the willingness of leaders to prioritize that (featueres, features, feautures!). Sometimes it's about game systems, sometimes its graphic optimization and in worst case it is both. Especially when you go grab your assets from stores and not define their requirements yourself. At the end you got a laggy, buggy game that you docter around with one makeshift solution following the other.

    Btw I am not saying that PUBG in particular is bad, for me it actually runs very well except for the starting screen where all players are around. But ARK was such an experience.
    What I am trying to say is that EarlyAcces games do not have to be laggy. It is just what you want to focus on first. Sadly top notch performance doesn't sell :)

    Another point that happens in EA is that prototypes convert into final games. But I believe that you should always scrap your prototype and start fresh. But of course that takes time and money which both might not be available. But studios that do that often produce quality games.
     
    Last edited: Feb 2, 2018
  24. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    2,567

    Really? I don't know any game dev people IRL, but to me this is like saying "I doubt many mechanics think about internal combustion engines much."

    Like, the game is nothing if it doesn't run.
     
  25. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,297
    *reads thread title*
    *reads posts*
    *reads thread title again*
    smh
    /leave
     
  26. THHamiltonSmith

    THHamiltonSmith

    Joined:
    Mar 5, 2017
    Posts:
    125
    Damn this thread is activee
     
    Master-Frog likes this.
  27. N2KMaster

    N2KMaster

    Joined:
    Jul 15, 2013
    Posts:
    64


    UFPS + Photon Networking + some nature and Apocalypse style scenario pack.... Its possible, but you're gonna have to spend a few hundred bucks just to get the basics of what you need. Then if you're adding cars, I hear UFPS is compatible with Edy's Vehicle Physics (again more money). Not sure of what Photons gonna let me do just yet on a free account, dunno if it will actually give me 50 vs 50 to actually give me that Battle Royale feel or not. But it IS possible. Just gotta know where to look and how to invent with Unity is all.

    Actually ill edit this a bit. This is still a small part of the overall map, we're talking a map about the size of the Fortnite battle royale map here. Performance could go all to poo the second it gets big and i start adding stuff like water. The beginning part of making one, it is there.....Dunno about a completed game tho. I run into that issue a lot where something that is supposed to help you make something in Unity hits this unknown cap and limit to what it can do and the entire project falls apart like a house of cards. For now tho, I'm not having any issue with networking syncing up, its not sending a whole lot thru at a time. Not saying its the optimal system, just what i found to work for me.
     
    Last edited: May 7, 2018
  28. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    >But it IS possible.

    First of all, Photon Free is limited to 20 concurrent players, so you wouldn't even get a single match full.
    Second, Photon is limited to 500 messages per second per player, so you'd need to come up with a VERY flexible netcode to work within that limit, because just syncing movement for 100 players would be 1000 msgs which is twice as many as you have.

    So, yeah, it might be possible but there are serious limitations you need to work around.
     
  29. Mentallic3D

    Mentallic3D

    Joined:
    Aug 21, 2013
    Posts:
    31
  30. BennettF

    BennettF

    Joined:
    May 29, 2018
    Posts:
    1
    dont forget, this game needs a gimic that makes it not just battle royale.
     
  31. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    668
    Unity can integrate with external libraries. You could very easily develop a networking system in C++. A simple udp server can handle hundreds of simulataneous connections. Think outside the box, a SIP engine could easily do what you want. It’s optimizing the traffic that’s the issue.

    The trick is to make as much as possible client side and only do error correction. Most of the time, a client should be able to guess what a player is doing. Most of the time your players are moving in straight lines.
     
  32. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    1,936
    Yeah, just dump everything into client. Nobody's cheating nowadays anyway.
     
    Rich_A likes this.
  33. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    Sounds like a good plan. Maybe you can mesh the two.
    Survival Royale
    Work on the generic survival stuff, worry about networking and multiplayer later

    You know how it is, they are only cheating themselves
     
  34. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,579
    If you have cheating you pretty much can afford to pay for real engineers. It's one of those really good problems to have. Focus on functionality - however it is achieved.

    PUBG was a joke for performance and execution, but after getting a few billion, it now runs really well, including mobile.
     
    verybinary likes this.
  35. krakendono

    krakendono

    Joined:
    Jun 5, 2016
    Posts:
    4

    Here is the Gold

     
  36. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    I have to disagree. I tried pubg once. Then I tried to connect a bluetooth controller because I didn't want to spend the time to get used to a non tactile control method enough to git gud.
    Gold would be controller support.
     
  37. Folly4k

    Folly4k

    Joined:
    Jun 3, 2018
    Posts:
    1
    Is anyone interested in working together on a project like this?
     
  38. THHamiltonSmith

    THHamiltonSmith

    Joined:
    Mar 5, 2017
    Posts:
    125
    I plan on implementing it in my game.
     
  39. Xihan118

    Xihan118

    Joined:
    Apr 2, 2019
    Posts:
    1
    Actually ma'am he can a lot of YouTuber have posted about this, more than 1 assets on the asset store(Unitz BattleGrounds is one of them) so why not give it a try?
     
  40. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,657
    Ask your self following question.
    How many complete battle royal games like you can find this days and how many devs "give it try".
     
  41. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,914
    Yeah uh, I've seen those tutorials and...

    You know what? I'll rephrase.

    You won't find any tutorials that are actually useful instead of being absolute garbage plagued with scaling issues.
     
    neoshaman, xVergilx and Antypodish like this.