Need help understanding how to implement big levels

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.
  • If anyone has any expertise in this area I'd massively appreciate it...

    What's the best way to design large levels in clickteam?

    Basically, our game has levels have dimensions of 6666x4444; that might sound huge but our character zips around places quite quickly.

    Anyway, we've tried quite a few different methods with limited success. First we tried using quick backdrops as colliding obstacles , then places PNG's (it's not a sprite based game) to decorate the level. This works in a sense but takes far too long, and eventually, I feel like using quick backdrops eventually stifles creativity a bit when it comes to designing unique levels.

    So then we tried a crazy method. And designed whole levels inside a different program (so, the dimensions would be 6666x4444), and for the most part, this worked amazingly. The levels all looked unique and diverse and didn't impact performance. But after about 10 carefully designed levels, we got "out of memory"; understandably... as the PNG files were crazy huge (we did compress them to about 25kb each but I think clickteam uncompresses them anyway or something?)

    So now I've been trying to split the images up into smaller sections, and see if I can just import them in as much smaller segments to reduce the stress on the game. But that alone sounds so finicky; if it worked, great; but I'm not even sure if it's a viable method.

    So we're not really sure if that's going to work; has anyone got much idea what would be an efficient way to approach this problem? Any help would be massively appreciated x

  • Hi Zebedy,

    not quite sure I understand what is happening here and why you hit the RAM limit of 2GB on runtime (that is what you're referring to, right?).

    I think an image of the mentioned size with alpha channel (RGBA) will consume 6666 x 4444 x 4 bytes = 118MB of RAM. The file type of the image does not matter, we talk about texture memory that has to be allocated on runtime to display the image. How many of those images do you have in one level to hit the 2GB runtime limit? Sounds pretty crazy XD

    Btw, images this size will most likely stutter on quite a lot of setups when scrolling. Many GPUs cannot handle textures over 2K very well (mine cannot), but that does not seem to be your problem. I would tile them anyway in case you only tested on strong machines.

    So for helping you I think we need some more information:
    x Are these images constructed using a tileset or did you paint a whole huge image in this external editor? Tiling your level layouts would only save RAM if certain tiles can be repeated, otherwise the tiles will consume the same amount of RAM as the large image when summed up. That's why most games use tilesets to texture their collision masks and recycle few assets over and over again.
    x Do you load your level's assets from external data (single frame setup level editor) or do you have a multi-frame setup and everything is pre-baked?
    x Did you use image optimization techniques like skipping alpha channels if not needen and power of 2 optimization?

    In case you missed it, here is the most important thread on (image) optimization techniques: Please login to see this link.

    Please login to see this link.
    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited 5 times, last by Julian82 (February 1, 2018 at 8:38 PM).

  • I wouldn’t worry about the level size too much; I have levels of around 40,000x8,000 in my game. The best method would be dividing everything into tiles and following the guide Julian posted. On top of this, any tiles you can reuse should be reused. It will reduce the strain on RAM and file size. My tiles range from 32x32-512x512 and variations in between. The key is just making as much reusable as possible. For example, my first level has 4 different dirt tiles that can all connect to each other, but have different patterns so I can mix and match in any way I want. I then have additional “mask tiles” that fade around the edges with an alpha channel that I can paste on top of those tiles to give each tile a more varied look instead of just a repeating pattern.

    My last tip would be to use alpha channels sparingly. If I have a solid tile that has no transparency, I don’t use the alpha channel at all. That’s made quite a difference in performance.

    Please login to see this link.

  • Hey guys thanks so much for getting in touch haha. I'll try to explain what's going on:-

    -So per one level, there's only one PNG image of 6666x4444 as we need the alpha transparency haha. I'm not quite sure what happened, but I actually tried to create a new level after a few of these image-based levels, and I got the error message "out of memory", I think in the debugger, a full level reads about 450mb~ (I'd say roughly 300mb goes to events, the characters, animations, etc.) So maybe my computer was having a bad day X)...

    -About the textures being handled on lower GPUS, well I was concerned about this too initially, but it actually runs at full speed on my phone too! Although...I've only tested on Samsung edge 6 and above... so maybe that's why...probably won't be the case on lower end android phones/PCs..?

    -So we're fully designing the level image externally at the moment, (it's kinda easier cuz all our backgrounds are basically silhouettes; and the tools let us create nice varied shapes. Going for a noir style). I'd be totally game for using a tileset approach but because everything is basically black apart from the background, it's hard to keep it looking diverse if we stick to a tileset I feel.
    And we have a multi-frame setup where everything is technically pre-baked.

    -We have tried to skip alpha channels where necessary I think, although I've gotta admit it's not too often lol. Because the difference in pixelated backgrounds and those with alpha transparencies are too obvious in our game sometimes, we have to use alpha transparency. Power of 2 optimisation is definitely kind of overlooked, we may need to go back and look over that!

    -I like the idea of mask tiles that fade around edges to give variety; we might need to play around with this idea a bit. We have tried to create *some* sort of tile set which we can reuse a little in levels but again; it gets repetitive too quickly as we have just the colour black to play with for backgrounds. We're a bit stuck when it comes to using alpha channels sparingly though!

    I'll have to go through everything you guys have suggested and report back, thanks so much for the input !

  • Designing large levels in Clickteam's frame editor is kinda suicide. I'd suggest using something like Tiled and the Tiled Map Loader extension (just don't expect any support, the developer, [MENTION=14023]RootKernel[/MENTION] abandoned it and has no interest in maintaining it leaving actual bugs such as inability to load multi-line parameters) along with Tile Map and Tile Map Viewport from Looki. Then you can make the levels from discrete tiles (a good tileset can even give that "hand drawn" feeling you may be after since I can feel inspirations in the graphics department you got from Limbo or NightSky). It won't use nearly as much memory as the "prerendered" level and the editing experience will be much better.

    There are no impossible things, there is only lack of skill needed to complete the task.

  • Hm that's sad to hear... but I'll definitely have to see if I can utilise these extensions, I wasn't aware of some of those.

    Yeah you got it haha, very limboesque/nightsky. I get this itch if the level ends up having too many straight lines , as if the level doesnt feel organic enough.

    I'll get started on a promising tile set, thanks for the help [MENTION=8574]Darkhog[/MENTION]; much appreciated :D

Participate now!

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