Skip to content
/ lice Public

A library to draw 3D isometric maps in Löve

License

Notifications You must be signed in to change notification settings

Shylie/lice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

┌─╖    ┌────╖ ┌───╖ ┌───╖
│ ║    └─┐╓─╜ │╓──╜ │┌──╜
│ ║      │║   │║    │└─╖ 
│ ║      │║   │║    │┌─╜ 
│ ╙──╖ ┌─┘╙─╖ │╙──╖ │└──╖
└────╜ └────╜ └───╜ └───╜

A löve library for drawing 3D isometric tile maps.


Basic usage:

  1. Require the file with local lice = require "folder.to.lice".
  2. 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.
  3. Set up the map data² like so: map:setLayerID(x, y, z, id, layer?).
  4. Draw the map in love.draw with map:draw(x, y, areaX?, areaY?, areaZ?, centerX?, centerY?, centerZ?).

Footnotes

¹ 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).

About

A library to draw 3D isometric maps in Löve

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages