┌─╖ ┌────╖ ┌───╖ ┌───╖
│ ║ └─┐╓─╜ │╓──╜ │┌──╜
│ ║ │║ │║ │└─╖
│ ║ │║ │║ │┌─╜
│ ╙──╖ ┌─┘╙─╖ │╙──╖ │└──╖
└────╜ └────╜ └───╜ └───╜
A löve library for drawing 3D isometric tile maps.
- Require the file with
local lice = require "folder.to.lice". - Create an instance of a tilemap with
local map = lice.new(sizeX, sizeY, sizeZ, atlas, tileWidth, tileHeight).sizeX— Maximum size of the map.sizeY— Maximum size of the map.sizeZ— Maximum size of the map.atlas— A texture atlas¹ for drawing the map.tileWidth— Pixel width of a single tile in the atlas.tileHeight— Pixel height of a single tile in the atlas.
- Set up the map data² like so:
map:setLayerID(x, y, z, id, layer?). - Draw the map in
love.drawwithmap:draw(x, y, areaX?, areaY?, areaZ?, centerX?, centerY?, centerZ?).
¹ Texture atlases are expected to be a grid of tileWidth×tileHeight tiles.
A 4×4 grid of textures would have IDs as follows:
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 |
² Map data is just an integer corresponding to an atlas ID (see footnote 1).