jdoleary / Spellmasons

https://store.steampowered.com/app/1618380/Spellmasons/
Other
5 stars 2 forks source link

Optimize predict ai turn #1110

Closed jdoleary closed 2 months ago

jdoleary commented 2 months ago

Predicting the AI turn with getSmartTargeting was a huge performance bottleneck and lagged the FPS when there were many enemies on screen.

This commit changes how attentionMarkers are rendered by generating them in chunks so that if there are lots of enemies it will generate them over time instead of lagging the game out.