'm trying my game when in the third level… after a while it slows down … I can’t understand the error … because on average only the graphics changes but all in all as script they are the same and identical … both the levels and the enemies … or at least in the third level… the enemies are the ones that have only HP strength and speed as a difference … in the debugger … I got this error … someone could tell me what it is? ?
I got that multiple times when parsing with the debugger. That at least in my case does not bring me errors in the game. I suppose it is because there is an analysis that it does and it does not identify the source. Does that item of yours appear isolated or is it an item that consumes 100% of the total ms of each frame? Seeing that isolated image I don’t have much information and neither if your events generate any inconsistency. Do you have the events separated by groups of events?
what do you mean by separate groups ??
I put the events by type in external links …
for example all collisions in an external link
each enemy in an external link … so the sound and so on … then at the beginning of the scene I put the links I need
Group the events of a given task into an event group so that you can view it separately in the profiler.
I do not understand what would be the drawback there, it is only 1.17% of the total processed. That 66% is with respect to the parent event group. The console gives some messages regarding the audio channel and others, you could verify. But to know what the error is, you have to look at the events. You should wait until it starts to slow down and run a profiler to see which group of events is consuming more of the total processed. That would guide you to see what events should be corrected.
the problem is that from the pc I have no slowdown … only when I install it on a smartphone do I receive the slowdown … and it is significant … is there a way to check everything from the smartphone ???
I’m not aware of any way to parse the data as neatly as you can from Gdevelop
You don’t have that downfall because in general a computer is more powerful than a smartphone. To standardize your game so that it runs smoothly on a smartphone you’re going to have to be guided not by how it runs on PC, but by how many total milliseconds your profiler gives per frame. At least this is what I do. I use the profiler to see which groups of events are the ones that consume the most milliseconds of the processing and I have an approximate value of the total ms from which…translated to a standard smartphone…the FPS begin to drop. For your game to maintain 60 FPS, the processing time of each frame must be equal to or less than 16.6 milliseconds if I’m not mistaken. The less processing power and RAM memory the device you run the game from, the more milliseconds it will take to process each frame, and eventually it will break the 16.6 millisecond barrier…dropping FPS. On the one hand, I suggest you investigate what I mentioned above, also that you analyze the average values of the total frame processing in your game from the PC and see how well it runs on your smartphone in order to establish a barrier of how many milliseconds in your PC mean more than about 16.6 on your smartphone. Alternatively, use this to monitor FPS on your smartphone: How to troubleshoot poor game performance - GDevelop documentation
What you’re showing sounds like calls that aren’t consistent across events, but I don’t think that’s what’s slowing down your game. They cannot be 100% of the processing of each frame. take a look at the event groups that don’t have “?” and that consume many milliseconds of the total.
so
All my game is 25.49 ms
all event is 24.03ms
render is 0.25 ms
in 600 frames
all events are low they do not exceed 0.40ms lolo Shakeobject takes 0.26ms for the rest they are all 0.05 0.08 ms are really very low which in the total but brings me to 25.49
then I have these lines that arrive at 0.89ms
as you can understand in the game choose 2 characters each with different characteristics that must be shown on the screen according to the choice … how could I eliminate this part of the code ???
ok ok ok
i soved it… in my code nothing seems wrong … sure! I’m sure many of you would do the same with cleaner code !!!
in the end the error was in the scene … that is … I built some houses … I eliminated them completely and from 24ms I ended up at 10 … which is the average of all the other levels only that I wonder … why in other levels I put some houses and it didn’t happen ??? I calmly review the drawings …