Level Design - Creating Levels

2 - Level Chunk

This is a collection of Levels that form the entire available space allocated in memory. This allows us to limit the number of levels we load into memory and use a fading transition to move to a new chunk of levels.

Guidelines

When designing the levels, consider the following:

Balanced Chunks

Ensure that the level chunks you build have a well balanced number of levels inside.

  • Too small is wasteful as we have to sarcrifice seamless movement through the levels.
  • Too large feels seamless to the player, but performance suffers with every level we add.

Level Chunk

There's no strict number of levels per chunk, but we should consider how well the level performs.

1x1 Levels (Avoid)

Our original design was to use levels the same size of the screen with a fixed camera that would pan to the next level when reaching the edge of that level. We want to avoid this as it makes the world feel too clinical and less seamless.

Level Chunk

NxN Levels (Advised)

  • Our new design is to provide variety of level sizes to provide more room to breathe and fight more enemies, but still supporting single levels for more intimate moments.
  • You need to ensure that the coordinates are always correct. E.g. as shown in the image example below, if you design a level at grid coordinate (1, 0) - and it's a 4x4 sized room, this means it would take over the coordinates:
    • 1, 0
    • 2, 0
    • 1, 1
    • 2, 1
  • If a single sized level, the camera will be fixed.
  • If a NxN sized level, the camera will follow the player in the boundaries of that level.

Level Chunk

Node Tree

LevelChunk_001 // Root Node for LevelChunk LevelChunk_XXX (Based on Chapter)
	Levels // Container for all Levels
		Level(0_0) // Needs to map to the world grid coordinates (1 - Level)
		Level(1_0) // (Coord Vector2(1, 0))
		Level(2_0) // (Coord Vector2(2, 0))

Code Location

tribe-of-the-accord/
	src/
		LevelChunks/
			LevelChunk_001.tscn // Chapter 1 -   first loaded chunk
			LevelChunk_001_2.tscn // Chapter 1 - second loaded chunk
			LevelChunk_001_3.tscn // Chapter 1 - third loaded chunk
			LevelChunk_002.tscn // Chapter 2 - third loaded chunk

Template

These are the files used to generate the source code above 'Code Location'

tribe-of-the-accord/
	src/
		TemplatesLevelChunks/ // None of these files are to be used directly, they should be created by the ChapterGenerator
			AbstractLevelChunk.tscn // This is the scene that all other templates 'Inherit' from.
			TemplateLevelChunk.tscn // This is the template scene to create Level Chunk scenes