Windows freeze in pygame- Windows

Reply

Join Date: Jun 2005
Posts: 6
Reputation: TheSkunkMan is an unknown quantity at this point 
Solved Threads: 0
TheSkunkMan TheSkunkMan is offline Offline
Newbie Poster

Windows freeze in pygame- Windows

 
0
  #1
Sep 23rd, 2005
Ive been trying to make a game recently but all pygame windows freeze. i have to use the Task Manager to exit. I also have to use it to exit a fullscreen too. All im doing in my code is opening a blank screen. How can i fix that?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 138
Reputation: a1eio is an unknown quantity at this point 
Solved Threads: 21
a1eio's Avatar
a1eio a1eio is offline Offline
Junior Poster

Re: Windows freeze in pygame- Windows

 
0
  #2
Sep 23rd, 2005
hmm well i've little experience with pygame myself but are you sure your not missing something in your code?
i think you need to type stuff like pygame.init() and you have to flip the display stuff like that, like i said i'm not too sure but if you go on the pygame website http://www.pygame.org they might have something in the documentaion or go on their irc channel
a snippet of your code might be good?
then someone can look at it and see whats wrong
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,972
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 920
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Windows freeze in pygame- Windows

 
0
  #3
Sep 23rd, 2005
This the most basic test for PyGame that I have, give it a fly ...
[php]import pygame
from pygame.locals import *

yellow = (255,255,0) # RGB color tuple

# initialise screen
pygame.init()
screen = pygame.display.set_mode((350, 250))
pygame.display.set_caption('Basic Pygame program')

# fill background
background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill(yellow)

# display some text
font = pygame.font.Font(None, 36)
text = font.render("Hello from Monty PyGame", 1, (10, 10, 10))
textpos = text.get_rect()
textpos.centerx = background.get_rect().centerx
background.blit(text, textpos)

# blit everything to the screen
screen.blit(background, (0, 0))
pygame.display.flip()

# event loop
while 1:
for event in pygame.event.get():
if event.type == QUIT:
raise SystemExit
screen.blit(background, (0, 0))
pygame.display.flip()
[/php]
Powerful stuff that SDL, mind you, just a little complex at first blush!
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 6
Reputation: TheSkunkMan is an unknown quantity at this point 
Solved Threads: 0
TheSkunkMan TheSkunkMan is offline Offline
Newbie Poster

Re: Windows freeze in pygame- Windows

 
0
  #4
Sep 25th, 2005
In that simple program it still crashes. i'm guessing its something wrong with pygame or my computer. Have u heard of this happening before?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,972
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 920
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Windows freeze in pygame- Windows

 
0
  #5
Sep 25th, 2005
Make sure you have the right version of PyGame downloaded. I use Windows XP and Python24 so I downloaded the installer file:
pygame-1.6.win32-py2.4.exe
from http://www.pygame.org/
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,221
Reputation: bumsfeld will become famous soon enough bumsfeld will become famous soon enough 
Solved Threads: 137
bumsfeld's Avatar
bumsfeld bumsfeld is offline Offline
Nearly a Posting Virtuoso

Re: Windows freeze in pygame- Windows

 
0
  #6
Sep 25th, 2005
I understand that PyGame is simply a wrapper for SDL. That creates a problem, Python has a good memory manager, but SDL written in C++ has the usual memory management is up to you thing. THESE TWO WORLDS LIKE TO CLASH AND CRASH!
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,972
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 920
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Windows freeze in pygame- Windows

 
0
  #7
Oct 4th, 2005
I have played around with some of the pygame examples posted on the net, and they don't always behave well! I actually managed to get the "grey screen of death" on Windoze XP!
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 6
Reputation: TheSkunkMan is an unknown quantity at this point 
Solved Threads: 0
TheSkunkMan TheSkunkMan is offline Offline
Newbie Poster

Re: Windows freeze in pygame- Windows

 
0
  #8
Oct 5th, 2005
I have it working now, but is there a way a way i can have it so the window doesnt pop asking if u really want to quit?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC