Optimization tips for my large platform game?

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.
  • Sorry if I don't explain this correctly, but let me try to explain my problem:

    My game is getting pretty large as I am closer to finishing it, and I have been starting to run in to a few simple problems.

    The main game frame is 5000x5000 in size and there are about 3000 objects. There's this one event that, according to the profiler, sometimes uses about 2000ms time.

    It is just an event that checks if the player is colliding with a certain object, Dirt to be more precise, and the time is probably that high due to the majority of the frame being covered with Dirt.

    Please login to see this attachment.

    This has been concerning me and sometimes there are delays with sounds maybe because of this, Any tips to try and optimize this?

  • If you just want to create dust effect when player move on dirts, you can compare player's position area instead of collision, (test in zone doesn't support expression in current version so I don't recommend) maybe not that precise but much faster.
    Another solution is to check collision every two or three frame.
    Also, the profiler shows the total time consume of one event, so if you didn't feel the lag or notice frame drop it's not necessary to optimze it. After all, premature optimization is the root of all evil.

  • Edit : sound delays maybe due to 2.5+'s optimize sound play option, with this on fusion will do some preprocess so it maybe a bit delay when playing it, please check the document, I can't recall the details, but I do have fixed a sound delay issue by unchecking it.

  • If you just want to create dust effect when player move on dirts, you can compare player's position area instead of collision, (test in zone doesn't support expression in current version so I don't recommend) maybe not that precise but much faster.
    Another solution is to check collision every two or three frame.
    Also, the profiler shows the total time consume of one event, so if you didn't feel the lag or notice frame drop it's not necessary to optimze it. After all, premature optimization is the root of all evil.

    Thanks for the details. From what I understand on what you said, the player is supposed to collide with the dirt. There are caves in my game and they include a lot of dirt, and not colliding with them will result with the player easily leaving the cave. I didn't really understand what you meant about comparing the players position, I couldn't precisely find that expression.

    Also Optimize Sample is already unchecked, my game has dialogue and when they play, the text animation sound has some delays sometimes.

  • Thanks for the details. From what I understand on what you said, the player is supposed to collide with the dirt. There are caves in my game and they include a lot of dirt, and not colliding with them will result with the player easily leaving the cave. I didn't really understand what you meant about comparing the players position, I couldn't precisely find that expression.

    If your game is gird based or map is tiled, then the cave area should be in the shape of the combination of rectangles, so compare if player's position is in this area is much faster than collision.
    Fusion has an old test in zone condition but do not support expression, you can make your own by comparing position manually.


  • Please login to see this picture.


    I notice you've got it testing for overlaps twice in this event? I'm not very familiar with the Platform Movement Object, but is that necessary?

    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.

  • when i have a lot of actives in a level, and these actives do'nt move (like ladders), i prefere make a big picture whith all the actives a the good place. i made a little mfa to capture all the frame (just keep the actives wanted) and save it in a big png

  • I notice you've got it testing for overlaps twice in this event? I'm not very familiar with the Platform Movement Object, but is that necessary?

    It is necessary. I would collide through every object without the bottom expression.

    how many active "dirt" is there in your level?

    I don't know how to check the amount of one object, How would I do that?

    when i have a lot of actives in a level, and these actives do'nt move (like ladders), i prefere make a big picture whith all the actives a the good place. i made a little mfa to capture all the frame (just keep the actives wanted) and save it in a big png

    This actually gives me an idea, I think I actually will include most of the tiles in one picture, and also make them backdrops instead of actives?

    I also forgot to mention the game is unplayable in standard mode, maybe that will help the performance?

  • Yes it helps a lot, big image needs more pressing to display, motif will repeat a small image.
    Same with scale, you can use a small image and scale it to x2 to help to save memory.

    Late reply, but I already tried the motif backdrops, and it solved my problem! Went from 3000 objects to only around 300. I had to remake the entire level but it was worth it, and even though this doesn't matter, the game runs good in standard mode now.

    Thanks guys!

Participate now!

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