Action layers

From TheManaWorld
Jump to: navigation, search

This article contains information for Programmers working or interested in working for The Mana World

This proposal has been accepted

The development team has discussed the contents of this article and has decided that it should be implemented as described. But the implementation is not finished yet. You can help to bring the features described here into the game.

Implementation proposal: Map layers proposal

An Action layers is a tilelayer that is build in with every map using Tiled. They are mainly used to add multiple layers on which you can walk. Some examples are: a city wall, a bridge or any cliff-like situation.

These layers, just like all other map layers, consist of tiles. There would be at least 3 different tiles required for these layers: a walkable 'check' tile, collition tiles and a transition tile. The 'check' tiles could be seperated in spawn tiles and non-spawn tiles to define areas where monsters should and shouldn't be spawned (like in narrow passages and near portals).

Actionlayers.png

Bridge layers

My two cents: In this example I will limit the number of possible heights to 2, but it could be easily extended to a generic number. This way we will have 2 collision layers. The first one is used for base terrain, while the 2nd is used for bridges or city walls. In the picture showed you can see the different collision maps for the 2 layers. Every layer allows a direction of walking represented by the blue arrow. The special tiles with arrows are transition tiles. When a player collides with an upward arrow then is z is increased by 1. Similarly happens with downward arrow tile. Players and ground monsters will only check collision with the layer they're standing on. A flying creature has the possibility to fly over different layers. I was thinking that probably they can fly over a 1 layer-height wall. This means that if a bee is on the first layer, it checks collisions with the second layer. If it collides with a collision tile on the second layer, then if the 3rd layer is free, is promoted to the second layer and start checking collisions with the 3rd layer. Special tiles could be added as well to place non flying zones.