Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How do you deal with map boundaries on a terrain?

Discussion in 'Editor & General Support' started by rapidrunner, May 15, 2018.

  1. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    I know there are many ways to do this, but I was wondering how did you deal with it, in your specific case.

    Fundamentally, I can create a map, beautiful, except that when the player gets to the edge, either the immersion break (invisible wall, can see the edge of the map), or they get blocked before they can get there, although it often seems like they are blocked on purpose.

    What is the approach you did use, to hide the borders, and give a feeling of correctness, for the player experience? So far I have the following:

    - Invisible walls: the good old barrier; ugly to see but super fast to implement

    - Slopes to block progression, coupled with mountains: also fast to implement but require design efforts, since you can't just stretch the edges of the map and make mountains, especially if your terrain is mostly flat or has water

    - Objects blocking the path: does not require map re-design but may be hard to find a believable set of objects that block the path to the edge of the map.

    Also, do you add a facade (like a plane with a nice picture) to the edge, to continue the horizon, or do you actually add meshes ? Trying to collect best practices to make something pretty and at the same time, performing well
     
  2. knobblez

    knobblez

    Joined:
    Nov 26, 2017
    Posts:
    223
    this depends on the type of game entirely. in a horror game, everything can take place in a house. in that case they cant leave because the doors are locked. maybe the goal is to get out of the house? so when they reach the gate it goes to a cut scene.

    in an open world game you can do a full 360 degree valley. islands work well because its not very fun to just keep walking in open water that is clearly not leading anywhere.

    the enemies could be coming from out-of-bounds like in cod zombies.

    look into skyboxes for sky business
     
  3. Shayke

    Shayke

    Joined:
    Dec 8, 2017
    Posts:
    352
    Intresting question.
    My projects are 2D so i usually use 2D colliders, i think for 3D it's suppose to be like you said invisible walls.
     
  4. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Indeed invisible walls is one of the techniques used more often; although it is ugly and show poor design.

    Having a terrain, preclude the "horror" approach :) Also there is no such thing as infinite map, unless you decide to make your game in that way. My map is a 2Kx2K square; if you get to the edge you fall down, so either you put invisible walls, or you put game objects around it; modifying the map. The first is ugly, the second is time consuming, but I guess there is no other way.