{"id":13525453,"url":"https://github.com/karai17/Simple-Tiled-Implementation","last_synced_at":"2025-04-01T05:31:27.125Z","repository":{"id":13224862,"uuid":"15909222","full_name":"karai17/Simple-Tiled-Implementation","owner":"karai17","description":"Tiled library for LÖVE","archived":false,"fork":false,"pushed_at":"2024-03-24T11:43:23.000Z","size":2250,"stargazers_count":922,"open_issues_count":27,"forks_count":126,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-27T22:09:10.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karai17.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-01-14T17:09:48.000Z","updated_at":"2025-03-25T14:21:28.000Z","dependencies_parsed_at":"2024-04-12T01:55:30.618Z","dependency_job_id":"5c01c037-6620-4ebb-b8d7-1fa0a0c2e48f","html_url":"https://github.com/karai17/Simple-Tiled-Implementation","commit_stats":null,"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karai17%2FSimple-Tiled-Implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karai17%2FSimple-Tiled-Implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karai17%2FSimple-Tiled-Implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karai17%2FSimple-Tiled-Implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karai17","download_url":"https://codeload.github.com/karai17/Simple-Tiled-Implementation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246591192,"owners_count":20801981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:18.873Z","updated_at":"2025-04-01T05:31:24.936Z","avatar_url":"https://github.com/karai17.png","language":"Lua","readme":"# Simple Tiled Implementation\n\n[![Join the chat at https://gitter.im/karai17/Simple-Tiled-Implementation](https://badges.gitter.im/karai17/Simple-Tiled-Implementation.svg)](https://gitter.im/karai17/Simple-Tiled-Implementation?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nIf you like STI, consider tossing me a few monies via [**PayPal**][paypal].\n\nSimple Tiled Implementation is a [**Tiled**][Tiled] map loader and renderer designed for the *awesome* [**LÖVE**][LOVE] framework. Please read the [**documentation**][dox] to learn how it works, or check out the tutorials included in this repo.\n\n## Quick Example\n\n```lua\n-- This example uses the included Box2D (love.physics) plugin!!\n\nlocal sti = require \"sti\"\n\nfunction love.load()\n\t-- Grab window size\n\twindowWidth  = love.graphics.getWidth()\n\twindowHeight = love.graphics.getHeight()\n\n\t-- Set world meter size (in pixels)\n\tlove.physics.setMeter(32)\n\n\t-- Load a map exported to Lua from Tiled\n\tmap = sti(\"assets/maps/map01.lua\", { \"box2d\" })\n\n\t-- Prepare physics world with horizontal and vertical gravity\n\tworld = love.physics.newWorld(0, 0)\n\n\t-- Prepare collision objects\n\tmap:box2d_init(world)\n\n\t-- Create a Custom Layer\n\tmap:addCustomLayer(\"Sprite Layer\", 3)\n\n\t-- Add data to Custom Layer\n\tlocal spriteLayer = map.layers[\"Sprite Layer\"]\n\tspriteLayer.sprites = {\n\t\tplayer = {\n\t\t\timage = love.graphics.newImage(\"assets/sprites/player.png\"),\n\t\t\tx = 64,\n\t\t\ty = 64,\n\t\t\tr = 0,\n\t\t}\n\t}\n\n\t-- Update callback for Custom Layer\n\tfunction spriteLayer:update(dt)\n\t\tfor _, sprite in pairs(self.sprites) do\n\t\t\tsprite.r = sprite.r + math.rad(90 * dt)\n\t\tend\n\tend\n\n\t-- Draw callback for Custom Layer\n\tfunction spriteLayer:draw()\n\t\tfor _, sprite in pairs(self.sprites) do\n\t\t\tlocal x = math.floor(sprite.x)\n\t\t\tlocal y = math.floor(sprite.y)\n\t\t\tlocal r = sprite.r\n\t\t\tlove.graphics.draw(sprite.image, x, y, r)\n\t\tend\n\tend\nend\n\nfunction love.update(dt)\n\tmap:update(dt)\nend\n\nfunction love.draw()\n\t-- Draw the map and all objects within\n\tlove.graphics.setColor(1, 1, 1)\n\tmap:draw()\n\n\t-- Draw Collision Map (useful for debugging)\n\tlove.graphics.setColor(1, 0, 0)\n\tmap:box2d_draw()\n\n\t-- Please note that map:draw, map:box2d_draw, and map:bump_draw take\n\t-- translate and scale arguments (tx, ty, sx, sy) for when you want to\n\t-- grow, shrink, or reposition your map on screen.\nend\n```\n\n## Requirements\n\nThis 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.\n\n## License\n\nThis code is licensed under the [**MIT/X11 Open Source License**][MIT]. Check out the LICENSE file for more information.\n\n[Tiled]: http://www.mapeditor.org/\n[LOVE]: https://www.love2d.org/\n[dox]: http://karai17.github.io/Simple-Tiled-Implementation/\n[MIT]: http://www.opensource.org/licenses/mit-license.html\n[paypal]: https://www.paypal.me/LandonManning\n","funding_links":["https://www.paypal.me/LandonManning"],"categories":["Lua","Helpers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarai17%2FSimple-Tiled-Implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarai17%2FSimple-Tiled-Implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarai17%2FSimple-Tiled-Implementation/lists"}