Gravity generator and artificial mass blocks are unoptimized

DeltaWing shared this bug 26 days ago
Need More Information

For every gravity generator on a grid, every mass block in range is considered, and the force and torque is calculated individually. This is very inefficient, as this could easily lead to exponentially large amounts of calculations.


In real world situations, this manifests as gravity drives using far more of the simulation thread than they have any right to.


This could be optimized, at least for gravity generator on same grid mass block interactions, by caching the blocks in range, and saving a "master" vector for force, and one for torque as well, that are applied every frame to that grid until something changes such that this vector would need to be recalculated.

Replies (2)

photo
1

Hello, DeltaWing!

Thank you for writing to us.

Could you please let us know how this issue has been affecting your grid? Could you send us a screen recording/video showing the issue or the screenshots to explain it?

Any other additional information concerning the issue would greatly help us to reproduce the issue at our side.

Kind regards,

Keen Software House: QA Department

photo
1

I don't know what further screenshots/videos would do to help demonstrate the issue. You can create a wall of artificial mass with a wall of attached gravity generators (100+ of each), and then observe the simulation CPU load.

Leave a Comment
 
Attach a file