Search Unity

asdgg

Discussion in 'Getting Started' started by xplicitgreek69, Mar 28, 2020.

  1. xplicitgreek69

    xplicitgreek69

    Joined:
    Jan 23, 2020
    Posts:
    34
    xcvxcvv​
     
    Last edited: Feb 5, 2023
  2. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    All it boils down to is optimization, all the way from art to code.
    There are also many different tricks applied to make the world / level they design appear to be so lively and massively populated.
    E.g, you don't really "see" millions or thousands of objects on the screen at once, they are only active when they are within the player's view.

    You can read about optimization here.
     
    xplicitgreek69 likes this.
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    They have higher budget, higher technical expertise, more engineers and programmers and also profile the heck out of their games.
    https://docs.unity3d.com/Manual/Profiler.html

    Learn profiling and algorithmic optimization.

    A basic non-gamedev example optimization example.

    1. You need to find one item within an array of a million elements. You do that checking one item at a time from the start to the end of the array.
    2. It is slow.
    3. You try to speed up a function you call to compare item in array with target value.
    4. You get 1% speed increase.
    5. It is still slow.
    6. Then you learn binary search and implement it.
    7. The search is now 50000 (fifty thousand) times faster.

    It is a silly example, but that's the rough idea of it. Learn unity profiler, look for places that eat too much resources, and optimize them.
     
    JoeStrout and xplicitgreek69 like this.
  4. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    977
    You might also wanna look into batching and instancing, which allows you to draw a large amount of meshes to screen efficiently.
     
    xplicitgreek69 likes this.
  5. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    When you see thousands of objects on the screen, the developer is probably using GPU instancing instead of using a separate GameObject for each item. In my 2017 game on Steam (Disputed Space), I have many thousands of lasers flying around in each scene. All of those lasers are drawn using GPU instancing with DrawMeshInstanced. I have one GameObject handling all of the lasers in the scene. Blizzard (and other AAA companies) are doing similar tricks like that to get the performance.

    https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstanced.html
     
    xplicitgreek69 likes this.
  6. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    There is also dots too which will optimize game alot
     
    xplicitgreek69 likes this.
  7. Rasly233

    Rasly233

    Joined:
    Feb 19, 2015
    Posts:
    264
    Its easy, just hire an army of experienced 3d designers. Btw not all of them are good, actualy it is more like only bliz and lol.

    Also there is a big diff between a model with many poligons and a model with mind blowing beautiful hand drawn AAA texture.
     
  8. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    For one, I doubt that they really have "millions and millions of GameObjects".

    Some of this would come from understanding that GameObjects (or any kind of code "object") come with a bunch of overheads, and finding ways to represent things without making every single one an object. Unity's DOTS is basically a standardised approach to this, so you could look into that.

    Some of it comes from knowing what computers can do cheaply and really capitalising on that. Having a thorough understanding of what's going on under the hood means that you can get the most out of whatever resources you're using.

    Some of this would come from being very good at making it look like there's a lot going on when (from the computer's perspective) there isn't.

    And some of it comes from just writing code and algorithms which are efficient.

    As I'm sure you can imagine, that's a lot of stuff to learn. I strongly suspect that in the "AAA" teams you refer to they'd have experts in various different areas, rather than relying on one person knowing it all. If you have a solid grasp of the underlying principles you could do all of the above as an individual, but it gets much faster and easier with specifically relevant prior experience.
     
    xplicitgreek69 likes this.
  9. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    Yeah, dive into DOTS. It is an excellent way to handle lots of things in a scene in a very scalable way. Unity has come up with a standardized approach to use instead of building custom solutions using DrawMeshInstanced.
     
    xplicitgreek69 likes this.
  10. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    GPU instancing is done via script. With instancing, you don't instance objects. You use a command to instance meshes. Basically you send the GPU an array containing all of the instances instead of dealing with a bunch game objects. Instancing is a way to render a bunch of stuff without needing a game object for each of those things.
     
    xplicitgreek69 likes this.
  11. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    They also have very tried and tested pipelines that allow them to chug out much more much quicker. I know they have many LOD layers, which I know personally, I don’t take advantage of enough. Largely because my game doesn’t require them and because it’s a pain to bake. Where big studios probably have an automated process that takes in a high poly model and splits out 7-10 LOD models/textures.
     
    xplicitgreek69 likes this.
  12. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    Yeah, DOTS is really exciting. Technically speaking, all of that can be achieved manually through DrawMeshInstanced, but it does absolutely rock that Unity has a standardized way to do this now though DOTS. If you have a game idea that needs lots of units moving around, DOTS is an excellent solution.
     
    xplicitgreek69 likes this.