Hello, I’ve been making a top-down Zelda style game. Loading the game to test it is getting slower and slower. It now takes about a minute to load. Is this normal? I’m fairly new to the program.
Low ram available
Use of physics (I don’t think you used physics)
Creating objects ( this should be the problem)
It could be you have an action creating an object without a condition. When this happens
, it creates same objects multiple times(non stop)
I mean the game preview I guess. The thing it takes you to when you press the play button in GD.
I don’t think I have an action that continuously creates an object. But I do have lots of scene variables and global variables. Could that be the issue?
And I didn’t use any physics as far as I know.
Not sure if variables are the problem because I have a game with a lot of variables and it loads in approx 10 - 15 seconds (it’s a large game)
Could it be too many global objects?
Okay. I don’t know your game and system, but a minute doesn’t sound normal.
I have 10 scenes, ~20 global objects, 800 images and it takes <10 seconds.
Maybe you can delete a few things to test where the problem is.
I don’t think variables could be a problem. Do you use large images? (>1000 pixels)
Yes, some of them are many pixels. A lot of them are made in boxes that are 64 pixels wide and 64 pixels high and sometimes the boxes are filled in with a color. I made some floors images that would have far more than 1000 pixels but they are just in my resources. They aren’t actually in the scenes, so I’m not sure if that would affect the loading time. So far I have 26 scenes. I have 117 global objects and almost 100 global variables.
What if you try doing a copy and eliminate the other scenes?
Neither your pictures, scenes or variables amounts should affect the performance that way.
If that behavior started after some change in the events, then the problem is in the events.
For further help it would be useful to know the specs of your computer and the events of your game.
I recently had a very similar problem with the game I’m developing. After some changes in the events the game started taking up to 45 seconds to load and showing a noticeable FPS drop. To solve it I used the profiler/debugger bundled in GDevelop, that way I found the sections of the events that caused the problem and optimized some routines. The problem was with a massive amount of object timers and a massive amount of collision detections per frame, so I had to get creative to do the same things (more or less) in a different way. But I have to say, it was relatively easy to found the problem because I have my events classified in event sheets and event groups.