How to limit players from going off the map

Godot Version

Godot 4.3

Question

I’m making a game with kind of unlimited movement and i’m running into an issue with making open maps

How do i make a map seem coherent, without making a whole gta 5 map for 1 level

What i mean is, for example if i wanted to have a level take place on rooftops like in mirrors edge or smth
How do i limit the player from going off the map, and seeing where the map ends

Games like ultrakill achieve this by having rooms and corridors as maps or just an unending abyss, but i wanted to make my maps more grounded, like cities

So how would i go about this, limiting the player and all.
I can think of a couple solutions like limiting their movement, adding invisible walls, or actually making a huge map, but i was hoping someone could show me a better way, thanks

Afaik most games use invisible walls.
Some hide it for example by placing a fence that also has a invisible wall on it, so the player can’t jump over it. Or they place steep mountains around the map.

Some punish the player for going too far by making him drown in the water or spawn monsters that can’t be defeated and immediatelly kill him.
Or display a warning/timer when leaving the play area and then kill him if he doesn’t return to the play area (Borderlands, Battlefield).

I guess it depends on what fits best for the game and doesn’t break the immersion too much.

1 Like

My man thank you for the timer idea, that one def seems like the way to go for my game

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.