-
Notifications
You must be signed in to change notification settings - Fork 1
Maps
Maps are the resource central to JiggleMap. Since JiggleMap focuses on correctness and usability, there may be some differences if you are coming from another map editor that will take some getting used to.
Maps are split up into four separate layers: the block layer, the height map, the collision map and the entity layer. If you are coming from another map editor, you may be confused as to why there are four layers, not three. At the time of writing, most map editors combine the height map and the collision map into a layer called "movement permissions". This is incorrect as the engine treats these layers as distinct. In map editors that use "movement permissions", this results in some redundant (and confusing) values. By separating these into separate layers we can eliminate some of this confusion.
Maps are composed of blocks. Sometimes the term "block" is used interchangeably with the "tile", but this causes confusion with tilesets (which blocks are composed of). For the sake of consistency, JiggleMap uses the word "block" when referring to the 16x16 squares that make up a map, and "tile" when referring to the 8x8 square that makes up these blocks (and most images on the GBA).
Blocks can have behavior attributes which change how you interact with them.
There are 15 possible values for heights in the engine. Two of these values have special meanings.
The value 0 allows the player (and other objects) to move between different heights when stepping on this block. This is usually used for stairs or ramps which require you to change your elevation level. When 0 is used as the height for an entity, it means the entity can be interacted with from any height (the default).
The value 15 allows the player (and other objects) to move through the block without changing its height value. This is used for bridges or other features where you can move both below and above the blocks.
Any other values are just used for other levels of elevation. If you on one level and try to move to a different level, you will be blocked (unless you move through a 0 block). Simple as that. While lower values do not necessarily imply a lower level of elevation, they seem to be used that way in practice. The height level 3 is often used as the default height.
If you're coming from another map editor, you might be wondering how to create a body of water that you can surf on. Older map editors seem convinced that there is a specific "movement permission" for surfing. This is not the case. All you need is a different height level and a surfable block. The level 2 (one height below default height), which explains this misconception. The height takes care of preventing the player from just walking in the body of water and the block behavior takes care of running the surfing script.
The collision layer is simple. If the value is 1, then you cannot pass through the block. If it is 0, you can pass through it.
The collision layer interacts with the height map to prevent the player (and other objects) from moving where they shouldn't. For example, if you have height 0, and collision 1, then the block is unpassable from all levels.
See the page on entities.