[SOLVED] Slowing down

What might be the problem when 400x240 resolution native game on full screen slowing down a lot when there are couple moving sprites on the screen? Minium Fps is set 25 and max no limit. Vsynch is on. Sprites behaviors activate only in certain situations. And how is that, in this laptop game works fine (only player and tiled map and background) and another laptop it runs slow? The game is not fallout4 which could explain thing or two but yeah, I wonder :smiley: I think I have missing some things that fix the problem? :confused:

Does the scene have a lot of objects displayed ? Can you show us your code ?

22 Object and one of those are tile map object. Everything is showing in the game but those 3 objects which game create when you walk across certain point (And then game sloooows). So I have to do the thing evey other objects, when player across certain point game create them? About the code, I donā€™t have anything but unactivate/activate sprites behavior in certain points and camera follow player in x direction and when playerY is greater than 200 = center camera pointY. etc.
So it canā€™t be in code.

Can you show us your code ? pretty sure the problem is in it : are you sure youā€™re creating only one time the three objects you create when the player reaches a certain point.

Here you go.

dropbox.com/s/7ndp30805e4lb ā€¦ 5.rar?dl=0

Try it and see do you have the problem in your computer. press F2 two times to fullscreen off

Now I tried to put minium fps 0 and look debugger. When that first horse appears, fps slows about to around 12-15fps and when those three appears, it drops to around 8.

Can you look how many objects really appear then, using the second tab of the debugger ?

Yep. first 1 object and then 3 objects how it should be and no extra objects appear.

Can you send us the project file + resources so that we can test and find the problem ? (because itā€™s not easy with a compiled game)

There you go!
dropbox.com/s/7rs1scaioivg3 ā€¦ s.rar?dl=0

Hope you figure something out! :slight_smile:

I think the problems comes from the tilemap object that has really a lot of hitboxes : your level is huge and almost all tiles have their hitbox. As itā€™s a single object, when the player is near it (itā€™s always near it ^^^), GDevelop computes the collision with all the hitboxes of the object (and with your level as a single tilemap object, itā€™s a lot).

What you can do it cutting the level into separate tilemap objects. And, by the way, itā€™s useless for the ā€œhorseā€ objects to have the platform behavior : just put them at the right Y and move them using the builtin movement actions.

Okay, I think I have to cut it parts then :smiley: Thanks!

Well ā€œhorseā€ objects have platformer behavior because it was easier to me put them reacting the gravity and now they can fall of the cliff and put them jump etc. how I like it. Physics engine was confusing so that was the problem solver :wink:

By the way, the level tilemap still has the physic behavior on it.

Yep, forgot to remove it when I tested it! Thanks!