User Tag List

Page 1 of 16 1 2 3 11 ... LastLast
Results 1 to 10 of 156

Thread: Tiled Map Loader

  1. #1
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    RootKernel's Avatar
    Join Date
    Dec 2012
    Posts
    121
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Tiled Map Loader

    I've made a simple extension that can easily load maps created with the open source software : "Tiled Map Editor" (http://www.mapeditor.org/)
    Based on EDIF SDK.

    Runtime : PC (only)

    /!\ For the moment, this extension allows only maps uncompressed ! (no base64, or CSV) : Disable compressions of map in Tiled (Edit > Preferences > Save layers data as XML)

    Features :
    • Load maps properties
    • Load tilesets (width, height, images, id ...)
    • Load layers & tiles
    • Load objects & objects properties


    TiledMapLoaderb2.zip
    Tiled Map Loader b2

    Click image for larger version. 

Name:	LoadMap.jpg 
Views:	996 
Size:	19.3 KB 
ID:	8790


  2. #2
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Nice, I guess I shouldn't have deleted Tiled support from my Tile Map extension. I just really don't like the editor and format at all

  3. #3
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    RootKernel's Avatar
    Join Date
    Dec 2012
    Posts
    121
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Looki View Post
    Nice, I guess I shouldn't have deleted Tiled support from my Tile Map extension. I just really don't like the editor and format at all
    Well yes, at first I was using EasyXML to load the tiled maps, and it wasn't fast and it requires some additional DLLs, so I wrote this one.

    For tiled, i really like the editor : it's fast and well designed but the only problem I could blame is the object editor. (using colors instead of images is not really clever)

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    If you plan to support zlib compressed files, this is a great and easy to use implementation of it: http://code.google.com/p/miniz/ I also use it in my tile map extension.

  5. #5
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    RootKernel's Avatar
    Join Date
    Dec 2012
    Posts
    121
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    I don't know if you remember the tiled map format, but unfortunatly the compressed data is not the whole file, but the data in layer nodes (it gzipped and encoded in base64)

    Ex:

    <layer name="Background" width="100" height="30">
    <data encoding="base64" compression="zlib">
    eJztmH9OwkAQhWcTULgIXkQscg7xR+IlmmhSD0ICFxG4h4Dewt fYTRakTauLnZH3JS/fPw2BebtD0kxEXpCMVuEZMqfVeIms6G8eIdct+B55oNU4Ex17k +b/h0YvRce+pr/8jnzQatxzIn1H0/Qh/wfGNRODNuc8RC6NOcVvHyAXNZ0/f4acGzj3E+TGmPP5XiFJ4bIkRRc+FvbQM/JkzH6+d8htRcIurNyPN2RtyFPZnfMrsihx6uzdjw4+p+vs2N8L P+MNsj3gtJjPfidtz1srfn80dTjbnEe3myo0nH/t/LaPJmjeU1po0sdPe/Cwj/pU9RB2wT7+hmPeCw/70MUp9xHrTMeEfbT9LU6b8B1r2EfMd6+EEEIIIRr4BCfMoEE=
    </data>
    </layer>

    So I think that decodes base64 string and uncompresses is not efficient.

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Ah, I remember it has both gzip and zlib. I only implemented zlib! I do remember base64, but there are a million small libraries to decode that. I just wanted to recommend miniz to you, it's easily the best zlib implementation I've ever seen

  7. #7
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    RootKernel's Avatar
    Join Date
    Dec 2012
    Posts
    121
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Looki View Post
    Ah, I remember it has both gzip and zlib. I only implemented zlib! I do remember base64, but there are a million small libraries to decode that. I just wanted to recommend miniz to you, it's easily the best zlib implementation I've ever seen
    Thank you! I'll see what I can do.

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is fantastic RootKernal! I don't think I even need my level editor anymore with this combo. I just have one question about this comment;

    (using colors instead of images is not really clever)
    The editor has an option to insert a tile as an object, which would allow you to have images. However..I'm getting some weird positioning problems when doing so.

    Edit: Nevermind. This can be fixed by offsetting the position by whichever size the inserted tile is.

  9. #9
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    RootKernel's Avatar
    Join Date
    Dec 2012
    Posts
    121
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by oasuke View Post
    This is fantastic RootKernal! I don't think I even need my level editor anymore with this combo. I just have one question about this comment;



    The editor has an option to insert a tile as an object, which would allow you to have images. However..I'm getting some weird positioning problems when doing so.

    Edit: Nevermind. This can be fixed by offsetting the position by whichever size the inserted tile is.
    Could you please tell me how to do this please ?
    I'll patch it into next version

  10. #10
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, It's nothing big. When you position the created object, instead of putting "ObjectPosYOnMap( "Tiled Map Loader" )", change it to ""ObjectPosYOnMap( "Tiled Map Loader" )-16". The tile size is 16x16, so the offset is -16. Without that, the object will be positioned 16 pixels below when using the Insert Tile as Object command from Tiled.

    Here is a screenshot of the object tileset I have. Then, I can just use those tiles as images for my objects.


    I also included a modified version of your example which shows you the issue. Other than that, so far I've had no problems with Tiled or this extension, and that's considering I've completely switched from my old editor.
    Attached files Attached files

Page 1 of 16 1 2 3 11 ... LastLast

Similar Threads

  1. Looking for help with Tiled
    By peejaygee in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 24th December 2013, 07:22 PM
  2. Tiled Map Loader
    By dragonguy in forum Extension Development
    Replies: 3
    Last Post: 16th August 2011, 06:34 PM
  3. Tiled level format (.TMX) loader.
    By Shadoku in forum File Archive
    Replies: 3
    Last Post: 6th November 2009, 10:57 PM
  4. Differences of a 'fake' loader, and 'real' loader?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th May 2009, 03:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •