Skip to content
Tiled library for LÖVE
Branch: master
Clone or download
karai17 Merge pull request #228 from rozenmad/patch-1
Fix of rendering isometric objects.
Latest commit 777df8f Jan 12, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Removed docs, kept config so peopel can generate their own! Jul 26, 2016
sti Update utils.lua Jan 12, 2020
tests added text object to test map Mar 24, 2019
tutorials fixed bug where nil chunk data was trying to defer to layer data Mar 23, 2019
main.lua Added point objects Mar 24, 2019

Simple Tiled Implementation

Join the chat at

If you like STI, consider tossing me a few monies via PayPal.

Simple Tiled Implementation is a Tiled map loader and renderer designed for the awesome LÖVE framework. Please read the documentation to learn how it works, or check out the tutorials included in this repo.

Quick Example

-- This example uses the included Box2D (love.physics) plugin!!

local sti = require "sti"

function love.load()
	-- Grab window size
	windowWidth  =
	windowHeight =

	-- Set world meter size (in pixels)

	-- Load a map exported to Lua from Tiled
	map = sti("assets/maps/map01.lua", { "box2d" })

	-- Prepare physics world with horizontal and vertical gravity
	world = love.physics.newWorld(0, 0)

	-- Prepare collision objects

	-- Create a Custom Layer
	map:addCustomLayer("Sprite Layer", 3)

	-- Add data to Custom Layer
	local spriteLayer = map.layers["Sprite Layer"]
	spriteLayer.sprites = {
		player = {
			image ="assets/sprites/player.png"),
			x = 64,
			y = 64,
			r = 0,

	-- Update callback for Custom Layer
	function spriteLayer:update(dt)
		for _, sprite in pairs(self.sprites) do
			sprite.r = sprite.r + math.rad(90 * dt)

	-- Draw callback for Custom Layer
	function spriteLayer:draw()
		for _, sprite in pairs(self.sprites) do
			local x = math.floor(sprite.x)
			local y = math.floor(sprite.y)
			local r = sprite.r, x, y, r)

function love.update(dt)

function love.draw()
	-- Draw the map and all objects within, 1, 1)

	-- Draw Collision Map (useful for debugging), 0, 0)

	-- Please note that map:draw, map:box2d_draw, and map:bump_draw take
	-- translate and scale arguments (tx, ty, sx, sy) for when you want to
	-- grow, shrink, or reposition your map on screen.


This library recommends LÖVE 11.x and Tiled 1.2.x. If you are updating from an older version of Tiled, please re-export your Lua map files.


This code is licensed under the MIT/X11 Open Source License. Check out the LICENSE file for more information.

You can’t perform that action at this time.