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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -