Engine Export
Code snippets and presets for loading maps in Godot, Phaser, Unity, and more.
TileForge helps you get your map into your game engine with two features: engine presets (correct tile sizes for your engine) and export code snippets (ready-to-use loading code).
Engine Presets
When creating a new map (Ctrl+N), the Engine Preset dropdown auto-fills the tile size and other settings for your target engine:
| Engine | Default Tile Size | Notes |
|---|---|---|
| Godot 4 | 16px | Import TMJ via Tiled Map Importer addon |
| Unity | 16px | Use SuperTiled2Unity; set PPU to match tile size |
| Phaser 3 | 32px | Native TMJ support via this.load.tilemapTiledJSON() |
| RPG Maker MZ | 48px | Fixed 48x48 tiles; tileset must follow RPG Maker layout |
| GameMaker | 16px | Import TMJ via extensions or manual parsing |
| Defold | 16px | Supports margin/spacing/padding on tile sources |
| Love2D | 16px | Use STI library for TMJ loading |
| Pygame | 32px | Use pytmx or pyscroll libraries |
Selecting a preset stores the targetEngine on the editor state, which is used by the code snippet generator.
Export Code Snippets
Open the export dialog via File > Export for Engine. TileForge generates ready-to-use code for loading your TMJ map file.
Godot 4 (GDScript)
Generates GDScript code for loading the TMJ file using the Tiled Map Importer addon. The snippet includes scene setup, tilemap node creation, and layer configuration.
Phaser 3 (JavaScript)
Generates JavaScript code for Phaser 3's built-in Tiled map support:
// In preload()
this.load.tilemapTiledJSON('map', 'path/to/map.tmj');
this.load.image('tileset', 'path/to/tileset.png');
// In create()
const map = this.make.tilemap({ key: 'map' });
const tileset = map.addTilesetImage('tileset-name', 'tileset');
const layer = map.createLayer('layer-name', tileset);
Unity (C# / SuperTiled2Unity)
Generates C# code for Unity using the SuperTiled2Unity package. Includes asset import configuration and tilemap component setup.
Copy to Clipboard
Each code snippet has a Copy button that copies the code to your clipboard, ready to paste into your project.
TMX for Older Toolchains
Some engines and tools prefer TMX (XML format) over TMJ (JSON). Use File > Export as TMX to get an XML version. See TMX Export for details.