ensisoft / detonator

2D game engine and editor 💥💣
GNU General Public License v3.0
306 stars 12 forks source link

Investigate how to limit the number of physics bodies in simulation #36

Open ensisoft opened 3 years ago

ensisoft commented 3 years ago

Investigate how to limit the number of physics bodies in simulation. Currently the engine will create physics bodies for all entities that have nodes with rigid bodies regardless of whether they're currently actually contributing to the scene and its game play. For example simulating a physics such as a moving platform body that isn't affecting the user and isn't yet visible in the screen is wasted work.

Related to #37

ensisoft commented 3 years ago

From physics engine perspective there are 2 ways to approach this.