[Tutor] computer screen resolution

Liam Clarke cyresse at gmail.com
Wed May 11 03:19:17 CEST 2005


If it's built on pygame then the following should work - 

>From http://www.pygame.org/docs/tut/DisplayModes.html

*pygame.display.list_modes(depth, flags)*

Returns a list of supported display modes with the requested depth and 
flags. An empty list is returned when there are no modes. The flags argument 
defaults to FULLSCREEN. If you specify your own flags without FULLSCREEN, 
you will likely get a return value of -1. This means that any display size 
is fine, since the display will be windowed. Note that the listed modes are 
sorted largest to smallest.


But, I think this'll solve your problem, using the following command you can 
always set fullscreen. You should be able to just use - 

>>>import pygame
>>>pygame.display.list_modes(16) #Does it handle 16 bit?
Oh, and OpenGL is hardware rendering, supposedly faster on some systems, but 
far slower to work with. 
Blitting with it is a bitch, quite frankly. 

 pygame.display.toggle_fullscreen() -> bool 
   
   Tells the window manager (if available) to switch between windowed and 
   fullscreen mode. If available and successfull, will return true. Note, there 
   is currently limited platform support for this call.
   
    

On 5/11/05, EUGENE ASTLEY <erastley at charter.net> wrote:
> 
>  Yes, livewires is a pygame wrapper to make pygame easier for the novice 
> to use, such as me. I just want to have my game operate on PC's using XP. I 
> don't want to ask the user to input his resolution, even though I know how 
> to program this method.
> 
> I appreciate your comment but being a novice at programming I don't know 
> what an openGL means although I can guess. I can't find anyplace that lets 
> me look at the list of operating commands available for use and the syntax 
> required to use them in pygame.
> 
> Gene Astley
> 
>  -----Original Message-----
> *From:* Liam Clarke [mailto:cyresse at gmail.com] 
> *Sent:* Tuesday, May 10, 2005 4:20 AM
> *To:* EUGENE ASTLEY; tutor at python.org
> *Subject:* Re: [Tutor] computer screen resolution
> 
>  Is Livewires a game development package? I'm pretty sure pygame can do 
> what you want, it can handle OpenGL if you're into pain.
> 
> www.pygame.org <http://www.pygame.org>
> 
> Plus, it plays MP3's and MPGs easily. :)
> 
> Regards, 
> 
> Liam Clarke
>  
> On 5/10/05, *EUGENE ASTLEY* <erastley at charter.net> wrote:
>  
> I would like to have a full screen for the game I have programmed 
> regardless of the computer users screen resolution. Is their a way from 
> Python or livewires that I can get the info from the computer and then enter 
> it into the global SCREEN_WIDTH and SCREEN_HEIGHT?
> 
> Gene
>  
> 
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
>  
> 
> 
> -- 
> 'There is only one basic human right, and that is to do as you damn well 
> please.
> And with it comes the only basic human duty, to take the consequences.' 
>  



-- 
'There is only one basic human right, and that is to do as you damn well 
please.
And with it comes the only basic human duty, to take the consequences.'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050511/8a662d1d/attachment.htm


More information about the Tutor mailing list