lordmauve / wasabi2d

Cutting-edge 2D game framework for Python
https://wasabi2d.readthedocs.io/
GNU Lesser General Public License v3.0
154 stars 24 forks source link

Wasabi doesn't update sprites unless they've moved #55

Closed AnthonyBriggs closed 4 years ago

AnthonyBriggs commented 4 years ago

I noticed this last night while I was porting my alien joypad demo from Pygame Zero to Wasabi. If you update a sprite's image but not it's position, then Wasabi will keep displaying the old image. I'm assuming this is due to a caching optimisation somewhere. This is on the most recent Wasabi2D from pip, running on Windows 10, installed last night.

You can see this in action in the demo here. When the sprite stops moving, it isn't updated and keeps the old run or jump image. Moving the sprite, even by 0.1, seems to force a refresh.

Let me know if you need a simpler replication and I can rig one up.

lordmauve commented 4 years ago

Fixed in 13dc3b3.