python - Changing days and nights with pygame -


i try write simple 2d game using python 3.x , pygame 1.9.2. want simulate changing of days/nights. have got in-game time(like real, faster) , i'd make screen darker @ exact time have no ideas how it. advice me how reduce brightness of screen or other ways how show changing of days , nights?

excuse language if make mistakes. english isn't native me)

setting gamma or screen brightness not best way go. when game gets more complicated, it's easier if use technique ecline6 suggested: changing background image. since loaded image suppose, can use trick:

let's have background surface. every 10s fire event change backround blitting low alpha-black surface on top of it. way background darker.

you can same white, make more brighter too.


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -