943,937 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 3074
  • Python RSS
Jul 13th, 2005
0

Pygame crashing

Expand Post »
Hello, I am relatively new with Python and Pygame, however, I am an experienced PHPer, so programming isn't something new to me. My problem is this: I got Python 2.4 installed and Pygame 1.6 for Python 2.4 installed. I know Pygame works because I can make calls to the Pygame modules.

My problem is, when I try to open a window through Pygame using
Python Syntax (Toggle Plain Text)
  1. screen = pygame.display.set_mode((468, 60))
it opens a window, but then lags, and finally crashes and I have to use the oh-so-lovable Crtl-Alt-Del to kill it. I can't figure this out. If I use Tkinter to open windows, they open and execute just fine. The problem only persists with Pygame. Any help at all would be appreciated.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Flinch is offline Offline
2 posts
since Jul 2005
Jul 13th, 2005
0

Re: Pygame crashing

The mode you are trying to set in ...
Python Syntax (Toggle Plain Text)
  1. screen = pygame.display.set_mode((468, 60))
is really not very close to any recognizable mode. Pygame does search for the closest possible mode, but may be overtaxed in this case!
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Jul 13th, 2005
0

Re: Pygame crashing

So I try this:
>>> pygame.display.set_mode((320, 240))
<Surface(320x240x32 SW)>

And it produces a window which hangs again. Any size crashes. Could it be a problem with my computer maybe?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Flinch is offline Offline
2 posts
since Jul 2005
Jul 13th, 2005
0

Re: Pygame crashing

What is your computer and operating system? Which version of Python and PyGame have you installed?

Come to think of it, in a 32bit mode the odd sizes shouldn't be a problem, at least on a XP box. How is the result (screen) used?

Follow the trail and make a sub-program of the calls.

It has been my experience that a number of the PyGame examples on the internet are faulty at best. For instance get_rect() is often given a parameter, doesn't like it!

I have done some work with the Simple DirectMedia Layer (SDL) library using C++, not much work with PyGame's SDL.
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Python Tutorial Release 2.4.1
Next Thread in Python Forum Timeline: Tutorials





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC