TmxParser

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
yamahara
Prole
Posts: 5
Joined: Sun May 15, 2016 3:35 am
Contact:

TmxParser

Post by yamahara »

Hi.
parsing Tiled Map Editor file (TMX)
http://www.mapeditor.org/
(Tiled v0.17.0)

I referred to this site.
https://github.com/Kadoba/Advanced-Tiled-Loader

It's minimum sample code.

Code: Select all

 local TmxParser = require("lib.tmxparser")    -- require
 local tmxparser = TmxParser:create()          -- create
 local	 map = tmxparser:parse("XXX.tmx")     -- parsing and get tmx map(table)
 local	 node = tmxparser:getNode()           -- get xml node(table)
 map = tmxparser:getMap()                      -- get tmx map (table)
 tmxparser:printNode()                         -- print console xml table
 tmxparser:printMap()                          -- print console tmx table
And, Attachment is STI (v0.16.0.3) sample.
viewtopic.php?f=5&t=76983
(But, You need to remake sti/init.lua)

Thank you.
Attachments
tmxparser.love
(504.55 KiB) Downloaded 123 times
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: TmxParser

Post by pgimeno »

The best of two worlds, awesome!

What's the license of your code? Also, XmlParser doesn't come with a license. Is it easy to replace with one with a license?
yamahara
Prole
Posts: 5
Joined: Sun May 15, 2016 3:35 am
Contact:

Re: TmxParser

Post by yamahara »

Hi, pgimeno!
Thank you, debug my source.

TmxParser is MIT license.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: TmxParser

Post by bobbyjones »

Hello. Not to discredit your work, but a tmxparser isn't needed. Tiled can export lua files
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: TmxParser

Post by Karai17 »

I am so confused.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Sir_Silver
Party member
Posts: 286
Joined: Mon Aug 22, 2016 2:25 pm
Contact:

Re: TmxParser

Post by Sir_Silver »

I'm right there with you Karai.
Post Reply

Who is online

Users browsing this forum: No registered users and 150 guests