asumagic / kag-staging

Issue tracker for the KAG staging build
6 stars 0 forks source link

Check if run flags can easily be skipped when unused #165

Closed asumagic closed 11 months ago

asumagic commented 11 months ago

They are only used in canRunScript. Considering that these flags are updated at the beginning of the blob's tick, we could determine what flags are actually being checked by scripts and exclude those out from the run flags update.

This could possibly save quite some CPU time for static blobs.

asumagic commented 11 months ago

Actually, tracking this could mean we could set up Box2D proximity sensors automatically when tick_blob_in_proximity is set. This would reduce the script check overhead of spikes fairly significantly.

asumagic commented 11 months ago

Didn't do the tick_blob_in_proximity opt, but the run flags opt was fairly easy (famous last words & need to benchmark it still)