How to paste in more objects in the background beyond the object count?

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.
  • I have been stumped by a really annoying problem in my project. I am making a game where a ton of stuff is going on and to make things looks really nice and to save on performance I paste unnecessary actives into the background and destroy their actives. This way I can paste things like shell casings, footprints, blood etc into the background and have them still be there without vanishing and at the same time keep the object count really low so performance is good.

    However I just noticed that for some reason objects pasted into the background are still counted toward the max object count (??). The max object count you seem to be able to have is 30.000 in a frame, but I thought this was just for active objects and that objects pasted into the background are not counted in the object count? The thing is that when I have pasted in 30k objects into the background (and destroyed their actives) and my object count is still very low things just stop to create and paste in.

    I have created an example to demonstrate. I have set the max object count to 10.000 in this example and I have an event that always create 100 dots that move and are then pasted into the background and destroyed. However once it has done this 10.000 times it just stops and it cant create any more even though the actual frame object count is only 102 objects (the top counter).

    Please login to see this attachment.


    Is there any way to get around this? ;( Is it possible to "uncap" the max object count somehow that is currently set to 30.000?

  • Pasted background objects count towards the limits as well. There's a couple things you can do though to go around this

    - Use the 'surface' object to blit the background

    OR you could take an approach such as;

    - Keep background objects such as shell casings/decals as active objects, until they're outside of the player's view

    - Once they're outside of the player's view, delete a bunch of them (say 90% of them)

    - For the remaining 10%, change the animation so that instead of one shell casing, there's 10 or so of them, in a larger area

    - Then paste it into the background

    The second version won't be 'accurate' but if you're dealing with thousands of them at a time, the player probably won't notice

  • It is weird though because I tried pasting into different layers and then the cap seems higher? I increased the cap to the max of 30k objects in this example and in the first one I use the same method as the first time by just always running the loop to create the objects and then paste them and destroy their active and it runs the loop 30k times until no more objects are created or pasted. But if I instead use several layers I can get it running all the way to 60k? But there seems to be a cap there instead. It is very confusing.

    You can run the test by either pressing 1 or 2 at the start of the frame. You need to restart the expample to run the other test

  • What does it mean to blit the background with the surface object?

    The whole point is to have things getting really messy over time so removing stuff really defeats that point =/

    Steam games: Please login to see this link.

  • The whole point is to have things getting really messy over time so removing stuff really defeats that point =/

    marbenx means that while the casings are off-screen, replace 10x individual casing graphics with a single pre-baked graphic that contains 10 casings in it. The pre-baked graphics won't be positioned as precisely (or as randomly) as the originals, but you'll still have 10 casings visible, while reducing your total objects by 9.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • marbenx means that while the casings are off-screen, replace 10x individual casing graphics with a single pre-baked graphic that contains 10 casings in it. The pre-baked graphics won't be positioned as precisely (or as randomly) as the originals, but you'll still have 10 casings visible, while reducing your total objects by 9.

    The problem though is that it will still be another object pasted into the background so it will still increase toward the object cap, just slower.

    I am unsure how pasting into backdrop works but is it not supposed to just "merge" the image into the background so there is no actual individual object? It feels like it can cause a lot of issues if those pasted objects are actually counted as real objects and toward the object count since they dont show up when setting a string to the total objects in the frame? So then you don't actually know how many "objects" you actually have or how close to the cap you are. As in my example the recorded objects in the frame is never exeeding 102 objects but I still reach the object cap and cant create new objects.

    Also curious where the hard cap of 30.000 objects come from? Is it just arbitrary or based on something? It would be wonderful if it was somehow possible to increase by editing something.

    I notice that even with 30-60k pasted background objects my game does not slow down anything (again weird also as in my latest example I uploaded that I can actually double the object cap for them by using more layers it seems vs 1 layer), but just a fraction of those objects as active objects slow down the game a lot so being able to actually not have a cap or a much higher cap on pasted background objects would be wonderful. Again I don't understand how those are even counted toward the total objects since Fusion dont report them as objects when having an event to check how many objects are in the frame.

    Steam games: Please login to see this link.

  • Can you do an experiment?


    Switch from directX to standard

    HUH, this actually seem to remove the cap? :O How so? The downside is that the game also looks really bad under the standard mode and many of the effects like the semi transparent layers etc are gone so I can't really use the standard mode.

    But why is there a cap on the directx and not on the standard?

    Steam games: Please login to see this link.

  • HUH, this actually seem to remove the cap? :O How so? The downside is that the game also looks really bad under the standard mode and many of the effects like the semi transparent layers etc are gone so I can't really use the standard mode.

    But why is there a cap on the directx and not on the standard?

    Well, I have no idea!

    I was procedurally generating large tile-based maps and ran into the same problem, and this fixed worked for me since I don't use any of the featuers requiring directX.

    Great question though. Yves

  • Well, I have no idea!

    I was procedurally generating large tile-based maps and ran into the same problem, and this fixed worked for me since I don't use any of the featuers requiring directX.

    Great question though. Yves

    Ah I see. Yes it is a huge bummer and pain for my new project so it would be amazing if it is somehow possible to "override" this limit on pasted background objects. Using actives to then destroy seem to much slower than just keeping pasting background objects, but the limit really mess up what I am trying to achieve. The limit seems very arbitrary in general, even for active objects (?) But much more so for background objects and especially since you can't even track their numbers.

    Steam games: Please login to see this link.

  • Outcast was already answered on the Please login to see this link. about his questions, but if anyone's wondering if it's normal that Standard doesn't have a limit to pasting backdrops while HWA (Like DX9 and 11) have, answer is: Yes it's normal. Basically HWA treats backdrops more like objects, and is limited to 30k due to the short integer limit of 32767, while that's not the case for Standard, on standard it draws image to the surface directly with no memory (Hence why in Standard if you scroll past the pasted backdrops then comeback they would be gone)..

    Best it to use Surface object.

    Game/App developer, artist and a community contributor.
    You can support my work on: Please login to see this link.

Participate now!

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