arcade
arcade copied to clipboard
Optimize HitBox Drawing
Arcade has the ability to draw hitboxes for a Sprite, SpriteList, or Scene. However, this function essentially loops on every sprite, and makes a call to arcade.draw_line_strip with the adjusted points for that Sprite's hitbox. This is incredibly inefficient and will completely destroy performance even with only 100-200 sprites.
There may be a better way to batch draw these, perhaps using Pyglet shapes is an opportunity. This will definitely need more investigation into the best ways to handle this.
We can do a quick fix for 3.0 just looping and bulding a buffer of lines to improve this greatly. It's not a perfect solutuon, it will be dramatically faster.