Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Battle Royale Game in Unity.

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

  1. Skyfall106

    Skyfall106

    Joined:
    Mar 5, 2017
    Posts:
    132
    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:
    7,175
    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.
     
  4. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    69
    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:
    7,232
    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:
    69
    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:
    7,232
    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
    Ryiah likes this.
  8. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    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:
    181
    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:
    210
    To be fair, 20 players are killed during the first minute, and during that minute it also lags like hell.
     
    Skyfall106 likes this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    16,257
    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:
    210
    Have fun playing the kite demo on that GPU
     
  13. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    181
    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:
    16,257
    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:
    7,175
    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. Skyfall106

    Skyfall106

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

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,175
    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,044
    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. Skyfall106

    Skyfall106

    Joined:
    Mar 5, 2017
    Posts:
    132
    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:
    4,163
    Holy mother of apples and oranges!
     
  21. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,044
    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:
    9,575
    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:
    646
    [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:
    3,517

    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,302
    *reads thread title*
    *reads posts*
    *reads thread title again*
    smh
    /leave
     
  26. Skyfall106

    Skyfall106

    Joined:
    Mar 5, 2017
    Posts:
    132
    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
    MrWhiteVukky likes this.
  28. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    >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:
    33
  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:
    956
    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:
    2,370
    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:
    26,726
    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:
    7

    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. Skyfall106

    Skyfall106

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

    Xihan118

    Joined:
    Apr 2, 2019
    Posts:
    2
    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:
    7,834
    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:
    7,175
    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.
     
  42. RNGDevelopers

    RNGDevelopers

    Joined:
    Aug 27, 2019
    Posts:
    29
    Excuse, pros❤️,yup i'm a noob, and it's been two weeks with unity.Alright, starting the conversation with a joke, maybe it's funny.in this case we have to think about many stuff.

    (To all people in the conversation)

    Is any pros out there? I respect them.
    Is there any ideas? I like them
    Is there any coffee? I drink dat.
    Is there any pizza? I eat dat.
    But i'm not a rapper

    (To dude who trying to make a game like pubg)

    If we talk about pubg, it's not the best game right? it's a garbage.contains full of bugs like,

    *Terrible graphics
    *Useless network system
    *Bunch of lags and many more.

    But it's little bit big concept.a open world game.if you're going to create a game like
    that by just you, no way.it will take 2years to 4 or 5 years and if you are not a pro, it is just a dream for a beginner right?.you will understand why i'm saying like this.

    (To the dude who said unreal is best)

    I'm not experienced with unreal, seems like it's more complicated than unity.but i think we must choose the easiest thing first and at all(unity❤️).if you don't know how to optimize the graphics in unity, you should learn unity.bro, you don't know about unity's great features.that is why you said unreal is best.to me there is no game engine like unity.it's the best.cuz you can do every special thing with unity that you gonna do with those non-free game engines.as unity devs, we should respect the unity team because they gave us such a great game engine.

    (To dude who trying to make a game like pubg)

    Think about these things first.

    *Larger terrains
    *Gui system
    *Better touch controls (it's a crazy.)
    *Ai systems for bots
    *Networking systems
    *Hosting servers
    *Encryption for values in the game
    *IAP's
    *Settings
    *Models
    *Animations
    *and the most important thing is scripting part.

    Fogot many things in the above list.
    Don't mind above list is like a slad."right ok...!!" Wanna say it like a drunken dude.

    I think it's a dream for a one man.if you really wanna do this, be a master in unity or create a team(pro) right?

    But according to me, you can do this.there is nothing we can't do right? "Try and try one day can fly" have you ever heard it?

    *note: if someone can make a battle royale game with unity, it will be the best battle royale game ever❤️.that is why i love unity.
     
    Last edited: Dec 24, 2019
  43. RNGDevelopers

    RNGDevelopers

    Joined:
    Aug 27, 2019
    Posts:
    29
    *Special note:

    (Android build)

    With my experience, android devices are not powefull like ios devices(most of them).if someone gonna build this for android, you have highly optimize graphics and the result of this is the game should not have better graphics.if you try to use too detailed high quality models in android buld, your game will be terribly laggy and it's not playable anymore.A solution is you have to specially create low quality models and low quality textures and everything with low quality by yourself.

    (Ios build)

    Iphones are great devices.you can do something better with ios devices than android devices.but still need to optimize everything.

    (Windows and mac os builds)

    It's not a problem.it's the easiest thing.

    The problem is, most of pubg players are mobie gamers right?.
     
  44. tacman1123

    tacman1123

    Joined:
    Sep 14, 2020
    Posts:
    50
    I've downloaded https://github.com/Unity-Technologies/UIToolkitUnityRoyaleRuntimeDemo , but I can't see the cards at the bottom of the screen because it's built for mobile. Even building the project, when it runs in full screen. I've set a custom screen setting (mobile size), and now it's playable. Seems like it should be able to run immediately, though (download, load project, load menu, hit play). Doing that now, the cards never show up.

    I'm running Unity 2020.11f1 on Linux.
     
  45. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    9,575
    When you download someone else's project, you're getting what is in the project folder. Custom editor settings like layout and game view resolution aren't saved in the project folder though. I suspect this is done because different people working on different areas of the same project will have different requirements for these settings.

    Some info on where they actually are stored:
    https://forum.unity.com/threads/import-resolution-settings-into-another-project.544235/

    (But I don't understand why you're posting this in a thread about creating a PUBG knock off)
     
  46. krakendono

    krakendono

    Joined:
    Jun 5, 2016
    Posts:
    7
    Lmao ok remember its not for you but for the OP both you have different goals.
     
unityunity