Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I've made a simple extension that can easily load maps created with the open source software : "Tiled Map Editor" (Please login to see this link.)
    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

    Please login to see this attachment.
    Tiled Map Loader b2

    Please login to see this attachment.

    Please login to see this picture.

    Edited 5 times, last by RootKernel: Fixed example and fixed url in extension (January 1, 2013 at 3:41 PM).

  • 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 :D

    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)

  • 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+IlmmhSD0ICFxG4h4DewtfYTRakTauLnZH3JS/fPw2BebtD0kxEXpCMVuEZMqfVeIms6G8eIdct+B55oNU4Ex17k+b/h0YvRce+pr/8jnzQatxzIn1H0/Qh/wfGNRODNuc8RC6NOcVvHyAXNZ0/f4acGzj3E+TGmPP5XiFJ4bIkRRc+FvbQM/JkzH6+d8htRcIurNyPN2RtyFPZnfMrsihx6uzdjw4+p+vs2N8LP+MNsj3gtJjPfidtz1srfn80dTjbnEe3myo0nH/t/LaPJmjeU1po0sdPe/Cwj/pU9RB2wT7+hmPeCw/70MUp9xHrTMeEfbT9LU6b8B1r2EfMd6+EEEIIIRr4BCfMoEE=
    </data>
    </layer>

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

    Edited once, last by RootKernel (January 2, 2013 at 4:46 PM).

  • 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 :)

    Please login to see this link.

  • 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.

  • 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;

    Quote

    (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.

    Edited 4 times, last by oasuke (January 9, 2013 at 10:43 PM).

  • 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 :)

  • 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.
    Please login to see this picture.

    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.

  • Wow ! Thanks you for pointing that out ! I fixed it.

    I'll release out the new version when I have fixed a bug that causes the application to crash if the object name is empty
    Edit : it crashes whenever I try to compare with an empty string

    Edit :

    *Fixed comparisons with empty strings that can cause crashes.
    *Added tile objects offset and Get Object Gid (for tile objects)

    PS : this build is not compatible with olders mfas (or you'll have to replace all ObjectTileGid by ObjectProperty$ since I added one expression)

    Please login to see this attachment.
    Tiled Map Loader b3

    Please login to see this picture.

    Edited 3 times, last by RootKernel (January 13, 2013 at 3:21 PM).

  • Excellent job. The Get Object Gid expression was a great addition. Now I don't have to worry about naming each object I add into the editor since I can just reference it based on the gid value it has.(Of course, I'm using an ini to associate the object with whichever gid it has)

    I also found a neat little method of making animated tiles which can be setup in just 4 events. I decided to fully utilize the '"Insert Rectangle" for quicker animated tile creation. Basically, whatever size the area of the rectangle is, it'll create animated tiles in that section. All you have to do is create a rectangle object, name it "Atile"(short for AnimatedTile), and then drag it to whatever size area you want the tiles to be created in. In my example, it's the entire frame.
    Please login to see this picture.

    Next, give the atile these properties.
    Please login to see this picture.
    anispd = animation speed.
    layer = what layer it'll be created on.
    maxframe = how many frames it has
    name = the filename of the image, which will be located in the tiles folder. Make sure you put the extension too.
    tilex= the width of the tile
    tiley= the height of the tile

    That's all you have to do as far as the level editor goes. The rest is handled in MMF2, and explained in my example. It'd be ideal to NOT use 16x16 for large sections of animations since that's a lot of objects.( Or perhaps dynamically create the animated tiles as level progresses, probably more efficent) For large areas of backgrounds, I suggest using 32x32 or larger, and saving the 16x16 for small animated decorations.

    Result:
    Please login to see this picture.

    (Requires Text Blitter extension. Although it used the Function Object, you can just replace that with regular fast loops. You also don't need the create by name, but I'm just too used to using that)

  • It seems I can no longer edit my post, so I just want to add one more tip.

    If you want to reference objects based on their gid, you need to take care to add the object tilesheets in the same order for all .tmx files, else the gids will be inconsistent. For example, object sheet 1 has gid 0-44 since it was added first. Object sheet 2 would then be 45+ and so on. This isn't a problem, but more of just the way Tiled works.

    Edited once, last by oasuke (January 14, 2013 at 2:38 PM).

  • Excellent job. The Get Object Gid expression was a great addition. Now I don't have to worry about naming each object I add into the editor since I can just reference it based on the gid value it has.(Of course, I'm using an ini to associate the object with whichever gid it has)...

    Sorry, i can't see what I need to do in the extension, I understand that must be controlled within MMF and not in the extension, since it's a proper implementation of a behavior you need.

    It seems I can no longer edit my post, so I just want to add one more tip.

    If you want to reference objects based on their gid, you need to take care to add the object tilesheets in the same order for all .tmx files, else the gids will be inconsistent. For example, object sheet 1 has gid 0-44 since it was added first. Object sheet 2 would then be 45+ and so on. This isn't a problem, but more of just the way Tiled works.


    The GIDS are taken within the tmx file (so they are handled by Tiled and correct), i don't see what you meant sorry :P

  • Sorry, i can't see what I need to do in the extension, I understand that must be controlled within MMF and not in the extension, since it's a proper implementation of a behavior you need.

    The extension is fine as it is. I was just stating the GetObjectGid expression saves me from having to do lot of tedious naming work.


    The GIDS are taken within the tmx file (so they are handled by Tiled and correct), i don't see what you meant sorry :P

    Yeah it has nothing to do with the extension. I'm saying when you add a new tileset in Tiled, the gid of the object is automatically set according to the size of the tileset. This means which order you add the tilesets into Tiled is important, since the gid index will change depending on the order you add them in. I'll go ahead and explain my simple reference event. Let's say I have an object tileset that has 40 tiles. In Tiled, the gid will be 1-40, with 1 being the first tile and 40 being the last tile.

    Then I setup an ini like this

    In MMF2, I have two events such as this;

    If Object is loaded
    --> Set current group of ini to GetObjectGid("Map")
    (Sets the current ini group to the gid, which are the objects.

    If Object is loaded
    +Current group name GetObjectGid("Map") Exists
    --> Create object
    --> Set Alt.String to current group name
    (I'm typing this from a college library so I don't access to MMF2 to give the exact event structure)

    However, when I add a new object tileset (lets called it enemy) into Tiled, the gid for the enemy tileset will continue from the last. So, if the enemy tileset has 10 tiles, the gid will be 41-51 for those tiles. The ini would be;

    Code
    [41]
    name="enemy1"
    
    
    [42]
    name="enemy2"
    ...
    [51]
    name="enemy10"

    And that's basically it. This isn't a bug/problem, but rather just how Tiled works. It would be cool if I could manually change the gid with Tiled, but I can easily live without that.

  • This is awesome. I wish this existed when I started developing Dungeon Dashers. All my levels are loaded from ini files.

    Currently working on Please login to see this link..
    Creator of Faerie Solitaire, Stray Whisker, and Dungeon Dash. Known on TDC as AssaultAndy.
    Please login to see this link. | Please login to see this link.

  • Zlib compression would be great!

    Also just a small thing I noticed(unrelated to the extension), You have to set the Alpha blend to 255 of the Active Picture while it creates the collision layer in order for the collison bg to actually be invisible. (Before it was set to "Make Invisible", which doesn't work)

  • RootKernel, there's an implementation of zlib in both Please login to see this link. and Please login to see this link., both open-source extensions :D

    Darkwire Software Lead Programmer (C++ & C#)
    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!