beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
178 stars 95 forks source link

implement lua unit script multi-calls #1527

Open loveridge opened 1 month ago

loveridge commented 1 month ago

Multi calls as described in https://github.com/beyond-all-reason/spring/issues/1068

It saves about 2-3 microseconds per unit for a unit with many Turn/other invocations. Tested with the walking animation for the dirtbag:

image

sprunk commented 1 month ago

2-3 microseconds per unit

per frame?

loveridge commented 1 month ago

2-3 microseconds per unit

per frame?

Per sim frame where the unit script is actually called. Even with 6000 dirtbags I didn't notice much real fps gain, maybe 2 or 3 extra total fps.