User Tag List

Page 2 of 16 FirstFirst 1 2 3 4 12 ... LastLast
Results 11 to 20 of 157

Thread: Tiled Map Loader

  1. #11
    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)
    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)

    TiledMapLoaderb3.zip
    Tiled Map Loader b3


  2. #12
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.


    Next, give the atile these properties.

    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:


    (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)
    Attached files Attached files

  3. #13
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #14
    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
    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.

    Quote Originally Posted by oasuke View Post
    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

  5. #15
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RootKernel View Post
    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.




    Quote Originally Posted by RootKernel View Post
    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

    Code:
    /Object gid table
    
    [1]
    name="Tile1"
    
    [2]
    name="Tile2"
    ...
    [40]
    name="Tile40"
    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.

  6. #16
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is awesome. I wish this existed when I started developing Dungeon Dashers. All my levels are loaded from ini files.

  7. #17
    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 netninja View Post
    This is awesome. I wish this existed when I started developing Dungeon Dashers. All my levels are loaded from ini files.
    Thanks I'm working on the ZLIB compression for the extension (thanks to Looki's help)

  8. #18
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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)

  9. #19
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,828
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    RootKernel, there's an implementation of zlib in both Bluewing and ZlibStream, both open-source extensions

  10. #20
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Those are not implementations, you're just using a library that has the implementation for you.

Page 2 of 16 FirstFirst 1 2 3 4 12 ... 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
  •