First version of X2TileMap is attached. It allows loading map files created with Tiled Map Editor: https://www.mapeditor.org/
Tiled is a popular game editor. For now only the basic features are supported. X2TileMap can load maps with tile layers and draw them.
Drawing is done automatically by calling DrawScreen or if you need more control you can call Draw and pass the required area.
The performance is very good.
Format
- Maps and tilesets should be saved as json files. Note that you can edit json files directly with Tiled.
- The data should be compressed and encoded as Base64 string. This is the default option.
- Tilesets must be loaded from spritesheets (not collection of images).
- It supports tile flipping and rotation, however the tiles images must be the same size as the map tiles.
An example is attached. The video above is from the B4i example which shares the same code as the B4A and B4J examples.
Example projects included in the examples pack: https://www.b4x.com/android/forum/threads/xui2d-example-pack.96454/
Tiled is a popular game editor. For now only the basic features are supported. X2TileMap can load maps with tile layers and draw them.
Drawing is done automatically by calling DrawScreen or if you need more control you can call Draw and pass the required area.
The performance is very good.
Format
- Maps and tilesets should be saved as json files. Note that you can edit json files directly with Tiled.
- The data should be compressed and encoded as Base64 string. This is the default option.
- Tilesets must be loaded from spritesheets (not collection of images).
- It supports tile flipping and rotation, however the tiles images must be the same size as the map tiles.
An example is attached. The video above is from the B4i example which shares the same code as the B4A and B4J examples.
Example projects included in the examples pack: https://www.b4x.com/android/forum/threads/xui2d-example-pack.96454/
Last edited: