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!

  • Hi,

    As some of you might be aware, I've been busy for quite a while now - Which is mainly because of two things:
    First of all, I'm in the middle of my final school exams - I should be studying right now but meh, and secondly, I've been really caught up with my current extension projects, all of which were requested, so I barely have time to work on anything else. My three biggest projects right now are Box2D (the flash port), OpenAL (sound extension with surround and effects and stuff), and the one I'm going to tell you about right now - Sorry for the long explanation of my situation :D

    This extension is will be available in Flash - it will also support the standard runtime and it works in HWA (although, of course, not optimized) - What it does is basically render maps that are made up of tiles. There are two core entities: Tilesets, which each contain an image and some minor parameters such as tile spacing within the image, and layers, which contain a rectangular map area made up of tiles.
    Layers each can have different scrolling speeds for parallax effects and the extension interacts with the MMF scrolling system quite well. You basically have a couple of layers, as many as you need - you could divide rooms into layers and give them different offsets, for example, or just use one huge layer for the foreground, and some for the background etc.
    The point of this extension is efficiency. You can have a huge map, say, 1000x1000 tiles, with a tilesize of 32x32, and the app will still run at 500 fps at 640x480 in the standard runtime - my goal is to reach the very same performance in Flash, and there is a huge trick that allows me to do so: The map is stored as a huge grid, there is no "list of tiles", as there would be with levels made up of single Backdrop objects. And this is crucial. So basically, you will be able to create huge, detailed maps in Flash without having to worry that adding one more tile here and there will cause a slowdown, because only what is visible on the screen is even processed at all. I'm pretty confident that a game with a magnitude of Knytt would be possible in Flash with this extension. There will of course be support for collision detection, which we haven't exactly decided on yet - I will probably offer the standard "is overlapping" routines, and let you set a collision flag for each layer or so. Who knows! I just wanted to let you know that this extension is coming, and anybody who has planned to make a big game in Flash might want to consider it - but of course, small games are possible as well - For example, you can use the extension for wrapping layers (which are directly supported) or parallax effects, and there will be and already are some handy editing functions to fill the map with complex structures without a lot of hassle.

    Woah, long post. Well, that's all I have to say for now - a screenshot will not reveal much, not even a program would, I suppose - So until the Flash runtime is working somewhat, I do not plan to release a preview of the extension because I can't use the feedback right now, there is so much in my head to change and add that half of the things you'd suggest would already be planned out anyway. I just felt like writing this post for you now, so if you're interested, keep coming back here to see if I made any progress. There's not really a need for you to comment, unless you have specific questions which I will be glad to answer - Thanks!

    Ah what the hell: Here's a stupid screenshot that shows a 30,000 x 30,000 frame completely filled with tiles while I am moving around at 500 fps. Please login to see this link. Just try to imagine that this will be amazing once it's ported to Flash :D

    Please login to see this link.

    Edited once, last by Looki (April 23, 2012 at 8:35 PM).

  • What can be said, Looki, besides YOU ARE AWESOME! You are a treasure to the Click community.

    I hope that some day soon Spriter animations could be used along with your tile map extension to make drastically more powerful games and bigger game levels.

  • Thanks!

    Been working on the Flash port and it's coming along nicely. Done some comparisons:

    I set up a 30,000x30,000 frame again, with a tilesize of 24x24 that corresponds to 1250x1250 ~ 1.5 million tiles.
    In Flash, even with 3 layers of this size, which is kind of ridiculous to have anyway, it runs at solid 60 fps on my machine.

    Well.. and then I tried to replicate this scenario with Backdrop objects, like you kind of have to in the current Flash runtime, unless you use a super complex tile rendering system with various tricks, which no one does, I guess - after all, this is why the extension is in the works! So anyway, I kept duplicating a 'Tile' backdrop object, but MMF became so slow with 40,000 tiles (Mind you, that is 1/40 of what I rendered with Tile Map at no cost...). So I thought: Well, let's see how Flash performs. The result: 30 FPs when scrolling.

    I hope this shows you the power of the extension: While MMF backdrops slow down your game piece by piece, Tile Map won't. Simple as that. I was able to have 40 times more tiles than with Backdrops, which MMF couldn't even handle anymore, but the extension could. I really don't want to waste time by making a nice demonstration SWF that shows the huge frame and that you can move around freely, just believe me :D

    EDIT: Oh right, I used 3 layers with my extension, so of course thrice as many tiles, i.e. 120 times more tiles than the backdrop test. Woo.

    Please login to see this link.

    Edited once, last by Looki (April 25, 2012 at 12:00 AM).

  • This sounds like something I could use with my leveleditor to create really huge levels! I guess I would just read the levelcontent into the map extension instead of making everything actives which adds to backdrops.

    Will the the condition IsBackdrop work with these backdrops produced by the extension, or maybe you could add a similar condition to the plugin?

    Each of my tiles also create two extra non-obstacle backdrop objects, one at top of it and one at the right to make a 3D look for each tile, so it looks like any nintendo platform game. Would the extension be able to handle these objects also? I guess / hope that's what the layer system does, but I didn't totally grasp what you said about layers.

  • Wow this is incredible news!!!! :D My biggest concern when I make something is always that it will run crappy in Flash, if this is as good as it sound it will be amazing!!! Is there any estimate when this will be finished? :) I dont want to stress you though! Just the thought of this coming is making me super happy right now! :D

    And your continued work on the Box2D port for Flash is also great! It will be so nice when Flash in MMF have more support for the extensions and these performance boosts so you can actually develop for standard runtime with these extensions and not have to keep so much back because of uncompatible extensions or performance! :D

    Btw, Popcorn, do you have an example of this IsBackdrop 3D tile effect? It sounds interesting :)

    Steam games: Please login to see this link.

  • This is amazing! I need to ask a few questions before I get too excited:

    1) Does this tile extension allow for separate collision layers? Something like this, where the players interact on a different collision layer than the visible background image:
    Please login to see this picture.

    2) Can the tiles be placed above a moving active object? Either using an MMF layer or otherwise. Like this:
    Please login to see this attachment.
    The tiles Wario walks on are in front of him and the Blocks.

    3) Can I delete and re-add tiles at runtime? For example, in a game where tiles are destroyable, and the player can build Structures with various tiles. This is the main reason I use "Add Backdrop" for my current project - its easy to add/destroy tiles.

    4) Does it support rectangular tiles? My current project uses tiles that aren't the same height and width.

    All of these are necessary for my current project, and very important for most serious game projects. Regardless, this extension is extremely useful as is. I can't wait to play around with it.

    ~ James O.

    Edited once, last by JimJam: Added #4 (May 1, 2012 at 7:00 PM).

  • I've moved this thread to the Ext Dev forum because the extension isn't Flash only. It just happens to support Flash. Btw, upcoming Beta soon. Because of personal reasons, this one will have no Flash though. I can't work on Flash at this workplace I'm afraid.


    1) Yes - In fact, after discussing with some clickers, I've decided on a format: Basically, it's already there! You can just have an invisible layer, storing your collsiion tiles, and check for collision with it. That's it. Super flexible.

    2) I've actually sent Yves a PM about this. I could implement this in Flash *easily*, but not in the EXE version. It'd require some hacking, I hope he can help. Nevertheless, I will offer this feature for Flash, even if I can't implement it like that in the EXE version. It's just a single property, anyway (render above player, yes or no). It is possible to put the Tile Map above an Active right now, but you can't do both behind and above at the same time with one instance. I might offer the ability to link a second Tile Map object to another one so it can render some layers above an Active.

    3) Yes, that's one of the major advantages that I forgot to mention in my post :D You can do that of course.

    4) Yes.

    I think you might like this extension :)

    Please login to see this link.

    Edited 2 times, last by Looki (May 3, 2012 at 10:48 PM).

  • I'm changing things around right now - Me and Hempuli have been discussing quite a lot. Basically I've introduced the concept of per-layer tilesets. This basically means each layer has one basic tileset that you can use. We agreed that specifying a tileset ID for every single tile is an advanced feature and should not be needed by most of you. If you look at tile-based games, they're usually divided into rooms (map files) that each only use a single tileset, really. If you have anything to say against that, please do! :) You will be able to do this somehow, anyway. I might introduce a concept of "optional data" that each layer might have - such as an equivalent to 'Alterable values', per each tile, or, of course, a 'tileset ID' per tile. This means that you will be able to create a giant map with lots of different tilesets if you want to. It's just that it's not really something a well designed game usually needs, so we've decided that it shouldn't be a crucial feature of the extension!

    Please login to see this link.

  • How are you storing the data? I'm working on something similar in MMF2 (a level editor not an extension), and I have found that without resorting to tricks the file sizes can grow really big really fast. You mentioned having a level 30,000 pxls wide and tall (roughly 1000^2 tiles if I am guessing right). When I do that on a single layer I am getting file sizes of about a hundred Mb. I haven't tried with multiple layers yet, but it should be a linear progression.

    So how big are your file sizes?

  • Jakinbandw, I use zlib compression. An uncompressed, empty 2000x2000 map is 7.6 MB - One with 6/10 compression level is only 7.6 KB. Of course, compression will get worse once you actually fill the map. However, since maps often have larger areas where there's only one tile all over (like a ground), and repeating patterns such as walls, there still will be pretty good compression. I don't know what you're doing to get over 100 MB, that's crazy! Each tile has exactly 2 bytes, so it's kinda like width*height*2. The rest, such as the rest, file header etc., are negligible. Do the math: 2000*2000*2 = 8,000,000 ~= 8MB

    Please login to see this link.

    Edited 2 times, last by Looki (May 6, 2012 at 4:04 PM).

  • I'm pretty sure his math is wrong, but for a different reason, as 30,000*30,000*2 = 1,800,000,000 bytes = 1,716.61377 megabytes. If he's only getting a hundred megs, he must have really good compression.

    Working as fast as I can on Fusion 3

  • it's actually only 1000^2 points of data (that I am working with). Right now my personal one that I am working on has dropped it's size to 24,200kb when it is filled with a single type of tile. Zipping that shrinks it to 2,255kb. I suspect that I am getting file sizes much bigger than yours because I am using the named variable object. It allows me to do a cool trick where if a point of data is 0 it doesn't store it, thus 100000^2 tiles with only 4 of them not empty has the same file size as a file that only has 4 tiles with all 4 of them not empty. Also allows my lvl editor to be extra dynamic because I am not limited by array dimensions.

    Anyway, glad to hear it has such a small file size. I can't wait to use it for my next project.

    LB: I only have store 1000^2 points of data with my system, I am storing the ID of images that are 32^2 pixels. If I tried to store every pixel... well then there would be problems.

  • Ooh, okay. Named variables aren't really suited for these kinds of things, yes.

    Here's the first beta! It comes with a couple of examples that should help you get started. All of them focus on specific things, but also teach you how to use the basic actions I think. As I said, no Flash this time.
    Well, not much to say. Have fun with it. Find them dirty bugs. One thing you should know that as of now, the Tile Map is always fixed on the screen. In combination with the "Follow MMF camera" property, you can still use it for scrolling games, though! Still a lot to do and add, but it's already quite functional as of now. I'd go as far as saying you could create games with it -- but you shouldn't yet. Please be aware I might change some actions or so which would effectively break them in your MFAs and you need to replace them with the new ones.
    Thanks to Hempuli for his wonderful Tileset in the Editor example ;) Hope it all works well.

    Please login to see this link.

    Oh right, maybe some info on the limitations: You can't have more than 254x254 tiles in a tileset. You can't store more than 16 tilesets at edittime (should be enough), and the runtime limit is 100 (that seriously should be enough!).
    Some general usage infos: Once you add a new layer or tileset per action, it is automatically selected and you can modify it with the corresponding actions. The "Tiles" sub-menu always refers to the tiles of the >current layer<.

    Please login to see this link.

    Edited 2 times, last by Looki (May 7, 2012 at 12:01 AM).

Participate now!

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