Creating and loading custom textures through an array file.

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.
  • Okay, so this is either really complicated or just plain impossible.

    I want to make a map editor that exclusively uses array files to load and store the map file. In theory, you'd use one Z-axis to store the details and other information about the map; such as the height and width of the map, size of the tiles in pixels, position in a sequence of rooms, etc. Another layer for the tile-set, like a bitmap image but with each pixel represented by numbers in the array (ideally hex numbers). The third layer would assign the textures in the second layer to tiles, and would simply have each tile represented by one slot in the array, using a number. I'm not too worried about file size, as I am happy to compromise disk space for readability.

    However, I discovered a hiccup in my logic - how would I load the textures into the tiles? Using individual objects or pasted backdrops would make loading times unbearably slow, and I simply cannot find a way to take the numbers out of an array and load them to a frame of animation for an active, or something similar.

    I believe that if I made a program like this and distributed it, It would make the handling of maps and levels in Clickteam so much easier to handle as the entire level is stored in a single array file.

    If anyone has a way of doing something similar to what I'm trying to achieve (or something better), please let me know. :)

    TL;DR Does anyone know how to take data from an array file and save it as a bitmap file to be loaded onto an active object?

  • The "Tile Map" object already does all this, and does it at a level that is probably as computationally efficient as possible -- you can load massive tile maps with no drop in framerate. And it is an extension specifically designed for tile maps. Best to just use that. Just search for "tile" in the extension manager directly in Fusion. You'll want to download "Tile Map" and "Tile Map Viewport". Optionally, you can download "Tiled Map Loader" object, which lets you import tile maps made in this 3rd-party program: Please login to see this link.

    It's a great tool, especially because the level formats it puts out are XML, and engine agnostic (will work in any game engine or programming language you use). This way you don't have to program your own level editor too. (unless you want to, that is)

    Using Fusion's arrays and Active Objects to load/store/render level data is technically possible, but it would be slower in every single case. I wouldn't recommend doing that, unless there is a very specific reason your level needs to be made up entirely of Active Objects (like Baba Is You, for example, where everything is moveable).

    Actives are for moving objects. Arrays are for storing invisible data. Tile Map object is for tile maps.

    TL ; DR - Don't try to re-invent a screwdriver from scratch just to pound a few nails, when there's a perfectly good hammer already there by your side. Use the right tools and save yourself some effort.

    ~ James O.

  • Just remembered I didn't reply to this - Thank you for your words of wisdom and strangely inspirational quote! People like you help me get better at doing the things I love and I really appreciate it!

    P.S. I still think that Arrays are useful for non-invisible data, nobody's changing my mind about that. ;D

  • [MENTION=35902]Acrobics[/MENTION] - No problem. And by "invisible" I just meant that array objects don't have any kind of graphics built-in, like Counter or Active objects do. If you want to display the Array data, you have to code something to do it.

    Arrays are super useful, no doubt.

    ~ James O.

Participate now!

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