azathothgr
November 18th, 2007, 07:21 PM
Not sure this is the right forum, but here goes.
I've made a screensaver with pyhack (python module for xscreensaver hacks) that simulates weather changes . Everything is fake ofc, just pretty textures moving about, there's no directional light and similar stuff, but it came out looking rather better than I expected.
My code is horrid, and the whole thing is in python which isn't the fastest thing. It can be run with xwinwrap as a desktop background, however, and in my system cpu usage with it running is acceptably low.
To run it you'll need pyhack (http://www.liquidx.net/pyhack/), pyopengl, PIL, and psyco (which is very optional, just remove the 'import' from weather.py if you'd rather not use it).
Either run the 'run' script, which will set is as a desktop background with xwinwrap , or run 'weather.py' ( --nice and --maxfps XX are useful in that case, looks best at 25 to 75 fps)
Also, you can disable some features by setting the variables at the beginning of 'scene.py' to 0. They're pretty self explanatory.
PS: I hope someone would improve my code, or remove the pyhack dependency.. I couldn't find how to do an xscreensaver in python without it.
EDIT: fixed texture dimensions
http://azathothgr.googlepages.com/weather-pt.tar.gz
Screenshots :
http://azathothgr.googlepages.com/w0.jpg
http://azathothgr.googlepages.com/w1.jpg
http://azathothgr.googlepages.com/w2.jpg
http://azathothgr.googlepages.com/w3.jpg
http://azathothgr.googlepages.com/w4.jpg
That's the windows hill btw XD
I've made a screensaver with pyhack (python module for xscreensaver hacks) that simulates weather changes . Everything is fake ofc, just pretty textures moving about, there's no directional light and similar stuff, but it came out looking rather better than I expected.
My code is horrid, and the whole thing is in python which isn't the fastest thing. It can be run with xwinwrap as a desktop background, however, and in my system cpu usage with it running is acceptably low.
To run it you'll need pyhack (http://www.liquidx.net/pyhack/), pyopengl, PIL, and psyco (which is very optional, just remove the 'import' from weather.py if you'd rather not use it).
Either run the 'run' script, which will set is as a desktop background with xwinwrap , or run 'weather.py' ( --nice and --maxfps XX are useful in that case, looks best at 25 to 75 fps)
Also, you can disable some features by setting the variables at the beginning of 'scene.py' to 0. They're pretty self explanatory.
PS: I hope someone would improve my code, or remove the pyhack dependency.. I couldn't find how to do an xscreensaver in python without it.
EDIT: fixed texture dimensions
http://azathothgr.googlepages.com/weather-pt.tar.gz
Screenshots :
http://azathothgr.googlepages.com/w0.jpg
http://azathothgr.googlepages.com/w1.jpg
http://azathothgr.googlepages.com/w2.jpg
http://azathothgr.googlepages.com/w3.jpg
http://azathothgr.googlepages.com/w4.jpg
That's the windows hill btw XD