Games [XUI2D] Use of several Tile Layers

Gunther

Active Member
Licensed User
Longtime User
Hello,

I would like to ask if someone has an example of a Multi-Tilelayered loading and drawing processes in the Game class?

Thanks in advance.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You are asking about tile layers, right?

Mario example includes two tile layers. All that you need to do to draw the tiles background is:
B4X:
Public Sub Tick (GS As X2GameStep)
   TileMap.DrawScreen(Array("Tile Layer 1", "Tile Layer 2"), GS.DrawingTasks)
End Sub

Public Sub DrawingComplete
   TileMap.DrawingComplete
End Sub
 

Gunther

Active Member
Licensed User
Longtime User
Hi Erel,

Yes, thanks, the Tile Layers, that I was looking for.
Any automatism for putting that all (Tile Layers) into the array?

The opacity is not taken in the Layers if set in Tile, right?
 
Last edited:

Gunther

Active Member
Licensed User
Longtime User
Well 5 Tile Layers. "Background", "Walls", Things which are half coverved by Walls but in front of the background etc.
 
Top