[pygame] How to manage image source Rect()'s for units

2007-11-12 Thread Jake b
I planned on having one image which had all the frames of the unit's animation. Then based on its direction / or state, I would modify the source rect's before blit. I tried using a pygame.sprite.RenderPlain(), but I couldn't make it use a source rect. What's the best way to handle this? Can I us

Re: Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Alex Holkner
Much as I like all the pyglet discussion, this is getting really off-topic from PyGame... I've created this page which summarises the issue in pyglet and the various options available to developers: http://groups.google.com/group/pyglet-users/web/issues-with-full-screen-resolution Cheers Alex.

Re: Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Richard Jones
Brian Fisher <[EMAIL PROTECTED]> wrote: > > On Nov 12, 2007 3:29 PM, Richard Jones <[EMAIL PROTECTED]> > wrote: > > > be a lot of 3d apps where resolution doesn't matter, but the > bluriness > > > of scaling 1.65 does kill small text and make crisp sharp lines look > > > bad, and it makes pixel

Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Brian Fisher
On Nov 12, 2007 3:29 PM, Richard Jones <[EMAIL PROTECTED]> wrote: > > be a lot of 3d apps where resolution doesn't matter, but the bluriness > > of scaling 1.65 does kill small text and make crisp sharp lines look > > bad, and it makes pixel art distorted. > > With aliasing (GL_NEAREST texture env)

Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Richard Jones
Brian Fisher <[EMAIL PROTECTED]> wrote: > On Nov 12, 2007 1:24 PM, Alex Holkner <[EMAIL PROTECTED]> wrote: > > OpenGL provides many ways to scale a 640x480 viewport up to a higher > > resolution, with or without aliasing (I suspect in this use-case you'd > > prefer the aliasing). > > > there's no w

Re: Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Ian Mallett
On Nov 12, 2007 3:35 PM, Richard Jones <[EMAIL PROTECTED]> wrote: > Ian Mallett <[EMAIL PROTECTED]> wrote: > > Stretched pixels, though. > > If you want your pixels to be square you can alter the glViewport. > I meant like larger ones.

Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Dave LeCompte (really)
"Richard Jones" <[EMAIL PROTECTED]> said: > With aliasing (GL_NEAREST texture env) the display will look exactly the > same as if it was scaled by the monitor. No blurriness. If your rendering window is an exact multiple of the target resolution, sure - a 1280x960 window can provide the same visu

Re: Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Richard Jones
Ian Mallett <[EMAIL PROTECTED]> wrote: > Stretched pixels, though. If you want your pixels to be square you can alter the glViewport. Richard

Re: Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Ian Mallett
Stretched pixels, though. I

Re: [pygame] I'm getting BSOD while using PyGame.

2007-11-12 Thread Brian Fisher
On Nov 12, 2007 12:07 PM, Jake b <[EMAIL PROTECTED]> wrote: > I can get an equivalent c++ program to blit tiles using libSDL to work > fine on both computers. That's why I'm wondering could it have > anything to do with a certain version of PyGame + Python? > What version of libSDL? is it 1.2.10 or

Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Brian Fisher
On Nov 12, 2007 1:24 PM, Alex Holkner <[EMAIL PROTECTED]> wrote: > OpenGL provides many ways to scale a 640x480 viewport up to a higher > resolution, with or without aliasing (I suspect in this use-case you'd > prefer the aliasing). > there's no way to get 640x480 pixel art to look right on a 1024x

Re: [pygame] I'm getting BSOD while using PyGame.

2007-11-12 Thread claxo
Try to shortcut all the fps - cpu caping in your code, see if it crash or freezes. Its seems to me that that all the restrictions are fighting. If doenst crash, we know the problem is in the caping. claxo On 12 Nov 2007 at 14:02, Jake b wrote: > The source is at: http://www.newmech.com/pics/

Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Alex Holkner
On 11/13/07, Phil Hassey <[EMAIL PROTECTED]> wrote: > - The game is pixel art based and only "looks right" at 640x480 OpenGL provides many ways to scale a 640x480 viewport up to a higher resolution, with or without aliasing (I suspect in this use-case you'd prefer the aliasing). > - The game uses

Re: [pygame] I'm getting BSOD while using PyGame.

2007-11-12 Thread Jake b
On Nov 10, 2007 10:36 PM, Brian Fisher <[EMAIL PROTECTED]> wrote: > On Nov 10, 2007 1:30 PM, Jake b <[EMAIL PROTECTED]> wrote: > > for rendering. But running it, caused my computer to get a Blue Screen Of > > Death. > > > Blue Screen of Death on Windows XP means an error in kernel mode, > always, n

Re: [pygame] I'm getting BSOD while using PyGame.

2007-11-12 Thread Jake b
The source is at: http://www.newmech.com/pics/ZombieHunt_v0.2-BSOD.zip > > If you want more feedback, post more code ( from the non numeric > version, to keep it easy) > Cheers > > claxo > I attached the source of the version that always crashes on one computer, but never on the other. ( So maybe

Re: [pygame] I\'m getting BSOD while using PyGame.

2007-11-12 Thread Jake b
I snipped out a bunch of your code fixes from this reply, except where I didn't understand them. > > The code was \"x = ones( ( 3, 4 ) )\" > > Not enought context to tell wat was going . What is \'ones\' ? That was a function from PyNum module, following the tutorial. It's supposed to initialize

Re: [pygame] ANN: pyglet 1.0beta1

2007-11-12 Thread Phil Hassey
Hmmn... That sounds like an excellent default behavior. However there are a good are good reasons for wanting to change the screen resolution: - The game is pixel art based and only "looks right" at 640x480 - The game uses a lot of high-powered features and the game wishes to give the end user

Re: [pygame] New on the mailing list with a strange FPS behavior

2007-11-12 Thread Simon Wittber
On Nov 12, 2007 4:29 PM, Ghislain Leveque <[EMAIL PROTECTED]> wrote: > > And I can see the freezing. Put a time.sleep(0) call in your inner loop. The problem will likely go away. -- :: Simon Wittber :: http://www.linkedin.com/in/simonwittber :: phone: +61.4.0135.0685 :: jabber/m

Re: [pygame] New on the mailing list with a strange FPS behavior

2007-11-12 Thread claxo
I seems to remember time.time() is prefered to calculate delta times? Anybody ? On 12 Nov 2007 at 8:29, Ghislain Leveque wrote: > First I will explain how I did measure and what make me think it's the > draw that stucks : > ... > def post(self,event): > for listener in self.listeners: > now

Re: [pygame] New on the mailing list with a strange FPS behavior

2007-11-12 Thread claxo
Look at the module gc in the global module index of Python docs, but in a pinch: import gc ... gc.collect( ) Don't put into a tight loop, this waste cpu time. claxo On 12 Nov 2007 at 8:30, Ghislain Leveque wrote: > 2007/11/12, claxo <[EMAIL PROTECTED]>: > > On 11 Nov 2007 at 22:41, Ghislain

Re: [pygame] New on the mailing list with a strange FPS behavior

2007-11-12 Thread Noah Kantrowitz
Ghislain Leveque wrote: > 2007/11/12, claxo <[EMAIL PROTECTED]>: > >> On 11 Nov 2007 at 22:41, Ghislain Leveque wrote: >> >>> Today I've come into a strange behavior with my rendering loop. >>> > > >> 3. Memory garbage collection kicks in. you can try to do a explicit >> garbage c