Introduces the concept of layers.
Edit me

A world of many layers

The game world is built up by stacking many layers on top of eachother. The game will draw the lowest layer first and work its way up to the top layer. This means that the lower layers will contain the ground, flowers etc. while the top layers contain that what is high up in the air.

Let’s look at an example. Say we want to this tree to a level.

Picture of a tree

Even though intuitively the tree is one solid object, we actually have to split it over multiple layers. This is because not every part of the tree interacts with our game world in the same way. We want to overlap the ground with the tree trunk and we want to be able to walk behind the top of the tree. Generally you will divide the tree over three layers in the following way:

Layer Description Image
Rooftops The upper branches of the tree. These tiles don’t contribute collision as they are high up in the air. We want to be able to walk behind these tiles without hindrance which is why we split them from the base of the tree.
Picture of a tree
Structures The base of the tree that collides with the player. The tile that we are using here has non-transparent green shadow, but in Ulix a transparent shadow would be preferred.
Picture of a tree
Ground The ground that the tree is standing on. Notice that the ground uses a variety of tiles, including some flowers. As the layers above
Picture of a tree