Re: [pygame] Weird lag

2009-03-01 Thread Peter Gebauer
How is collision testing done? 200 sprites tested against 200 sprites is a big difference from just testing 2-3 sprites against 200, in particular if you do the iteration in Python. /P On 2009-03-01 (Sun) 08:51, Daniel Mateos wrote: Hey again, In a 2d scroller game im making i seem to get

Re: [pygame] Weird lag

2009-03-01 Thread Daniel Mateos
Peter Gebauer wrote: How is collision testing done? 200 sprites tested against 200 sprites is a big difference from just testing 2-3 sprites against 200, in particular if you do the iteration in Python. At the moment only the player char is checked for collisions so its 1:200.

Re: [pygame] Weird lag

2009-03-01 Thread Zack Schilling
Your game is spending a little over 60% of its time blitting. About 20% is evaluation, and the rest of the work is overhead. That might seems high given the complexity, but window size really matters when it comes to software rendering. Decrease the window size to 800x500 (for widescreen)

Re: [pygame] Weird lag

2009-03-01 Thread Daniel Mateos
Zack Schilling wrote: Your game is spending a little over 60% of its time blitting. About 20% is evaluation, and the rest of the work is overhead. That might seems high given the complexity, but window size really matters when it comes to software rendering. Decrease the window size to 800x500

[pygame] Redraw under mouse cursor in HWSURFACE mode

2009-03-01 Thread Lin Parkh
I'm noticing a weird little artifact namely that I get left over fragments of a surface i redraw on to screen where the mouse cursor moves. It appears as if my code is interacting with whatever controls cursor redraw. I notice that this only happens when i go to fullscreen mode and enable

[pygame] GMArcade Contest02 One-Month Left!

2009-03-01 Thread Matthew Kremer
Hello PyGame users, Just wanted to let you know there is still one month left to get your entry in for GMArcade.com's Time contest. I have yet to hear from any PyGame users on wether they are entering, and there are some pretty neat game development books up for grabs. For more info on the

Re: [pygame] Redraw under mouse cursor in HWSURFACE mode

2009-03-01 Thread Jake b
are you using the OS cursor, or blit-ing your own? (ie: hide cursor, and draw cursor sprite ) On Sun, Mar 1, 2009 at 5:19 PM, Lin Parkh lpa...@comcast.net wrote: I'm noticing a weird little artifact namely that I get left over fragments of a surface i redraw on to screen where the mouse cursor

Re: [pygame] Weird lag

2009-03-01 Thread Jake b
Are you re-creating the font surface every frame? Or are you cache-ing the .render() output to .blit() ? On Sat, Feb 28, 2009 at 4:21 PM, Daniel Mateos dan...@mateos.cc wrote: Hey again, 36150.1600.0000.1600.000 {method 'render' of 'pygame.font.Font' objects} Any help

Re: [pygame] Redraw under mouse cursor in HWSURFACE mode

2009-03-01 Thread Lin Parkh
I'm using OS cursor (or whatever pygame defaults to (on windows)). Is that not good practice? - Original Message - From: Jake b To: pygame-users@seul.org Sent: Sunday, March 01, 2009 4:24 PM Subject: Re: [pygame] Redraw under mouse cursor in HWSURFACE mode are you using

Re: [pygame] surfarray on 64-bit machines

2009-03-01 Thread Lenard Lindstrom
Marius Gedminas wrote: Try pygame.surfarray.user_arraytype('numpy') at the start. NumPy became the default only recently with 1.9. Unfortunately, this gives me AttributeError: 'module' object has no attribute 'user_arraytype' I've got pygame 1.8.1 here (Ubuntu's

Re: [pygame] surfarray on 64-bit machines

2009-03-01 Thread René Dudfield
hehe, double typo... 'use_arraytype' http://www.pygame.org/docs/ref/surfarray.html#pygame.surfarray.use_arraytype On Mon, Mar 2, 2009 at 1:43 PM, Lenard Lindstrom le...@telus.net wrote: A typo. It should be user_arraytype.

Re: [pygame] Weird lag

2009-03-01 Thread René Dudfield
hi, try timing some parts... Then you might be able to see where the lag is happening. Each frame you should be able to see that they are similar values. If they are not, you should be able to debug where your delay is. Here's your mainloop end part modified to add a couple of timers in...

Re: [pygame] surfarray on 64-bit machines

2009-03-01 Thread Marius Gedminas
On Mon, Mar 02, 2009 at 02:06:35PM +1100, René Dudfield wrote: hehe, double typo... 'use_arraytype' http://www.pygame.org/docs/ref/surfarray.html#pygame.surfarray.use_arraytype That works better, thanks! I've refactored PySpaceWar's fading title code into three classes now, one that uses

Re: [pygame] surfarray on 64-bit machines

2009-03-01 Thread Lenard Lindstrom
It's the computer, honest. It keeps changing user to user. Oh no, not again. René Dudfield wrote: hehe, double typo... 'use_arraytype' http://www.pygame.org/docs/ref/surfarray.html#pygame.surfarray.use_arraytype On Mon, Mar 2, 2009 at 1:43 PM, Lenard Lindstrom le...@telus.net wrote: A