Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 9th, 2005, 11:39 AM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,868
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Flaw in Pygame?

When ever you either minimize the window or move another window over top, it updates the display. This may not sound like a problem, but for me it is.

In my game, whenever you're in an area it's just your character fake walking in the center of the screen, and the entire map moving behind the character in the opposite direction. You can't see the outsides of the map behind the window though because when the area is initiated, I draw a blank screen, and throw a window between two menu screens. And from then only the inside of the window is updated using pygame.display.update([rects]) .

But then if you minimize or move a window overtop the rest of the map is revealed over top of the two menu screens and the main window.

I managed to solve the minimize problem with a function that is checked in the main loop, that

if not pygame.display.get_active() and not minimzed:

it redraws the two menus and main window. However, I have no way of checking if a window is being moved overtop of the pygame window.

Is there nothing I can do about this?

I know I could just make it fullscreen, but that doesn't always work on all computers.
Sane is offline   Reply With Quote
Old Aug 9th, 2005, 1:51 PM   #2
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
I know I could just make it fullscreen, but that doesn't always work on all computers.
Why not?
Cerulean is offline   Reply With Quote
Old Aug 9th, 2005, 8:39 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,868
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
I don't know, just something I've seen mentioned. That it doesn't always work.
Sane is offline   Reply With Quote
Old Aug 10th, 2005, 2:29 PM   #4
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Why not try for yourself and see?
Cerulean is offline   Reply With Quote
Old Aug 14th, 2005, 5:59 PM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,868
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Yes I did, it didn't work for me either. Including many others. Luckily if it doesn't work, it just proceeds normally, but unfortunately, that doesn't fix my problem.
Sane is offline   Reply With Quote
Old Aug 14th, 2005, 6:22 PM   #6
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
What you're asking for is very low-level. You'll need to latch onto some OS-specific callback to inform you of these kind of events and then modify your code to not draw anything accordingly. Absolutely no idea on what these functions are under any platform 'tho.
Cerulean is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC