Search Unity

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

Question What is your advice on RTS / MOBA style game terrain size, terrain/texture resolutions, and setup?

Discussion in 'Game Design' started by chasmgaming, Jun 21, 2023.

  1. chasmgaming

    chasmgaming

    Joined:
    Dec 4, 2022
    Posts:
    4
    I have combed through so many replies online but I cannot find all the specific answers to terrain settings based on an RTS / MOBA. Most answers cater to open world FPS, 3rd person type views and I want to be sure before I finalize my terrain parameters.

    I am working on a game with a view you would see in Dota 2, League, Legion TD2, etc. where it is top-down with a slight angle on a 3D engine. So the player would not see detail super close, but I still want it to look great for a modern game in 2023 with smooth performance.

    My main questions:
    - Does it matter if terrain is divisible by RAM sizes i.e. 500x500 vs 512x512? Mine is currently 440...
    - With a map size of ~500x500 would a single terrain be reasonable, or should I still use neighboring terrains?
    - What terrain resolution makes sense, is 2K or even 1K overkill for an RTS since players never get that close?
    - Same for units and buildings, should those textures be reduced from 2K?

    Thank you for your time
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,014
    When in doubt, make a prototype. ;)

    No.

    Just make a map of this size and see how it performs. ;)

    Try it and see how it looks and how much VRAM it uses (via Profiler).

    If you're talking about a single texture, even a couple dozen, then any modern desktop GPU can handle a large number of 2k textures (*). You should be able to make that a graphics option by forcing mip-map level 1 as maximum for low end GPUs if you have to.


    *: 16 MB as uncompressed 32-bit RGBA or well over 200 on a ~6 GB VRAM card, of course you can get a lot more if textures are compressed or 16-bit - that's part of optimizing the game as you develop it. You never ever get that right from the start so just keep an eye on memory usage and performance.
     
  3. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    is there any gain to use a terrain for this sort of camera? we have no long views, therefore if terrain is a bunch of smaller meshes then they can just be occlusion culled like any other type of static model, then you dont have the overhead of terrain doing all of its calculations at runtime

    it's probably only an hour to test one way versus another. if terrain is not very complicated in shape your smaller meshes could probably even be instanced.

    in a lot of cases with modern graphics you'd have the terrain littered with tons of meshes anyway.

    for texture sizes, just keep the source at high res and you can non-destructively reduce resolution in engine to see what is the minimum that looks good. i'd expect like 256-512 be fine for a ton of environment models.
     
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,602
    The main potential advantage I can see to using a Terrain over a bunch of meshes is collision detection. Terrain collision is super efficient as it's mostly checking against a heightmap, whereas mesh collisions are pretty expensive, and in an RTS type use case few of the potential collisions can get culled out in the broad phase.

    If you've got a good programmer on your team you could probably make your own terrain renderer with pre-made patches, and just use the built-in terrain heightmap collider. But I wouldn't bother with that unless terrain rendering turned out to be a performance issue.

    This is assuming that you need collision detection. In an RTS that's not a given.

    Aside from the first one, there are no one-size-fits-all answers to these questions. They're going to depend on other aspects of your game design. A 2k terrain texture may be overkill, or maybe it'll be sparse, we've no idea because we don't know how close "that close" is, or the type of visuals you are going for, or your target hardware, etc.

    Both of the others have already nailed how to figure out the answer, though:
    Build a quick and scrappy version, put it on your target device, see how it runs.

    Don't guess. Test.
     
  5. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    738
    I'd say make your maps squares of two.

    I do. Also, have them start at 0,0, not center.

    This makes a whole bunch of stuff easier in the end.

    My game is grand strategy RTS, (world map), the terrain at 512 x 512 verts.(It can be 128 - 2048, player pref) The mountains are a little blocky, at 512 but i am ok with it, as it is an overland map. Your game sounds like a tactical area, 512 x 512 should be plenty good resolution, even 256 x 256 would probably be good.

    I use mesh, not terrain, as shadergraph doesnt work on terrain, and i have never hand written a shader.

    Ok, so I use square numbers.. ..so my terrain details/textures can be 2048 x 2048, or even 4096 x 4096, easier than if the numbers were non square of two. Mix with a triplanar shader, vertex colors, tiling etc, you have a very nice terrain.

    Also, using squares of two means efficient textures that are made with data, can be used for data, (synced with data, as you dont want to read from gpu memory, so one texture in gpu, and another "texture" in cpu), and every vertex can have meaning with graphical feedback to player.

    Finally, what would a 500 x 500 terrain mesh get you that a 512 x 512 wouldnt?

    You are looking to make a complex system, always try to make things sync. You cant build a prototype that will predict future challenges, so your thinking should be "how dynamic is this?". Imagine 2 years from now, basing your game on 400 x 400 terrain mesh, and then realizing you cant do certain tricks or workarounds to complex problems. 512 x 512 doesnt guarantee easy answers, but I assure you, it will allow for better future solutions than 400 x 400.
     
    Last edited: Sep 4, 2023