Example examples/tiled/strategy_game_demo was upgraded to use our new TCastleTiledMap component. This is a complete turn-based strategy game using our Tiled integration!
As part of this, the game now features map panning and zooming “for free” thanks to the usage of
TCastle2DNavigationin the viewport. It’s nice to see our approach (“map in viewport is more flexible”) coming together, as you can mix Tiled map with all our viewport stuff — images, scenes, sprite sheets, cameras etc.
TCastleTiledMap.TileRectanglemethod added. Useful to position something at given map tile.
Tiled docs have been extended to describe some new features, and in particular new section Determine tile indicated by mouse was added. It’s rather easy, but there are at least 2 approaches to do it and they deserve proper explanation 🙂
TCastleTiledMap.Data, it’s just a better property name. Old name is deprecated.
Small thing: The
examples/tiled/map_viewer_in_viewporthas been renamed to just examples/tiled/map_viewer.
The older Tiled example using deprecated
TCastleTiledMapControl(Tiled map rendered as UI) was removed to not confuse anyone.
Tiled maps: examples updated (see the new "strategy game demo"), API and docs improvements (how to determine tile picked by mouse, and more)