Games Tiled Pattern Set


Active Member
Licensed User
Longtime User
Good day. I'm trying to configure the map of my game with the images of the floor, walls, trees, etc., but I can't find the way it works. The first place I am following the example of Mario, in Tiled, creating a set of patterns which is previously dimensioned to the desired pixels. In the TILED program, I look for the .png file and select the option to embed in the map. Then I select layer number 1 (I only have one layer of the type Tiled), and I draw my stage and save it. Inside B4X (my application is multiplatform), I load the map like this:
TileMap.Initialize(X2, File.DirAssets, "map.json", Panel)
TileMap.SetSingleTileDimensionsInMeters(WorldWidth / TileMap.TilesPerRow, WorldHeight / TileMap.TilesPerColumn)

In the main Tick I introduce the following code:

TileMap.DrawScreen(Array("Tile Layer 1"), GS.DrawingTasks)

but it does not load the image. I have tried everything, I have followed Mario's example step by step but the image of my set of patterns does not load, I can see my characters walking, but the image of the set of patterns does not. I may be overlooking something. I appreciate any clue that can guide me.