Nicolas Bischof | 1 Dec 2006 01:27
Picon

pygame.error: display Surface quit -> ¿?

Hello, i have this error:
Traceback (most recent call last):
  File "Tetris.py", line 199, in ?
    if __name__=="__main__" : main()
  File "Tetris.py", line 196, in main
    container.graveYard.pieces[0].boxes.draw(screen)
  File "C:\Program Files\Python24\lib\site-packages\pygame\sprite.py",
line 313, in draw
    self.spritedict[spr] = surface_blit(spr.image, spr.rect)
pygame.error: display Surface quit

what does that mean?, i can't fix it

Pete Shinners | 1 Dec 2006 04:41
Favicon
Gravatar

Re: pygame.error: display Surface quit -> ¿?

On Thu, 2006-11-30 at 21:27 -0300, Nicolas Bischof wrote:
> pygame.error: display Surface quit
> what does that mean?, i can't fix it

This means a call was made to pygame.display.quit() or pygame.quit(). If
you try to do anything to the display surface after quit you will get
this error.

Luke Paireepinart | 1 Dec 2006 06:26
Picon
Gravatar

Re: [pygame] pygame.error: display Surface quit -> ¿?

Nicolas Bischof wrote:
> Hello, i have this error:
> Traceback (most recent call last):
>  File "Tetris.py", line 199, in ?
>    if __name__=="__main__" : main()
>  File "Tetris.py", line 196, in main
>    container.graveYard.pieces[0].boxes.draw(screen)
>  File "C:\Program Files\Python24\lib\site-packages\pygame\sprite.py",
> line 313, in draw
>    self.spritedict[spr] = surface_blit(spr.image, spr.rect)
> pygame.error: display Surface quit
>
> what does that mean?, i can't fix it
You should include an excerpt from the code so we know what it is the 
program's doing at the failure point.
I would guess, from the error, though, it sounds like you already called 
pygame.quit() and you're trying to blit to the screen after
pygame uninitialized SDL.
HTH,
-Luke

Lenard Lindstrom | 2 Dec 2006 08:08

Rect.union and rectangle positions

Does Rect.union ignore rectangle positions? That is, does it only 
return a rectangle whose width and height is the maximum of the 
widths and heights of the two compared rectangles rather than a 
rectangle that will actually cover the two rectangles as they are 
positioned?

Lenard Lindstrom
<len-l@...>

Farai Aschwanden | 2 Dec 2006 14:10
Picon

Re: Rect.union and rectangle positions

Hello

Based on the explanation in Pygame's Doc I would say it ignores the current rectangle positions:

Returns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals.

I dont know how the new rect is calculated technically but your description sounds good to me. It has to be tested out with some simple examples. Based on the second phrase in Pygame's doc there might be an area inside the new rect that is not covered by the 2 old originals. This means that the surface area of the new rectangle can be bigger than just the addition of the 2 originals. I mention this in matter it is important for your project. That way its not a "proper" union command and you know from set theory or the union of a DB.

Just my 2 cents
Farai


Am 02.12.2006 um 08:08 schrieb Lenard Lindstrom:

Does Rect.union ignore rectangle positions? That is, does it only 
return a rectangle whose width and height is the maximum of the 
widths and heights of the two compared rectangles rather than a 
rectangle that will actually cover the two rectangles as they are 
positioned?


Lenard Lindstrom



Kris Schnee | 2 Dec 2006 14:20
Favicon

Incarnation

I tried running this, but nothing happens when I try to log in. I tried 
both leaving the name/password blank, and a made-up pair, but both times 
the program just hung.

Kris

Farai Aschwanden | 2 Dec 2006 14:32
Picon

Re: Incarnation

Just tied it here and was able to connect. So maybe its a Firewall  
thingy on your side?

I experience a freeze after downloading the updates. I restart the  
game then the downloaded files will be moved to the target  
directories, then it hangs again. The third restart brings me to the  
login screen.

Farai

Am 02.12.2006 um 14:20 schrieb Kris Schnee:

> I tried running this, but nothing happens when I try to log in. I  
> tried both leaving the name/password blank, and a made-up pair, but  
> both times the program just hung.
>
> Kris

Kris Schnee | 2 Dec 2006 14:39
Favicon

Re: Incarnation

 >> I tried running this, but nothing happens when I try to log in. I
 >> tried both leaving the name/password blank, and a made-up pair, but
 >> both times the program just hung.
 >>
 >> Kris

Farai Aschwanden wrote:
> Just tied it here and was able to connect. So maybe its a Firewall 
> thingy on your side?
> 
> I experience a freeze after downloading the updates. I restart the game 
> then the downloaded files will be moved to the target directories, then 
> it hangs again. The third restart brings me to the login screen.
> 
> Farai

I did get through the "downloading files" part, and to the login screen. 
I'm running the standard Win XP firewall.

The game looks interesting, so I hope I can get it running. But then 
I've also been having problems with several other games, for no clear 
reason.

Kris

Kris Schnee | 2 Dec 2006 14:42
Favicon

Seagame Demo 2

By the way:
http://kschnee.xepher.net/061201ship_demo.zip

There's the latest version of the "sea game" demo, source not included 
this time. (EXE only.) It's not much different than the previous demo, 
but has music and sound, Psyco-accelerated framerate, the ability to 
board and leave the ship, and different controls. (8-way movement when 
out of the ship, plus J to jump; Asteroids-like movement plus X&C to 
fire when in the ship; Enter to board/leave ship; Esc to quit.)

Kris

Farai Aschwanden | 2 Dec 2006 15:56
Picon

Re: Incarnation

Kamilche might be able to give you any better solutions.

Am 02.12.2006 um 14:39 schrieb Kris Schnee:

> >> I tried running this, but nothing happens when I try to log in. I
> >> tried both leaving the name/password blank, and a made-up pair, but
> >> both times the program just hung.
> >>
> >> Kris
>
> Farai Aschwanden wrote:
>> Just tied it here and was able to connect. So maybe its a Firewall  
>> thingy on your side?
>> I experience a freeze after downloading the updates. I restart the  
>> game then the downloaded files will be moved to the target  
>> directories, then it hangs again. The third restart brings me to  
>> the login screen.
>> Farai
>
> I did get through the "downloading files" part, and to the login  
> screen. I'm running the standard Win XP firewall.
>
> The game looks interesting, so I hope I can get it running. But  
> then I've also been having problems with several other games, for  
> no clear reason.
>
> Kris


Gmane