Difference between revisions of "LuaPill"

Line 35: Line 35:
 
end
 
end
 
</source>
 
</source>
 +
  
 
<source lang="lua">
 
<source lang="lua">
Line 46: Line 47:
 
</source>
 
</source>
  
Grab it and give it a spin on [https://github.com/Kyrremann/LuaPill]. There is also a demo there. Enjoy!
+
Grab it and give it a spin on [https://github.com/Kyrremann/LuaPill].
 +
 
 +
There is also a demo there. Enjoy!
  
 
[[Category:Libraries]]
 
[[Category:Libraries]]

Revision as of 20:12, 12 January 2015



LuaPill (short for "Practical Isometric Layering Library for Lua") is an engine for generating isometric maps for Löve2D and Lua.

function love.load()
   map = require "luapill"
   local config = {
      tilewidth = 128,
      tileheight = 64,
      folder = "images"
   }
   map:setup(config)
end

function love.update(dt)
end

function love.draw()
   map:draw()
end

function love.keypressed(key)
    map:keypressed(key)
end

function love.keyreleased(key)
   map:keyreleased(key)
end

function love.mousepressed(x, y, button)
   map:mousepressed(x, y, button)
end


config = {
      tilewidth = 128,
      tilewidth = 64,
      folder = "images",
      sortFolder = boolean, -- optional, default false
      defaultTile = number -- optional, default 1
   }

Grab it and give it a spin on [1].

There is also a demo there. Enjoy!