arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Sprite.draw()

Open einarf opened this issue 1 year ago • 0 comments

This have been a source of confusion for a long time. Users believe a SpriteList loops every sprite calling draw() so they end up subclassing sprite adding a custom draw method, but this actually doesn't do anything.

It might actually be better to entirely remove Sprite.draw() and instead focus on making a higher performance version of draw_texture*. This solves two problems:

  • Removes the confusion about the draw method
  • Speeds up texture drawing 10x making it a semi-viable option again. In 3.0 we removed the internally cached spritelist in sprites that boosted the draw performance of single sprites and textures.

Likely this also means making a draw_sprite method for simple things and debugging. It will simply wrap the draw_texture function.

Mark the draw method as deprecated in 3.0 or just fix it in 3.0.

einarf avatar Apr 28 '24 10:04 einarf