We feature an extensive support for maps designed in Tiled map editor.
We support many Tiled features, like
Any number of layers, any map sizes, multiple tilesets.
All map types: Orthogonal, Isometric, IsometricStaggered, Hexagonal.
Flipping of tiles (diagonal, horizontal, vertical).
Optimized rendering with static batching of map layers.
Inside the viewport you have a regular camera. You can move the camera, you can change the camera orthographic height (
TCastleOrthographic.Height) to zoom in/out. Add the
TCastle2DNavigation component as a child of your viewport to allow user to move/zoom on the map too.
You can control
false (default) results in a pixel-art look.
true means to use smooth (bilinear) filtering for the tile images.
If you see weird seams between tiles when using
true, this is likely a lack of alpha bleeding. You have to process your tileset image by adding some spacing between tiles and perform alpha bleeding in your image-editing software (you can use our castle-view-image). Alternatively, you can activate
TCastleTiledMap.SmoothScalingSafeBorder to workaround it.
To show/hide specific layers use
TCastleTiledMap.Layers. Click on the button with 3 dots
… at the
Layers property to invoke a nice dialog where you can select layers by names.
TCastleTiledMap.Map exposes internal map data (read-only) to query for various information about the map.
To improve this documentation just edit the source of this page in AsciiDoctor (simple wiki-like syntax) and create a pull request to Castle Game Engine WWW (cge-www) repository.