Paste image into background performance issue

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.
  • just a question, i have an android app that create many active object and paste it into background. When number of pasted object reach 100 - 120 performance of app decrease.

    is there a way to solve?

    thanks for help

    Banzai Mosquito! Please login to see this link.

  • The way I get around this is to not paste the objects... when you paste them you don't actually get any performance savings on the Android runtime, so better to load your level dynamically rather than all at once.

    Check out my Game on Itch.io
    Please login to see this link.

  • I actually explained the behaviour of background images on a Facebook post, copy+pasted here:

    If we are talking about HWA and iOS, then Fusion does a full bake of the collision mask, but draws each background object every frame (unless they are out of view).
    It does not bake their appearance, only their colmask. It has to rebake the complete collision map if you paste new items or move any background objects, which is quite expensive.
    It also has to Z-reorder both background and dynamic sprites when you scroll.

    About tiled quick backdrops, Fusion will not use a shader for tiling, so you are going to get a quad for each tile.
    This is quite expensive if you use very small tiles. It will cull any tiles not in sight, though.

    The Flash, Java (?) and Android (?) exporters don't bake a full collision map, but does a test against each object rectangle, and if it intersects, a collision test (rect + col).
    They also draw each object every frame.

    If we are talking about Chowdren, it can use 3 different strategies:

    1)
    Draw all background objects every frame, handle collisions using rect + col.
    This is the default, and used for 90% of the games I'm porting. It's quite simple and memory-efficient.
    Unless you're pasting a *lot* of stuff, you're not going to be GPU or CPU bound anyway with a good broadphase.

    2)
    Bake background viewport with an added border.
    When moving outside a certain threshold, rebake the viewport.
    Handle collisions by rect + col.
    This is good if your background is not very dynamic, like in Not a Hero.
    .
    3)
    Draw all background objects individually, but bake whole collision map, like Fusion.
    This is being used for... well, a game I can't mention

    ------

    Basically, Fusion won't actually "paste" the image into any buffer or anything, it will just create a sprite which will have to be rendered every frame.
    Also, doing collision tests on Android against pasted images is quite expensive if you have a lot of items.

    If possible, try and prerender the image that you need in external software, and load them in as .png.
    You'd want to reduce the number of draw calls as much as possible, basically.

  • This is the kind of info I wish had full disclosure from Clickteam about Fusion. As someone who is considering all mobile platforms, it is pretty hard to spend time "experimenting" to get performance out of all platforms when I don't really know why there is a performance problem in the first place. Thanks for the info.

    Please login to see this link.

  • Bake (in art terms) means to collapse all parts into one image. So in Photoshop, that would be to collapse all layers into a single layer and export them as one asset. This means you aren't loading individual art assets into your game at one time (the individual assets that make up your screen) but loading a single image with all the assets in it (baked together).

    Please login to see this link.

  • It's good information to have, it seems to confirm my own experience.. what I've found works well is to use stitched together large tiles wherever possible.. so my first Android level loader used 16×16 tiles and it CRAWLED.. I got a huge performance boost by using a larger variety of custom made 64x64 tiles made up of the 16x16 tiles, the increased cost of memory for additional and larger textures (but only needing ~100 objects for the level) was wayyy less expensive than having >1000 16x16 tiles..

    It's a little messy but this method seems to work well enough on all runtimes.

    Check out my Game on Itch.io
    Please login to see this link.

  • Hence my point in the other thread the other day regarding one active for a frame size over multiple tiled backdrops, Marv.

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

Participate now!

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