Teifion
Teifion

Reputation: 111109

PyGame flickering issue

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 in engine.screen.py redraw() and update_window()

Github repository of code

Upvotes: 0

Views: 442

Answers (2)

ninMonkey
ninMonkey

Reputation: 7511

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

Upvotes: 0

Johannes Charra
Johannes Charra

Reputation: 29953

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?

Upvotes: 2

Related Questions