|
deki-tiledmapeditor-integration 0.19.0
Deki package reference
|
Loads and renders maps authored in Tiled (.tmj) with chunk streaming
Repository: github.com/dekiengine/deki-tiledmapeditor-integration · Latest release: 0.19.0 · Needs engine 0.19.0+ · Requires: deki-2d, deki-rendering
Install with DekiEditor --packages-add deki-tiledmapeditor-integration <project>, or from the Package Manager. The engine's own components and C++ API are in the Deki docs.
Shown in the editor as Tiled Map Editor Integration.
| Component | Category | Description |
|---|---|---|
| TilemapColliderComponent | Tilemap | Exposes a tilemap layer's per-tile collision shapes for queries. |
| TilemapComponent | Tilemap | Draws a Tiled map, streaming chunks in around the camera. |
| TilemapObjectSpawner | Tilemap | Spawns objects from a Tiled map's object layers when the scene loads. |
Parts you can leave out of a build. A feature with a define is switched there; the rest are stripped with their components.
| Feature | Define | Default |
|---|---|---|
| Tilemap Rendering | DEKI_FEATURE_TILEMAP_RENDER | on |
| Tilemap Collision | DEKI_FEATURE_TILEMAP_COLLISION | on |
| Object Layers | DEKI_FEATURE_TILEMAP_OBJECTS | on |
Exposes a tilemap layer's per-tile collision shapes for queries.
Inspector name: Tilemap Collider Component · Category: Tilemap · Type: DekiTiledMap::TilemapColliderComponent
| Property | Type | Default | Constraints | Description |
|---|---|---|---|---|
| tilemap | AssetRef (Tilemap) | "" | The map whose tiles become solid. | |
| collisionLayer | int32 | 0 | Which layer of the map holds the collision tiles. A tile present on that layer is solid; an empty cell is not. | |
| loopX | bool | false | Repeat the collision horizontally, to match a map that loops. | |
| wrapPeriodX | int32 | 0 | shown when loopX allows | How wide one horizontal repeat is, in tiles. 0 uses the map's own width. |
| loopY | bool | false | Repeat the collision vertically. | |
| wrapPeriodY | int32 | 0 | shown when loopY allows | How tall one vertical repeat is, in tiles. 0 uses the map's own height. |
Draws a Tiled map, streaming chunks in around the camera.
Inspector name: Tilemap Component · Category: Tilemap · Type: DekiTiledMap::TilemapComponent
| Property | Type | Default | Constraints | Description |
|---|---|---|---|---|
| tilemap | AssetRef (Tilemap) | "" | A map exported from Tiled. | |
| visibleLayerMask | int32 | 2147483647 | Which of the map's layers to draw, one bit per layer. All bits set draws everything. | |
| chunkPadding | int32 | 1 | How many chunks beyond the screen edge to keep loaded and drawn. A little padding stops tiles popping in at the edge while scrolling. | |
| chunkCacheKiB | int32 | 256 | 16 to 262144 | How much memory this map may keep decoded chunks in, in KiB. Past the budget the least recently drawn chunks are dropped and re-read from storage when they are needed again, so too small shows up as stutter while scrolling rather than as anything missing. 256 suits an ESP32; a desktop can afford far more. |
| tintColor | Color | "#FFFFFFFF" | Multiplied into every tile. White leaves the map alone. | |
| pixelsPerMeter | float | 16 | 1 to 256 | How many of the map's pixels make one meter. This is what lines the map up with everything else in the scene. |
| loopX | bool | false | Repeat the map horizontally, so scrolling past the edge wraps round. | |
| wrapPeriodX | int32 | 0 | shown when loopX allows | How wide one horizontal repeat is, in tiles. 0 uses the map's own width. |
| loopY | bool | false | Repeat the map vertically. | |
| wrapPeriodY | int32 | 0 | shown when loopY allows | How tall one vertical repeat is, in tiles. 0 uses the map's own height. |
Inherits sortingOrder, ignoreClip, pixelSnap, alphaMode from RendererComponent.
Spawns objects from a Tiled map's object layers when the scene loads.
Inspector name: Tilemap Object Spawner · Category: Tilemap · Type: DekiTiledMap::TilemapObjectSpawner
| Property | Type | Default | Constraints | Description |
|---|---|---|---|---|
| tilemap | AssetRef (Tilemap) | "" | The map whose object layer is read. Each object placed in Tiled becomes an object in the scene. | |
| pixelsPerMeter | float | 16 | 1 to 256 | How many of the map's pixels make one meter, so spawned objects land where Tiled put them. |
Earlier releases: CHANGELOG.md.
Generated from the package's reflection data (engine 0.19.0). Property names are the keys used in scene files. Renames keep an alias (compatibility).