Search Unity

Opinions/Discussion: Proposed Management of Large Game Levels

Discussion in 'Game Design' started by ARMagEDdonWATCHER, Feb 6, 2015.

  1. ARMagEDdonWATCHER

    ARMagEDdonWATCHER

    Joined:
    Jan 27, 2015
    Posts:
    21
    I'd like your opinions on an implementation I am working on.

    I am creating an RPG/adventure game with a large world. The world itself is split into different regions. Each region's information (props, scripts, lighting, etc.) will be stored as a separate scene. However, there is the issue of managing the areas within each region. After all, a player will rarely see everything in the region at once, so the task of hiding objects that are too far away or blocked by terrain arises. I have two proposed solutions.

    Note: I will be using Unity's terrain builder for the terrains. I also do not have Unity Pro, so no occlusion culling or LOD features will be used.
    (EDIT 2/13/15: I meant none of Unity's OC or LOD features. TonyLi brought up the option of using alternative OC and LOD algorithms. So, I'll probably be creating my own OC and LOD algorithms to use in conjunction with the proposed solutions.)

    The first option is represent an entire region as one large terrain (2000 units by 2000 units). Because these areas are relatively big, for performance purposes I will implement area zones that will only be active while the player is in them. The terrain will still be visible, but the objects in it will be dependent on the player's presence in their zones.

    The second option is to represent the zones of each region as individual, smaller terrains that are connected by warp points. Entire terrain objects and their children will be active based on if the player is in them.

    The problem with the first solution is that terrain features that the player won't see will be rendered anyway, costing performance. However, there's a certain effect that you can only get from having a continuous region: you can look around and feel the visual impact of your journey.

    Cliffs Screenshot.png

    In most of my outdoor areas, I have a "highest point" area where I want players to capture the essence, the vastness, of the region. Dividing the region into smaller areas may save performance costs, but I don't want to lose the feeling of being in a large world (if anyone has any tricks they want to teach to get around this, that would be appreciated).

    In conclusion, I will likely be using a hybrid of these two systems because of the diversity of terrain that I will be making. For wide, open regions, I might use large, continuous maps. For caves and other such levels, I will probably be breaking them into smaller maps.

    My implementation is far from perfect, but I think it will work for the type of game I am trying to make. How would you guys manage large game areas for an RPG/adventure game? I'd like to see where I can improve my design performance-wise.
     
    Last edited: Feb 14, 2015
  2. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,823
    I like the weird implementation-design question. Normally, I crusade against implementation questions in this forum, but this one is pretty cool.

    So, as someone working on an Eastern RPG, one thing I'm keeping an eye on in my game is density of actual content to map area. One of the cardinal sins that I see newcomers do - and, that I've done in the past - is make huge levels with "breathtaking" vistas (often they're not, but I'm assuming they are for argument's sake)...but with nearly nothing to do.

    This is a problem. In the days of TV, the adage was, "Show, don't tell." In games, it got updated: "Do, don't show." If you have a vast empty landscape, you're doing lots of showing, but the player isn't doing lots of doing (unless it's a game you play in the bathroom, but that's a different kind of doing.)

    Do > Show > Tell

    I think that the goal of a large world can work if you want to impress a feeling of vastness, but when it comes to actual implementation, I want to ask: what is the player going to do with this vast land? What will you do in that vast area to entertain them? Sure, you can do like Zelda does and yank the player across the map, almost arbitrarily, but is that actually fun? Each player will answer that differently, but I think the number that respond positively will be reasonably low.

    I recommend casting your gaze smaller, and not just to achieve a density of action to area. It's also easier for you to develop, and will help with performance. While Unity tends to handle big single objects better than multiple small objects, there is an upper bound on how big a single asset can be before it starts affecting your end-user's system. I know this isn't the answer you want to hear, but there is no hard performance target, other than "on the lowest-quality system that you want your game to run on, how well do you want the game to run on the lowest quality?" This is a decision point in your ballpark.
     
    Kiwasi likes this.
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,514
    Lack of Pro doesn't preclude LOD, occlusion culling, or asynchronous loads. There's a solution for every budget. For LOD and culling, you could buy InstantOC or write your own. Asynchronously streaming assets in and out is harder without Pro, but you could manage your own assets in coroutines. SECTR STREAM will stream zones in and out, and for non-Pro users provides some good features to reduce hiccups when loading chunks. Without some kind of streaming, I think you'll be compromising a lot in your region design.

    Design-wise, you can build in some occlusion at your high points. Say you're at the top of a cliff looking east over a vast plain. You could place thick trees behind you to the west. You still get the feeling of vastness with only half the area.

    If you go with zones, how do you plan to handle objects crossing zones (e.g., an NPC following you across zone boundaries)?
     
  4. ARMagEDdonWATCHER

    ARMagEDdonWATCHER

    Joined:
    Jan 27, 2015
    Posts:
    21
    Thanks for the idea. I never thought of implementing my own LOD or culling scripts. If you can't buy it, then make it yourself, right?

    I like your idea for the design. Occluding with design will mean less work for the engine. I'm all for good design.

    As for objects crossing zones, my intention is to have the zones only contain stationary objects. Enemies will spawn within the zones when the zone is entered, but they are spawned as independent game objects, so their continued existence is not dependent on the zone being active. Of course, this brings up new problems, but I'll tackle that in a new thread.

    That's one of the hardest things I can think of for designing a level: content. Too much, and it will be a chore to players. Too little, and players will get bored.

    What I want players to do with these maps is explore them and discover the history of the world through their exploration. Each landmark, each detail, should be tailored to grab the players' attention, to make them want to explore. Of course, players will also be rewarded with items and the general fare that comes with extra exploration. With that focus, I aim on creating environments that are interesting enough to make players want to explore them.

    But with what you said, it won't hurt to go back to the drawing board for the environments. If I draw my points of interest on paper and design my levels around them, I could potentially cut down on map sizes when I build them in Unity. It will make it easier to plan for LOD and culling.
     
    AndrewGrayGames likes this.
  5. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,823
    The development team for Star Wars: The Old Republic once said: "Content sucks. It takes time and resources to make, yet you don't have a game without it." I agree. Content does suck. My last game, I fell into the trap you talked about - I created too much content in the main questline to execute well, and didn't have enough sidequest stuff to distract people from the Great Tower of Badness. The 'world map' was actually pretty tame, its just it was laid out all wrong. I don't intend to repeat that mistake.

    As far as actually placing stuff, something I'm playing with in my game is designing interesting landmarks to be just visible from a particular landmark, to invite exploration. I think that's the thing - players can feel it if you're inviting them to take a look at something you want them to. I didn't do that nearly well enough in The Hero's Journey, in fact I actively hid stuff in the hopes that the player would look around everywhere. Surprise, surprise - didn't really happen.
     
  6. iDontLikeHipsters

    iDontLikeHipsters

    Joined:
    Mar 24, 2014
    Posts:
    24
    I don't know about most other AAA games, but Skyrim handles open worlds with "cells", which are grids that subdivide the overworld. (A.K.A. your "zone" idea. :p) In Skyrim, there may be multiple active cells at any given time.

    The most important ones are:

    • Center (YOUR Cell)
    • North (relative)
    • South (relative)
    • East (relative)
    • West (relative)
    • Northwest(relative)
    • Northeast(relative)
    • Southwest(relative)
    • Southeast(relative)
    These are all the cells that should render fully at any given time. Go outwards by 1, and the houses are under-detailed, and things like triggers shouldn't even be in memory. Outwards by 2, the houses are even more under-detailed, and the smaller props are gone. Outwards by 3, houses are the same level, but the trees and rocks are under-detailed. 4 or more, the houses should be gone, but the trees and rocks should be under-detailed.


    If you're good with Geometry, you should be able to program something that will automatically generate cells across your map. Hope this helps!
     
    BrandyStarbrite likes this.
  7. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,563
    I'd put some fog, too. It can help hide objects and fade it into the distance. Go for a blue hue to blend with the sky.
     
    BrandyStarbrite likes this.