Adam's Lair Forum

Large levels
Page 1 of 1

Author:  TheGrovesy [ 2017/01/04, 18:59 ]
Post subject:  Large levels

I am trying to decide what engine (and tools) to use to create an rpg game. The key requirement I want is that it can handle large levels. Ideally I want the entire rpg map to be a single level. Loading other levels for when you enter a house or cave is acceptable.

Looking at gamemaker this isn't readily or easily achievable.

I like the look of duality as I am a c# developer. Unity is also being considered but i would rather work with a dedicated 2d tool like duality.

Can someone tell me if this is readily supported or to what extent I would have to perform my own object optimisation to achieve this?

Author:  Adam [ 2017/01/04, 20:44 ]
Post subject:  Re: Large levels

Hey there!

The Duality tilemaps plugin was designed specifically with large maps in mind. Rendering doesn't care a lot about total size as long as the displayed portion of the map is reasonable. Physics could get a little trickier, I haven't really measured how large complex collision geometry can get before making an impact.

That said, this here:

Ideally I want the entire rpg map to be a single level

has written world streaming all over it.

If you're dealing with giant worlds, you just don't load them into memory and simulate them all at once - because with an increasing world size, you RAM / memory and CPU requirements will go up (CPU likely being the bigger problem) and you can only scale that up so much until the first machines won't be able to keep up. It also doesn't add anything meaningful to the game itself, since the player won't notice if there's a seagull stealing a fish from a merchant 50 kilometers away - but it does eat up CPU.

What I totally get is that you want a continuous world where you can just walk without hitting a wall or loading screen in any direction.

So what you usually do in a situation like this is to come up with a clever optimization so you only ever keep a certain chunk of the world in memory at full detail - the one directly around the player - and load or unload it bit by bit as the player moves around. This means your memory and CPU requirements remain largely constant while your world size increases, which is awesome.

In short: Duality tilemaps are geared towards allowing big maps, but you should definitely come up with a technique to stream parts of the world in and out of memory. This last advice is engine-agnostic.

Probably the easiest way to go about this is to split your world into square chunks of a fixed size and at runtime make sure that there is always a 9x9 grid of chunks loaded around the player. If you do it right, it will go completely unnoticed and being 2D actually plays in your favor a lot, as the player cannot look "into the distance" except for what you allow.

My suggestion would be to get started with a small project, get used to the engine and tilemaps and go from there. It shouldn't be too hard to get that world streaming up and running, but it's always easier if you already know your way around the tools :)

Author:  TheGrovesy [ 2017/01/04, 22:38 ]
Post subject:  Re: Large levels

Excellent, many thanks for the explanation. I did have a feeling I might have to do something like this. And completely agree I should do a few tech demos first to get used to the framework and understand how it works.

Thanks again and I have a feeling you haven't heard the last from me ;)

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group