[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Game played over the desktop?



On 9/19/06, Chris Ashurst <CAshurst@xxxxxxxx> wrote:
There's a recipe on the wxPython wiki that demonstrates transparent windows
by changing the alpha value of the frame through win32api calls, but this
changes the alpha of everything in the frame, so that throw it out the
window (haha). http://wiki.wxpython.org/index.cgi/Transparent_Frames_on_MSW

While alpha transparency isn't supported well in wxPython, a 1 bit
mask on a frame works great cross-platform, to let you see the desktop
through your window. My point being is if you don't need fades or
partial transparency to see the desktop or an anti-aliased window
edge, you can have a shaped window very simply without doing any
screen grabbing at all. see shaped window sample in wxPython.


The second method is exactly as you describe it. A quick search revealed
this small recipe:
http://mail.python.org/pipermail/python-list/2003-June/166806.html.

As far as using screenshots with a pygame window that draws on top of
it, you'd probably have a hard time getting the desktop when your
window is up (cause new screen caps would grab your window) So if you
go that method, I'd expect you'd have to grab one shot before
launching your window and use it throughout.