Questions about creating levels/maps

Hey everyone,

I have few questions regarding level or multiple map creation. Probably they are newbie questions (but thtat’s what I am)

So I’ve watched many tutorials about levels and map creations.

Most of them are: create your level scene, and apply some kind of transition. I think this could be similar to RPG-Like game, where when entering dungeons/homes there will be another scene.

I wonder if having a scene per level/map is the correct way, or are there better ways?

One of the thing i was thinking for example, was to declare maps using some kind of text format and generate them from there, does that make sense?

Also in the case of openworld games, is it really the whole openworld just a scene? Or is defined in a beter way?

What i’m trying to understand what are the various way of creating maps/levels.

I’m just looking for a high level overview. Not implementations details.

So far what I’ve found out from the various tutorial are two main ways:

  • 1 Scene = 1 map or 1 level
  • Random map generation

Are those the only possible ways? Or there are are maybe godot object that helps managing levels?

Thanks.

It’s definitely correct, but it heavily depends on the type of the project if this is the best way.

Sure, that’s one way to serialize the map data for easier saving and loading.

It also depends, but usually when we’re talking about big maps (think Minecraft - it’s millions and millions of blocks, can’t possibly load it all at once), then a common technique is chunking. You split the map into chunks, load only the chunks around the player and when they move - unload unnecessary chunks behind them and load new chunks in front of them. It gives a simple illusion of an infinite map.

Add chunking in there and you’re mostly golden, these are definitely the most common ways and should cover basically all usecases. The Random map generation is usually called Procedural map generation if you’re ever trying to find some material about it.

Godot makes it easy to load, preload and change scenes

5 Likes

I have never finished a game with this, but the first time I got chunk loading working, combined with procedural chunk generation, it was amazing. It was only 2D top down, but suddenly I had an infinite world that I could wander aimlessly in forever, and only had nine chunks loaded at any time. I even had random generation of fauna and animals that were saved when a chunk was unloaded, so that when I returned to a chunk it had the same plants and animals in it.

My next thing was going to be cities and towns, but I never got to that unfortunately. In 3D you have the additional problem of distance rendering too, so more chunks to load I suppose, even at lower res at distance, it has always spooked me how amazing some scenes can look. I have no idea how you would approach doing that. My 2D chunk loading was pretty straight forward in comparison.

You could, with a limited map, have chunks as scenes, so you retain full control over what’s in them without procedural generation. Then you would load and unload the scenes just like loading chunks. So one level is several map scenes each a different chunk of the map.

3 Likes

A good way to handle 3D chunking IMO is to use imposters for distant objects combined with careful level design. Classic UE tutorials showed how hallways, tunnels, hills, valleys, anything like that which obstructs the player’s view can serve as a good transition point to load the next region and unload the prior.

I do big open area games and race games for the most part, so I primarily rely on imposters and LOD over chunking - but chunking is still a vital tool for the toolbox.

2 Likes

Thanks for al the answer guys.

So my understanding of the above techniques is that they are mostly suitable for open world games right?

And in case of level based games? (like platforms) They still make sense? Or is there a better approach for them?

1 Like

In this case 1 level = 1 scene is usually the best option.

2 Likes