1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-28 19:23:53 +00:00

Created layers (markdown)

False.Genesis 2018-12-26 01:34:59 +01:00
parent 6d8572ccef
commit c0e943c28e

60
layers.md Normal file

@ -0,0 +1,60 @@
The game uses **layers** to order the rendering of graphics. Layers are updated and drawn in order, starting from the lowest layer to the highest. That means the top (last drawn) layer is drawn over everything else.
The editor maps the 9 regular layers to the number keys 1-9 (the top row; the numbad keys are used for tile effects), the 6 parallax layers to the bottom row starting from _B_, _N_, _M_, and the 3 keys following to the right (_Comma_, _Period_, _Slash_), and the dark layer (_J_).
Internally, the game uses a lot more layers, but only some are available in the editor. The rest can be accessed via scripting.
# Regular layers
* Number keys 1-9
* No special properties
* Detailed info:
* Layers 1, 2, 3: Behind the black background
* Layer 4: The black background is located here.
* When tiles are moved to the front they are in front of the background; when they are moved to back, they are behind the background.
* All layers after this are in front of the black background
* Layer 5: Auto-generated wall tiles are placed here. See [[Map basics|map-basics#modify-a-map]]. Do not use this layer for your own tiles.
* Layers 6, 7: In front of the previous layers but still behind entities.
* <Entities & particles come somewhere around here>
* Layers 8, 9: In front of everything else.
### Tips / typical layer use:
* Layer 1: Non-parallax-scrolling repeat backgrounds
* Layer 2: Tiles to cover up backgrounds for variation or to mask transitions between different background graphics
* Layer 3: Background plants and decoration
* Layer 4: Drop shadows
* Layer 5: DO NOT USE
* Layer 6: Foreground plants and decoration
* Layer 7: Rarely a need to use this; spare
# Parallax layers
Parallax layers are "far-away" background layers that scroll slower than the rest of the screen.
They contribute to the perception of depth and are solely used for decoration and backgrounds.
They are located on keys _B_, _N_, _M_, _Comma_, _Period_, _Slash_ (bottom row on the keyboard).
For simplicity this wiki calls them **P1** (_B_) .. **P6** (_Slash_), where **P1** is furthest in the background.
Be warned that parallax layers are a bit fiddly to work with in the editor at first; they take some getting used to.
**First lesson**: When you see a tile in the editor and try to grab it to move it, it's not where you expect it to be! The best way to grab a tile on a parallax layer is to position the camera in such a way that the center of the screen and the center point of the tile coincide. When you then move the mouse cursor over the tile it will be selected. Zooming in more also helps.
**Second lesson**: The most efficient way to move a tile is to grab it, _keep holding it_, and drag the camera around with the middle mouse button. Then the tile will move with the camera. When you are not zoomed out too much this gives a good estimate where the tile will actually end up.
**Third lesson**: When you place tiles on parallax layers keep in mind that they move slower than the camera. This means that, during regular gameplay, they can appear in places where they look disconnected from the background or out-of-place. This is actually the hardest part of making nice parallax backgrounds. You need to use the layers efficiently in such a way that the closer parallax layers move faster than the further away ones, and use this to cover up tiles from back to front.
The only way to make sure that everything looks good is to set the camera the minimum and maximum expected zoom level in that map area and swim around. If everything looks good you're done!
It helps to adjust the design of your maps to accommodate for this. The player can't move the camera very far in small areas. So keeping parallax areas small makes things a lot easier.
Having a wide-screen resolution also helps. 4:3 or 5:4 resolutions are not a problem, but the wider the screen gets the harder it is to keep parallax tiles under control. You'll have to decide for yourself if a resolution this wide is still realistic or if Full HD is enough:
![Super-wide resolution screenshot](http://fg.wzff.de/pub/aquaria/wikidata/superwide.jpg)
(And don't forget looking around exists -- _E_ key by default or middle mouse button. This enlarges the space players can see!).
# The Dark Layer (_J_)
The dark layer is special. It's used in conjunction with sun form to darken the screen and to enable lighting up areas.
For easier use the editor draws it like a normal layer, but in-game it will look differently:
Tiles placed on the dark layer are then used to modulate the color of the layers underneath it.