I have no idea how the engine works, but i can tell what slows it down thanks to a lot of testing and the profiler.
The big issue with slow down is Object amount, not even the behaviors or anything like that, just the sheer fact of asking GDevelop to take into acount the existance of an object kills your performance… when used in higher amouts that is.
Finding this out trough an entire day of testing, i lowered my world generation to a 50x50 grid, of 64x64 tiles, this makes the world playable, but tiny, not to mention with large blocks.
The lowest this world goes to is 12.00ms, with no extra events, such as enemy AI, items, inventory, and so on… just the world generation.
Again, i have no idea how GDevelop works, but that should be something to deal with larger amounts of objects… and 50x50 isnt even that big.
Objects should be taken into account when the scene is loading or after their generated, then if they go off screen, they should be killed off from any calculation unless strictly asked for, like for example if you check for “Distance between objects”.
If such actions arent being asked for, then i really wish there was a way to kill off processes to anything outside of a X amount to the border of the camera.
As in, as the camera moves, its the camera thats checking whats around and then making them active off screen, this distance could be specified trough an action.
I know we can kinda do something like this, but what we have now engages every single tile, even if their on the complete oposite side of the universe, im talking about some sort of baked in culling system that only checks near objects, ignoring all the ones out of range.
Im not sure if i explained myself right
The point is, there really needs to be something to deal with projects like this, i was so happy about working with procedural generation only to start feeling more and more constricted by performance as i work.
Its not my events, since all that i have is quite literally the world generation that gets killed off once done, my events are 0.80ms out of 12.00ms, its all coming from Objects and Render.
Is there anything im missing?