so i’m making a dungeon crawler game where the dungeons generate proceduraly.
each section of the dungeon is made using external layouts that get created when you approach a certain corridor of the room (top corridor, bottom corridor, etc.)
the problem is that whenever a room gets generated the game’s frame rate drops insanely.
the objects i’m using for the walls and the floor have no effects, no variables, and the only code involving them is the collision.
the code uses a fair share of trigger onces and there is no code repeating itself every frame causing the lag.
this is the whole generation code:
I’d suggest you add event groups to sections of your events (put the events as subevents off the event group) and use the debugger to whittle down where the lag kicks in.
yeah so as it turns out the issue is the objects (wall and floor) being tiled objects
gdevelop tiled objects are optimised like doodoo
for anybody who might find this forum post in the future because you have the same issue just simply dont use tiled sprites, use regular ones instead (depends on what ur doing tho)
I try to optimize my game cause it lags on older phones and now you made me wonder if tiles are the reason, cause I have them taking the whole screen as a background.
I guess it’s not the problem but “probably” even if there is trigger once when the player moves the condition is triggered again even if it should not…bcs your checking distance.
bcs movements are checked somewhat differently.
if your objects are created each frames they will surely lag your game.
It looks like not the problem…but it’s what i would looks at.