Skip to content

markandgo/Tidal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tidal

Tidal loads and renders Tiled maps. Requires LÖVE

Currently compatible with Tiled 0.10.0

This was a fork of Kadoba's Advanced Tiled Loader. The majority of the code has been rewritten from the ground up. Latest update is found on the master branch.

Supports every known feature except for the following:

  • Specifying draw order

Stable release: v0.10.2

Please check out the wiki for help.

Alt text

Example:

tidal          = require 'src'
map            = tidal.load('map.tmx')
map.batch_draw = true -- Enable spritebatches (default)

layer = map.layerOrder[1]  -- Get lowest layer
layer.opacity      = 0.5   -- Set layer transparency
layer.ox, layer.oy = 5,5   -- Offset layer by these many pixels
layer.visible      = true  -- Set layer visibility
tile = layer:get(tx,ty)    -- Return tile at tx,ty

gid  = 1
tile = map.tiles[gid]             -- Get tile
print(tile.properties.myproperty) -- Get set property in Tiled

function love.update(dt)
	map:update(dt) -- For animating tiles
end

function love.draw()
	map:draw(x,y)
end

About

Tiled map loader for the LÖVE game engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%