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

Possibly introduce DirtySprite #17

Open
wkeeling opened this issue Aug 3, 2016 · 1 comment
Open

Possibly introduce DirtySprite #17

wkeeling opened this issue Aug 3, 2016 · 1 comment

Comments

@wkeeling
Copy link
Owner

wkeeling commented Aug 3, 2016

Many of the sprites are being blitted to the screen 60 times per second even though they aren't changing often - e.g. bricks and edges.

Might be worth introducing the DirtySprite base class for all sprites, and then setting/checking the 'dirty' attribute when deciding whether to blit.

Note that this has been tried experimentally before with the ball/paddle in conjunction with the LayeredDirty sprite group and display.update(). This was a mixed success, as although the sprite movement appeared smoother, the sprites didn't render correctly and were slightly distorted.

May need to use the DirtySprite concept but do the dirty check manually (rather than using LayeredDirty/display.update()) and continue to use display.flip()

@wkeeling
Copy link
Owner Author

wkeeling commented Aug 3, 2016

Some initial testing using DirtySprite and LayeredDirty with both display.flip() and display.update() makes no visible difference in terms of the smoothness of the rendering.

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