• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Open World Level Generation

So I'm looking to build a somewhat Zelda-like game but rather than using room transitions between the different areas on the overworld, what I want to do is:

Have the entire game world, which is tile-based, stored into a large grid.

Whenever the player moves, it will delete tiles outside their "range" and create new ones in the direction they're traveling. So as they move around the game will pull the tiles from the grid and instance them in front of the player in whatever direction they're traveling.

Coding this doesn't seem like that big of an issue, but what is a issue is I'm not sure how to create the entire overworld in a easy to edit manner. Like if I really had to I could manually place each block within the ds_grid but that would take ages.

I'm not sure if the room editor can handle a "level" that's made of a few hundred + tiles. Not to mention I don't want it loading the entire thing, just whatever is local to the player.

Has anyone built a system similar to this?
 

NightFrost

Member
You could just use the room editor and lay out the world as tiles on a tile layer. You can always poke at the layer with tile commands if you need to know what has been placed where, I recall.
 
You could just use the room editor and lay out the world as tiles on a tile layer. You can always poke at the layer with tile commands if you need to know what has been placed where, I recall.
Can the room editor handle that many objects / tiles at several hundred?

Is there a way to keep them from all being instantiated when the room starts and just instantiate the ones local to the player's position?
 

Simon Gust

Member
Can the room editor handle that many objects / tiles at several hundred?

Is there a way to keep them from all being instantiated when the room starts and just instantiate the ones local to the player's position?
Pretty sure the GM:S 2 one can. GM:S 1.4 on the other hand...
Let's just say, placing ~100 tiles lags the room editor in 1.4
 
Well I can place plenty of tiles, up to 1,000,000, which is nice, so I could potentially have a object create the objects local to the player according to the tiles.

Issue is AFAIK you can't tie IDs to unique tiles, only the sets. Which means I'd need to create a unique tileset for each object unless I'm missing something.
 

Yal

šŸ§ *penguin noises*
GMC Elder
Why create and destroy tiles when you can just move the view? When I made Bushido Panda I made the entire overworld one room, the game just scrolls the view when you walk offscreen. Then I use the instance_deactivate_* family of functions (look them up in the manual) to make sure only on-screen objects are active, so enemies offscreen won't shoot you (or take up CPU time at all).

(Certain important objects like the player and the screen effects controller are always activated, it's easy to forgot about that detail)
 
Why create and destroy tiles when you can just move the view? When I made Bushido Panda I made the entire overworld one room, the game just scrolls the view when you walk offscreen. Then I use the instance_deactivate_* family of functions (look them up in the manual) to make sure only on-screen objects are active, so enemies offscreen won't shoot you (or take up CPU time at all).

(Certain important objects like the player and the screen effects controller are always activated, it's easy to forgot about that detail)
How big are your maps?
 
Top