Tile Collisions
Two complementary collision systems for different game engines.
TileForge supports two approaches to collision. You can use either or both, depending on your game engine.
At a Glance
| System | Scope | Tool | Best For |
|---|---|---|---|
| Per-tile collision shapes | Tileset (inherent to tile type) | Tile Collision Editor | Tiled-compatible engines (Godot, Phaser, Unity) |
| Per-cell collision | Map instance (specific to this map) | Property Brush | Custom/simple engines |
Per-Tile Collision Shapes
This is the Tiled-standard approach. You define collision shapes once on a tile in the tileset, and every instance of that tile on every map automatically carries those shapes.
Opening the Collision Editor
Right-click a tile in the tileset palette and select Edit Collision. The Tile Collision Editor opens with the tile displayed at 8x zoom for precise shape drawing.
Drawing Shapes
The editor supports two shape types:
- Rectangle — click and drag to draw a rectangular collision box
- Polygon — click to place vertices, forming a custom collision polygon
You can add multiple shapes per tile for complex hitboxes (e.g., an L-shaped wall tile).
Export Format
Per-tile collision shapes are exported as tile.objectgroup.objects in TMJ — the standard Tiled collision format. In TMX, they are exported as <objectgroup> elements inside <tile> elements.
Visualization
When View > Toggle Properties is enabled, per-tile collision shapes appear as orange outlines on the map canvas. This helps you verify collision coverage without opening the editor.
Palette Indicators
Tiles with collision shapes show a red C icon in the tileset palette.
Per-Cell Collision (Property Brush)
The per-cell approach paints boolean collision flags directly onto the map grid. "This cell at (x, y) is solid" — specific to one map, not tied to the tileset.
To use per-cell collision:
- Activate the Property Brush (P).
- Select Collision from the type dropdown in the toolbar.
- Click or drag on the map to mark cells.
The property brush also supports Occlusion and Water properties.
Per-cell collision is stored as a layer property array and exported in the TMJ file. It is useful for custom engines that do not support Tiled's per-tile collision format.
Which Should You Use?
- If your engine supports Tiled maps natively (Godot, Phaser, Unity with SuperTiled2Unity), use per-tile collision shapes. They are the standard, and engines handle them automatically.
- If you have a custom engine or want simple grid-based collision, use the per-cell property brush.
- You can use both simultaneously — they are stored independently and both export correctly.