Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite.draw() #2083

Open
einarf opened this issue Apr 28, 2024 · 0 comments
Open

Sprite.draw() #2083

einarf opened this issue Apr 28, 2024 · 0 comments

Comments

@einarf
Copy link
Member

einarf commented Apr 28, 2024

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 einarf added this to the 3.0 nice-to-have or 3.x.x milestone Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant