开发者

PyGame flickering issue

开发者 https://www.devze.com 2023-03-17 01:28 出处:网络
I\'ve made several small programs in PyGame and for my latest attempt I have added scrolling (push arrow keys) but when it happens the sprites flicker. I\'ve tried to pinpoint the issue but cannot.

I've made several small programs in PyGame and for my latest attempt I have added scrolling (push arrow keys) but when it happens the sprites flicker. I've tried to pinpoint the issue but cannot.

The drawing section happens i开发者_JAVA技巧n engine.screen.py redraw() and update_window()

Github repository of code


Have you considered swapping lines 48 and 49 in screen.py? :) Not sure, but maybe you ought to call display.flip() after rendering the sprites?


Do you have vertical sync enabled? And set framerate to 60, for a nice look.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号