Layers

From WikiPlee

Jump to: navigation, search

The levels are structured using layers. From screen background to more superficial, one finds :

  • zero or more decoration layers ;
  • activity layer ;
  • zero or more decoration layers ;
  • in two players mode, collaboration layer ;
  • the status layer ;
  • the interface layer.

The decoration layers and the activity layer can have different sizes. The « natural » size of the level will be the same as activity layer. Layers of which size differs from the activity layer size are sliding at a different speed (the smaller they are the slower they slide). Other layers are the same size as the screen.

Contents

Decoration layer

There are two different types of decoration layer : ptb::decoration_layer and ptb::pattern_layer. The former conatins sprites and animations at fixed locations. The latter is used to repeat an animation in order to produce a raining or snowing effect for instance.

Activity layer

The activity layer (ptb::action_layer) contains the game elements that can interact between each other, including the player, and the level main walls.

== Collaboration layer The collaboration layer displays text bubbles of what is said by the players (in two players mode), when one of them is out of screen an arrow would indicate toward his position.

Status layer

The status layer displays the player status and informations about the current level : remaining time, lives remaining, score, energy.

Interface layer

The interface layer displays the windows.ptbfr:Calques

Personal tools