Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thank you. I am not sure why the game lags so much, but I found out that after 5-30s the lag will mostly dissappear. I will try to optimize the game as much as possible.

(1 edit)

What engine do you use?

Try to deload anything not on screen, and only load things when they are close-ish to the screen.

(1 edit)

I just realized that you use Unity, which I'm not very experienced in... sooo... shrug

My suspicion is that the levels are too large, and there too many things running code and drawing.
As I said earlier, unloading anything that is off-screen can save a lot of frames. Try to turn on what Unity calls Occlusion Culling to prevent things from rendering when it doesn't need to.
I'm not sure if this is how it works, but having a lot of physics objects in a huge level could cause quite a bit of lag(in my experience, it does), which is why you should be unloading stuff.

Something else that could cause lag could be loops that run too long, so that might be something to investigate.

(1 edit)

Yeah, for some reason the original version (https://pxldev.itch.io/a-dungeon-game-made-for-ludum-dare-48) runs much better

I have optimized the game as much as possible. The lag is only present on only the first level (only about 5-30s)