Search Unity

Terrains - one big one, or several small ones?

Discussion in 'World Building' started by MikaMobile, Dec 23, 2019.

  1. MikaMobile

    MikaMobile

    Joined:
    Jan 29, 2009
    Posts:
    845
    I'm working on a game that is played from a top-down, pseudo-isometric perspective - think baldur's gate, the old fallout games, diablo.

    Currently, the environments are broken up into chunks - when you reach the edge of one, you'll walk off the edge of the screen, the camera cuts, and you find yourself in a new space. You similarly transition when moving from exterior to interior spaces. A forest level might include a dozen of these chunks, each one just a few screens in size before you reach an edge and transition again.

    These spaces are deliberately NOT seamless - each chunk a separate island in my scene. I'm trying to figure out what would be the best way to handle my terrain. Option 1 - have one giant one sprawling under all of my chunks, but you're only looking at a small piece of it at a time. I'd have a lot of terrain off screen all the time, but only 1 height/splat map. Option 2 - each chunk gets its own tiny terrain. I'd have more terrains in total, and many more height/splat maps (at lower resolutions, of course) but unity wouldn't have to be worrying about/culling 90% of the terrain all the time.

    Anyone know if there would be a performance/memory difference between having several small, disconnected terrains vs. one big one? I've done some simple tests in the editor and didn't notice any difference, but if anyone has some experience in an actual production that would warn me off of either plan, I'd love to hear it.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,775
    Consider first practicability.
    What if you decide make map 10x10. Then one day, you need expand that and make at least 12x12 map. Yet halve of that area will be unoccupied, as there at no islands.
    How big map you need for the future expansion? Or chunks maybe more practical? What if chunks (island) vary in sizes.

    From performance point of view, consider following.
    You are in chunk 0x0 then you load whole map at once. Even part of map, where layer don't need to be, or won't be able to reach today.

    Now you load all objects and animations. Even these one, which player won't see. You know where I am heading, with this?

    If having chunks, how big these are, or they can vary I size. How many object on each chunk. How fast next chunk can load. Do I need load other chunks, If players is not there yet?