Tiled maps: examples updated (see the new “strategy game demo”), API and docs improvements (how to determine tile picked by mouse, and more)

Posted on

Strategy game demo
Tiled map
  1. 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 TCastle2DNavigation in 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.

  2. TCastleTiledMap.TileRectangle method added. Useful to position something at given map tile.

  3. 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 šŸ™‚

  4. Small thing: TCastleTiledMap.Map is now TCastleTiledMap.Data, it’s just a better property name. Old name is deprecated.

  5. Small thing: The examples/tiled/map_viewer_in_viewport has 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.

Start the discussion at Castle Game Engine Forum