Methods of constraining player in map

Hello,

It’s not a secret that in most games, the maps have limits on where the player can go. If it’s an interior, it’s pretty simple to keep the player in the map (simply don’t make an exit). However, for outdoor scenes this gets more challenging.

Let’s take Fallout 4. When you get to the border of the map, it just shows a notification that says “You can’t go further” and stops you from going further. Simple, but jarring.

Many other games simply rely on the player knowing where to go. For example, in Asphalt 8, if you jump off the track, it will move you back on the track and show a warning. Some other games show a mesh that stops you from going past it, or show a warning “turn back in X seconds or mission fails”. Some just have invisible barriers you can’t get past.

Which leads me to the question: What (in your opinion) is the best method of constraining a player in an open-world scene?

The standard solution is a navigation mesh. Unity has one in the standard framework, though I’ve heard people have some complaints with it — I think it works pretty well as long as your environment isn’t changing too much at runtime.

Then there are third-party solutions like this one.

Or you can roll your own.

Maybe I wasn’t descriptive enough :frowning:

I meant this as a game design question. It’s pretty easy to keep the player in the map, you just need 4 cubes to surround the player so he can’t leave the map. However I was asking about what’s the best implementation of a map constraint system. Is it best to show a notification, ask the player to move within X amount of seconds, automatically move the player back etc… basically to get some ideas on different ways of letting the player know that they can’t move out of the map.

There have been a few good threads on this. May be good for ideas.

https://forum.unity3d.com/threads/open-world-forest-edge-design.416577/
https://forum.unity3d.com/threads/level-boundaries-subtly.182072/
https://forum.unity3d.com/threads/believable-level-borders.339364/
https://forum.unity3d.com/threads/how-to-make-world-borders-boundaries.315981/

This is one of those odd situations where someone posted in the game design forum about actual game design :wink:

9 Likes

There was a motorcycle stunt game from Microsoft quite a few years ago (can’t recall the name) that has one of my favorite border enforcement techniques. You could ride anywhere you wanted, but the edges of the map were steep hills and mountains. However if you went fast enough and and hit just the right places you could make it up to the top. There was a flat plane up there and you could keep riding for a few hundred feet. Then you’d hear a huge, loud cannon shot and it would shoot you back into the map and you’d fly huge distances. It was great fun and my young kids and I spent hours trying to do it.

More realistically, I think natural terrain features are the best way to go in an open world game. Lord of the Rings Online (when it was still good before they nerfed everything for free to play) had placeholders for future expansions. Paths would be blocked off by rock slides and such, but would be cleared once the expansion was added. Otherwise just natural terrain features, fast moving water, things like that would prevent movement. It was effective and believable.

4 Likes

The Mad Max game let you drive for a really long time into… I think it was called The Big Waste. Eventually the “sand storm” would start doing massive damage and you’d quickly die, but they gave you plenty of time to just get bored and turn around.

Invisible walls or message followed by a reset are really annoying. The Division has a few glitches where you can exit the map area and it only gives you a few seconds to go back before you die. Got cornered once just as I was about to win a really long and difficult mission and accidentally died that way. Very discouraging.

Natural-appearing terrain or obstacles are the best by far.

2 Likes

Ancient Domains of Mystery blocks all travel off the map with mountains except through a single pass. If you attempt to leave it lets you which quits the game giving you a score and a summary of the state of the world you left behind.

I kind of like the “endless desert, forest or sea” solution, simply because you can just pretend the further you go the more you are in danger of either being eaten by something too large to defeat or you simply drown, die of dehydration, sandstorms etc. Makes the borders feel less like an invisible wall, but gives players the clear hint that no further :slight_smile:

I had one game where the game had a very deep forest, where enemies would spawn out of sight and attack you and would grow stronger and harder and in the end unbeatable the deeper i tried to walk in :slight_smile:

In general though, i think it all depends on what you need the constrains for, when it’s a closed map like dungeons, it’s easy to do with walls, if it’s an open map, I would prefer as a player to not be bluntly hit with an invisible wall in my face.
I would even go and say “there is no general best way” but there might be a good solution for specific projects :slight_smile:
Like the example you gave with putting back on tracks, can be very good for racing games, where you want most amount of action and not wanting to interrupt the adrenaline flow, but if you do same in as example rpg game with rather slow gameplay, it can feel “repelling” instead of releading back to the fun.
On the other hand, if you have a survival game, the limits could be done through extreme weathers at edge of map, so players would naturally try to avoid it (especially when it is really becoming increasingly hostile).
But in a shooter, it could take away from the feeling of being powerful and being able to deal with anything with your weapon(s), therefore in a shooter players might not care so much about the logic of a game level and would maybe happily accept a completely walled in area to play in.

1 Like

Tread carefully with this approach. I’ve played a few games with the ‘endless dessert’ where it wasn’t super obvious I wasn’t meant to be there. After a couple of hours of wandering I couldn’t actually find the main game area again.

Make the endless dessert end fairly quickly, making it obvious the player should turn around. Or make it engaging in its own right.

1 Like

My personal preference is to use something that fits within the theme of the game. Elderscolls games use mountain ranges most of the time as a natural border and this works pretty well. Talos Principle used a system where you got a voice over from the “god” of the game and it eventually reset the level (which was very much in theme). Farcry had the infinite desert trick using the sea.

Consider the game itself, what type of border most exemplifies the games lore and theme? I always believe in avoiding the cheap immersion breaking way out. i don’t mind the Bethesda way of showing you “Hey this is where the path out actually is, but don’t go that way please” because generally the majority of the border is going to be sea/mountain borders.

2 Likes

oh right, in my head the image was a bit more clear, than what I wrote down :slight_smile: I was meaning it more in sense of “visually” endless desert, but game mechanic wise, due to storms and other “obstacles” the player wouldn’t be able to get far into it, only far enough to know he should turn back, but still be able to see and travel “easily” back to the main map. Kind of like a storm making movement in that direction very very slow, add to that the “dying” part and the player simply can’t venture out far enough for the distance to become a problem :slight_smile:

3 Likes

I like how Journey did it, using strong winds to blow the player back into playable space. It’s also nice to have ‘soft’ boundries that players can explore like the Mountain sides in Far Cry 4

I actually managed to get past the Far Cry 4 map boundary once. There actually are invisible walls, jump at the peak of the mountains. This is one reason why you should not use just an invisible wall, that does nothing but stop your from moving further.

AC games have learnt this, as you used to just have a flat big wall appear, and you couldn’t go any further, but in more recent games, it just tells you to go back, and if you don’t, it teleports you.

The problem with invisible walls, is they’ve most likely just invisible game objects. And just like any game object, you can glitch through them.

All I had to do, is get to the highest point in FC4, by finding a nice flat area I could eventually climb up. And with my back to the invisible wall, start launching and throwing explosives in front of myself. Just enough to not kill myself. (with all health upgrades)

I kept doing it, and healing myself, until I just popped through somehow, and I could jump off the map into the endless abyss.

That’s kind of beside the point. Once the player decides, “I’m going to grenade myself through this invisible wall that I spent an hour climbing an obvious map-edge barrier-mountain to reach,” immersion-breaking isn’t exactly on the radar any more…

4 Likes

True.

I’d be inclined to put some sort of easter egg reward for such tenacious players.

Or you could even make it the whole (but initially hidden) point of the game.

3 Likes

In practice this can be really easy to do. Just a simple texture with words to the effect of ‘We didn’t expect anyone to make it here, so nobody bothered to texture this wall’. For the type of player that’s going to spend this much effort breaking the game, that’s enough of a reward in its own right.

1 Like

With such a vast world, I’m willing to bet the FC4 devs have no idea where you could possibly escape. I mean, they probably worked to make it ‘impossible’ to get to the invisible wall in the first place :wink:

This. Figure out some way that fits with your mechanics, story or presentation.

Early Call of Duty games had minefields surrounding the playable area. Walk too far out and you “step on a mine”. Other military games have a commanding officer who tells you you’re going AWOL or tells you you’re lost and to turn around. GTA3 and some Need for Speed titles have all roads out of the city blocked.

1 Like

I remember nice solution in an old Delta Force game. There was no constraints as to where to go, but you had a chunk of map terrain with couple of mission objective buildings, and outside of that square the terrain pattern just repeated itself endlessly, copying the same terrain square only without buildings. So theoretically you could go anywhere without the feeling of bounds, and eventualy you would turn back yourself

1 Like