[pygame] Keeping a sprite on screen with rect.clamp

2010-08-15 Thread Mark Reed
In my pygame code I am using rect.clamp to keep sprites within a screen or gameboard, where I clamp and if the center was moved I recalculate the sprite's movement like so: ctr = self.rect.center self.rect = self.rect.clamp(self.clamp_rect) if self.rect.center

Re: [pygame] Keeping a sprite on screen with rect.clamp

2010-08-15 Thread Lenard Lindstrom
Hi, Only x, y, width and height are stored. Everything else is calculated when used. Lenard Lindstrom On 15/08/10 01:41 AM, Mark Reed wrote: In my pygame code I am using rect.clamp to keep sprites within a screen or gameboard, where I clamp and if the center was moved I recalculate the

Re: [pygame] Forcing sprites to use specific palette entries?

2010-08-15 Thread Thiago Chaves
You need an image editor that gves you an easy way to keep track of the color index of your palettes. =) -Thiago On Fri, Aug 13, 2010 at 6:32 PM, John Anderson corporalmust...@gmail.com wrote: yes, I have, unfortunatley that still doesnt mean I can specify where the colours are placed on even

Re: [pygame] Forcing sprites to use specific palette entries?

2010-08-15 Thread John Anderson
I actually have one, but I would like if it were possible to alter which palette entries are used by pygame in real-time, what it seems happens when I .convert() an image, it loses it's unique palette data and just uses the basic pygame palette, but if I don't convert it, it makes it difficult to

[pygame] Pygame on 2nd monitor

2010-08-15 Thread Scott Sumner
Hello all, I'm trying to run my pygame application on my laptop's VGA output so I have an operator view on the laptop screen and a public view on the external screen. They are using two different processes and communicating via TCP so that's not an issue. The only problem I'm having is that as

Re: [pygame] Pygame on 2nd monitor

2010-08-15 Thread Luke Paireepinart
Hey can't test right now but search the list archives, there is a way to specify which monitor the surface is on. IIRC it's not very hard to do. Let us know of you can't find it or if you figure it out, I'd be interested to know what you do. It's pretty easy to do with pyglet. Sent from my

Re: [pygame] Forcing sprites to use specific palette entries?

2010-08-15 Thread Thiago Chaves
Have you seen this? http://www.pygame.org/docs/ref/display.html#pygame.display.set_palette If that's not the missing piece in your puzzle, then it's time for you to start posting sample code and images so we can reproduce your issue. -Thiago On Sun, Aug 15, 2010 at 10:12 PM, John Anderson