954,176 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

pygame full screen help

I've playing with pygame a little and reading about it and i tried to make a simple rock paper scrissors game. I can't seem to get fullscreen working. Everything i've tried or read didnt work. Can u please help me? thanks

TheSkunkMan
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

I need some idea what you have done so far, so I can help!

vegaseat
DaniWeb's Hypocrite
Moderator
5,976 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,416
 

All im trying to do is get a blank full screen. I don't really need it i was just wondering how u do it.

TheSkunkMan
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

I used to play around with SDL in my C++ days. PyGame is based on SDL. I know in C++ you can use something like ...
[php]SDL_Surface *screen;

screen = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE | SDL_RESIZABLE);
[/php]This should have carried over to PyGame. You might use something like this ...
[php]
import pygame

pygame.init()
# change to whatever your full screen size might be
size = width, height = 800, 600
screen = pygame.display.set_mode(size)

[/php]

vegaseat
DaniWeb's Hypocrite
Moderator
5,976 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,416
 

in pygame it's:

import pygame
from pygame.locals import * #need this for 'FULLSCREEN' value
pygame.init()
WIDTH=800
HEIGHT=600
pygame.display.set_mode((WIDTH,HEIGHT),FULLSCREEN)

also - make sure you include code to quit the app or you won't get out. (ev.type==QUIT doesnt work in fullscreen, and locked up my mac, win or linux may be different)

zauber
Newbie Poster
8 posts since Jul 2005
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You