Arnd Zapletal | 1 Feb 11:14 2004
Picon

[pygame] newsforge

Heya,

there's an article about Pathological on newsforge (see below) and I thought this might encourage the one
or other Pygamic ;)

Arnd

Caution: this game is  pathological
http://www.newsforge.com/article.pl?sid=04/01/29/1812244

    Move over, Frozen-Bubble. Thanks to an email message from one of our
    readers, I've found a new escape key. It's Pathological. No, really.
    That's the name. This game is more addictive than caffeine, more fun
    than an election year, and more frustrating than trying to find a real
    person to talk with behind the phone company's evil voice mail system.
    Go ahead, give it a try. You can't get hooked by playing it just once.
    Can you? 

--

-- 
"Die Zukunft war frueher auch besser."  
						- Karl Valentin -

Vance Arocho | 7 Feb 04:48 2004
Picon

[pygame] getting NameError

I'm using version 2.3. I'm trying to get this script to run:
 
import pygame
pygame.init()
pygame.display.init( (800,600), OPENGL | DOUBLEBUF | HWSURFACE)
 
But I'm getting this error:
 
Traceback (most recent call last):
  File "F:\Python23\pygameTest.py", line 3, in -toplevel-
    pygame.display.init( (800,600), OPENGL | DOUBLEBUF | HWSURFACE)
NameError: name 'OPENGL' is not defined
 
 

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
Bob Ippolito | 7 Feb 05:27 2004

Re: [pygame] getting NameError


On Feb 6, 2004, at 10:48 PM, Vance Arocho wrote:

> I'm using version 2.3. I'm trying to get this script to run:
>  
> import pygame
> pygame.init()
> pygame.display.init( (800,600), OPENGL | DOUBLEBUF | HWSURFACE)
>  
> But I'm getting this error:

You forgot

from pygame.locals import *

-bob
jabberwocky | 7 Feb 14:19 2004
Picon

Re: [pygame] video synch

> This doesn't sound so much like a video sync issue.
> Check to make sure you 
> are calling pygame.display.flip() or 
> pygame.display.update() after showing 
> the text. It sounds like your levels load very 
> fast, you may not need to 
> show a loading screen?

Sorry my explanation was very bad. I mean that my
levels need several seconds to have updated, because
there are a lot of images to blit, so my text label
instead of to be visible for 10 seconds(example) I can
see it only for 3-4 seconds, because in the first
seconds the label is not yet appeared, because of all
that images to be drawn.
So I need a way to know when all the images are really
blitted, updated and visible on the screen...so I blit
my label that will be really visible for 10 seconds

thanx 

______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/

Pete Shinners | 7 Feb 20:32 2004

Re: [pygame] video synch

jabberwocky wrote:
> Sorry my explanation was very bad. I mean that my
> levels need several seconds to have updated, because
> there are a lot of images to blit, so my text label
> instead of to be visible for 10 seconds(example) I can
> see it only for 3-4 seconds, because in the first
> seconds the label is not yet appeared, because of all
> that images to be drawn.

I still don't understand this. If you want a loading message to appear 
during all the processing have your program work like this..

     screen.blit(loadingmessage, (10, 10))
     pygame.display.flip()

     load5secondsworthofimages()
     blit5secondsworthofimages()

     # ... 10 seconds later
     #     (with load message visible this entire time)
     pygame.display.flip()

> So I need a way to know when all the images are really
> blitted, updated and visible on the screen...so I blit
> my label that will be really visible for 10 seconds

The pygame blit function is a syncronous operation. You don't need to wait 
for it to finish, it is done when the function returns. Same with the 
display.flip() function.

Michael | 7 Feb 20:56 2004
Picon

Re: [pygame] video synch

What is the difference between display.flip() and display.update() when 
update receives no arguments? Is update faster if given the rects? How 
would I get those arguments from the sprite classes?

flbl | 7 Feb 05:37 2004

Re: [pygame] App stops responding when minimized

On Tue, Dec 30, 2003 at 11:06:13PM -0000, psymaster@... wrote:
> I tried creating a new event with id USEREVENT, and set a timer of 1000 ms.
> 
> I had problems with getting QUIT events to exit though. Anyway, the
> problem is still there, once the window is minimized it stops responding
> (most of the times) and I can't select anything from the taskbar either.
> 
> I had once coded a simple game in pygame and an image viewer, and I
> remember having the same problem, but I fixed it by running the game at a
> set number of fps (for the game)or using event.wait() (for the image
> viewer). I can't seem to be able to do the same here. Maybe it has to do
> with the fact that I load one image file (sometimes bigger than 500 KB)
> every second or so, which needs resizing and blitting as well? I don't
> know why pygame effectively crashes my taskbar though.
>

I think I've had pygame ignore input until you call pygame.flip ...

(and then had code in a try block end up skipping the flip, and having
the program become unresponsive)

flbl | 7 Feb 05:41 2004

Re: [pygame] Right shift bug on Windows?

On Mon, Jan 05, 2004 at 12:04:04PM +0200, Jussi Lepist? wrote:
> 
> On my Windows computer, holding down the right shift key and pressing a key sends two KEYDOWN events: one
with the pressed key and one with right shift as the key. The first one has right shift in mods, the second one
doesn't. This doesn't happen with left shift, also this doesn't happen on my Linux computer and on another
Windows computer I tested. Right shift works normally in other applications however... Anyone have any
idea what could be wrong?
> 

See if Numlock is on on one, off on the other windows machine.

I've seen other, older games do this before ^_^

(where you have shift as secondary fire or some such, and try using
numpad (or was it non-numpad) directional keys with numlock (set or
clear, i forget))

Michael | 8 Feb 01:20 2004
Picon

Re: [pygame] video synch

Nevermind how to use the sprite classes with update.. figured it out. 
Still I can't say if it's faster this way than it was just updating the 
entire screen.

> What is the difference between display.flip() and display.update() 
> when update receives no arguments? Is update faster if given the 
> rects? How would I get those arguments from the sprite classes?

Michael | 8 Feb 05:30 2004
Picon

[pygame] tracing mouse path

Does anyone have suggestions on how to trace the path the mouse takes on 
screen on the screen surface? I'm trying to do a doodle pad that lets 
the user scribble while holding the mouse button down. All I seem to be 
getting is dots every now and then along the path. Any ideas on how to 
improve on that?


Gmane