Add object activation/deactivation for optimization

Currently, all instances of an object keep running their events, collision checks, and behaviors even when they are far off-screen or not visible.

It would be extremely useful to have a built-in way to “deactivate” specific instances — meaning they stop processing events, physics, and behaviors — until reactivated.

Example: Trees, rocks, enemies, or items far outside the camera view don’t need to check collisions or run AI. This would drastically improve performance on large maps.

Suggested implementation:

  • Add new actions: Deactivate object instance and Activate object instance
  • While deactivated:
    • Events targeting that instance don’t run.
    • Behaviors are paused.
    • Collisions are ignored.
    • Rendering can stay enabled or disabled (configurable).
  • Optionally integrate with the camera: e.g. “Deactivate when outside viewport + margin”.
1 Like

I don’t want to make you lose confidence in this, but imo I don’t think it’s achievable,at least not in the way you envision it.

Disabling one process over another, or all of them together…to on/off when needed… would require more computing power than simply keeping the object there and having the camera frame it when needed.

What many people have actually asked for is more efficient object culling.

There have been various threads and several methods proposed on the topic, but nothing has been natively integrated into GDevelop…which, in my opinion, is something sorely needed.

Anyway wish you good luck with the request.

edit:this doesn’t fit my project but for example you can have a look here