How much time is "too much" to be spent on an event?

Hi. I’m new at GDevelop and I’m developing a platform game. Under certain circumstancies, e. g. when there are more than two moving platforms on screen, the game gets slow and the fps drops. I’m using the debugger’s profiler to see what’s happening. It shows the time spent on events, behaviors etc. I’ve read that when “too much” time is spent in some of these items, the game gets performance issues. But I don’t know how much time is considered “too much”. So I’d like to ask you how much time is expected to be spent, for exemple, on each event?
If the following information is relevant, the graphics of my game are pixelart (very low resolution .png files) and the sounds are .ogg files. Thanks in advance for any information you could give me.

Time spent is dependent on what it’s doing. Physics calls and layer effects will generally be more processor expensive than sprite movement or collision detection. A rule of thumb I use is anything over 15ms gets attention.

Group your events as subevents of an Event Group. The debugger will break down the times for each group event, so you can narrow down where the issue is occurring. For example, here are the events grouped:

And this is the event groups shown in the performance analyser:

3 Likes

Hi. I’ve changed some things in the events that deal with the moving platforms and now I think the game is running OK. The time for most of the events is around 0.04ms. Nothing near 15ms, fortunately. Thank you very much for the information! It was very helpful! :slight_smile: