Load and view any Tiled map using TCastleTiledMap component in TCastleViewport.
You can
-
open any Tiled map (
*.tmxfile), -
pan the map (drag with left mouse button pressed, this is working thanks to standard
TCastle2DNavigation), -
zoom (use mouse wheel, this is working thanks to standard
TCastle2DNavigation).
Our data subdirectory contains a number of Tiled maps. You can also go ahead and download Tiled, free map editor to edit these maps or create new ones.
Note about using TCastleTiledMap in a viewport:
- It works most sensible in orthographic view with camera direction along Z. (This is our default 2D camera.) Otherwise the distance in Z between each layer may be visible.
Using Castle Game Engine.
Compile by:
-
CGE editor. Just use menu items "Compile" or "Compile And Run".
-
Or use CGE command-line build tool. Run
castle-engine compilein this directory. -
Or use Lazarus. Open in Lazarus
map_viewer_standalone.lpifile and compile / run from Lazarus. Make sure to first register CGE Lazarus packages. -
Or use Delphi. Open in Delphi
map_viewer_standalone.dprojfile and compile / run from Delphi. See CGE and Delphi documentation for details.
