Skip to content
GridCraft
FeaturesPricingGamesDocsEditor
FeaturesPricingGamesDocsEditor
GridCraft

A tile map editor for game developers.

Product

  • Features
  • Pricing
  • Editor

Resources

  • Documentation
  • Get Started
  • Sign In
  • Dashboard

Community

  • Send feedback
  • Discord

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
© 2026 GridCraft. A product of OmniaDev Inc.
Documentation menu
  • Getting started

    • Introduction
  • Editor concepts

    • Tile layers
    • Object layers
    • Tilesets
    • Variable-sized tiles
    • Terrain brushes
    • AutoMap rules
    • Plugins
  • Workflows

    • Open a Tiled file
    • Convert to GridCraft
    • Real-time collaboration
    • Edit with AI agents
    • Save to cloud
    • Use the desktop app
  • Export formats

    • Tiled JSON
    • LDtk
    • Godot 4
    • GameMaker
    • Defold
    • LOVE2D (Lua)
    • CSV
    • Binary (server-ready)
  • Account & cloud

    • Cloud sync, devices, Discord
  • Admin

    • Audit log
  • API reference

    • Overview
    • Auth
    • Maps
    • Billing
    • Admin
    • Discord linking
    • Devices
  • Legal

    • Legal index
  • Getting started

    • Introduction
  • Editor concepts

    • Tile layers
    • Object layers
    • Tilesets
    • Variable-sized tiles
    • Terrain brushes
    • AutoMap rules
    • Plugins
  • Workflows

    • Open a Tiled file
    • Convert to GridCraft
    • Real-time collaboration
    • Edit with AI agents
    • Save to cloud
    • Use the desktop app
  • Export formats

    • Tiled JSON
    • LDtk
    • Godot 4
    • GameMaker
    • Defold
    • LOVE2D (Lua)
    • CSV
    • Binary (server-ready)
  • Account & cloud

    • Cloud sync, devices, Discord
  • Admin

    • Audit log
  • API reference

    • Overview
    • Auth
    • Maps
    • Billing
    • Admin
    • Discord linking
    • Devices
  • Legal

    • Legal index

LOVE2D (Lua)

The Lua exporter writes a single .lua file that returns a table. The shape matches Tiled's built-in Lua plugin, so loaders like STI (Simple Tiled Implementation) read it without changes.

What's covered

  • Map metadata (width, height, tile size, orientation).
  • Tilesets, including per-tile properties and animations.
  • All four layer types: tile, object, image, group.
  • Custom properties as nested Lua tables.
  • Wang sets.

Format

The file starts with return { and ends with }. Indented with two spaces.

return {
  version = "1.10",
  orientation = "orthogonal",
  width = 64,
  height = 64,
  tilewidth = 16,
  tileheight = 16,
  tilesets = { ... },
  layers = { ... },
}

What gets lost

  • Variable-size tiles. The Lua plugin convention doesn't have a place for them.
  • Infinite maps. The exporter outputs a flat tile array, not chunks.

Output

map.lua   (Lua source returning a table)