Level Design - Creating Levels
1 - Level
This is where we hold all background & foreground layers, tiles, props, enemies and the player instance.
Node Tree
Level // Root Node for Level
MoveLevelTrigger // outer boxes that trigger a move to another level (Formerly MoveRoomTrigger)
Background // Container for background assets (Node2D) e.g. Distant artwork/parallax views
Flooring // Container for flooring tilesets to paint the floor (Node2D)
Grass // Tileset for Grass/Sand/Snow
Pits // Pit Tilesets
Platforms // Used to add Platforms/Cliffs on top of the floor (Node2D)
PlatformWalls // Used to paint the platform tileset
PlatformFlooring // Used to paint higher level flooring
PlatformCollisions // Smaller tiles to paint collisions
Borders // Used to create border perimeters to keep Player in (Node2D)
Closed // Tileset version of a fully closed level
Open // Tileset version of a fully open level
YSort // Where we place all props & enemies
Enemies // Where we add all enemies (YSort)
Items // Where we add all items(YSort)
Props // Where we add all props (YSort)
Player // This is where the Player is placed (KinematicBody2D)
Foreground // Container for foreground assets (Node2D) e.g. Closer Bushes/Trees to add depth
Navigation // Where we add Navigation Polygons
Layers of a Level
Background
A Background can be used to draw a background scenic view or can simply be the underlay of the flooring - in this case; Water.
Or it could be used for a scenic view (Unofficial background asset used for illustrative purposes)
Flooring
Flooring sits above the background and is typically used to paint the floor tileset - in this case; Grass.
Pits usually sit on top of the flooring but sit inside the Flooring layer node.
Platforms
Platforms are in-land and are raised levels where a Player can climb/walk up or drop down from.
Borders
Borders simply border the level to avoid the Player from escaping. It comes with collisions as standard.
Borders are only to be used on the outside perimeter of the world.
YSort
Foreground
We can add additional layers in the foreground to give the level more dimension, so it doesn't feel as flat.
Code Location
The goal is to share levels across Chapters as much as possible, however we need the flexibility to scope to chapters and identify differences.
tribe-of-the-accord/
src/
Levels/
Level(0_0).tscn // (if shared across Chapters)
Level(0_0).gd // (some levels will need there own functionality)
Level(0,0).test.gd
Chapter_001/
Level(12,0).tscn // (if scoped to a specific Chapter)
Level(12,0).gd // (if scoped to a specific Chapter)
Level(12,0).test.gd // test to check the scene
Template
These are the files used to generate the source code above 'Code Location'
tribe-of-the-accord/
src/
TemplatesLevels/ // None of these files are to be used directly, they should be created by the ChapterGenerator
AbstractLevel.tscn // This is the scene that all other templates 'Inherit' from.
TemplateLevelForest.tscn // This is the template scene for the Forest Biome
TemplateLevelMoorlands.tscn // This is the template scene for the Moorlands Biome
TemplateLevelMeadows.tscn // This is the template scene for the Meadows Biome
TemplateLevelCaves.tscn // This is the template scene for the Caves Biome