[pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread René Dudfield
Hey,

I was thinking it would be nicer for users if we produced a pygame which
statically linked SDL_image SDL_mixer etc?

Now that they have a more permissive licence, I don't see any issue with
this from that side.

The main benefit is that pygame will be easier to install on OSX, because it
won't need to install SDL into the Frameworks directories.  The main bad
point is that it is harder for people to just drop in a new SDL_image or
version of SDL.

Any thoughts on this?


Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread Lenard Lindstrom
If SDL_mixer and SDL_image were used by only one extension module each 
it would work. But both mixer and mixer.music link to SDL_mixer, and 
SDL_image is linked to by image and imageext.


Lenard

On 29/07/11 11:29 PM, René Dudfield wrote:

Hey,

I was thinking it would be nicer for users if we produced a pygame 
which statically linked SDL_image SDL_mixer etc?


Now that they have a more permissive licence, I don't see any issue 
with this from that side.


The main benefit is that pygame will be easier to install on OSX, 
because it won't need to install SDL into the Frameworks directories.  
The main bad point is that it is harder for people to just drop in a 
new SDL_image or version of SDL.


Any thoughts on this?




Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread René Dudfield
ah, of course.  You're right.


On Sat, Jul 30, 2011 at 7:37 AM, Lenard Lindstrom le...@telus.net wrote:

 If SDL_mixer and SDL_image were used by only one extension module each it
 would work. But both mixer and mixer.music link to SDL_mixer, and SDL_image
 is linked to by image and imageext.

 Lenard


 On 29/07/11 11:29 PM, René Dudfield wrote:

 Hey,

 I was thinking it would be nicer for users if we produced a pygame which
 statically linked SDL_image SDL_mixer etc?

 Now that they have a more permissive licence, I don't see any issue with
 this from that side.

 The main benefit is that pygame will be easier to install on OSX, because
 it won't need to install SDL into the Frameworks directories.  The main bad
 point is that it is harder for people to just drop in a new SDL_image or
 version of SDL.

 Any thoughts on this?





Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread René Dudfield
Instead, I could try and put the SDL*.framework into the
site-packages/pygame folder.  That would give the same benefits of making
the install easier I think.  It would mean, not requiring root access to
install pygame.

cu.


Re: [pygame] Patch for win-amd64

2011-07-30 Thread René Dudfield
On Thu, Jul 28, 2011 at 4:37 PM, Lenard Lindstrom le...@telus.net wrote:

 René,

 Make the format string a macro that is (ll) for Python 2.4, (nn) for
 everything else.


Cool, I'll do that (once my python2.4 machine is working again).

I've applied the patch in the mean time.


It also fixes the test failures on OS X 10.7 64bit.  There are a couple of
failing tests left though on OS X.  I think they are related, but the errors
were there before the patch.

==
FAIL: PixelcopyModuleTest.test_map_array
--
Traceback (most recent call last):
  File
/Library/Python/2.7/site-packages/pygame-1.9.2pre-py2.7-macosx-10.7-intel.egg/pygame/tests/pixelcopy_test.py,
line 171, in test_map_array
posn))
AssertionError: 4278190080 != -16777216: flags: 65536, bpp: 32, posn: (0, 0)

==
FAIL: SurfarrayModuleTest.test_array2d
--
Traceback (most recent call last):
  File
/Library/Python/2.7/site-packages/pygame-1.9.2pre-py2.7-macosx-10.7-intel.egg/pygame/tests/surfarray_test.py,
line 154, in test_array2d
posn))
AssertionError: -16114116 != 4278853180: flags: 65536, bpp: 32, posn: (0, 0)

--


[pygame] Scrolling background

2011-07-30 Thread Samuel Mankins

Hello!
Forgive me if this is a trivial question.
What is the nicest way to go about having a background which moves at a 
constant speed in one direction (as in a side-scrolling shooter)? Right 
now, I draw all the sprites onto the background image, which is moving, 
and then draw that onto the screen, but is there a neater way?

Thank you!


Re: [pygame] Scrolling background

2011-07-30 Thread NBarnes
Samuel Mankins waterfli...@speakeasy.net wrote:


 Forgive me if this is a trivial question.
 What is the nicest way to go about having a background which moves at a
 constant speed in one direction (as in a side-scrolling shooter)? Right now,
 I draw all the sprites onto the background image, which is moving, and then
 draw that onto the screen, but is there a neater way?

You have a background that you want to scroll, so it's bigger than the
screen, right?  However it pleases you to do so, determine which
subsection of the background you want to display that frame, then draw
that onto the screen, then draw the sprites on top of that.


Pygame for the Lion(pre). Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread René Dudfield
Hi,

here's a test for pygame on Lion with the apple supplied python2.7.

http://rene.f0o.com/~rene/stuff/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip

I don't think it'll work on anything but Lion and Snow Leopard (10.6 and
10.7).

I don't have a 10.5 machine to test with at the moment, so if anyone can
confirm that it doesn't work that'd be swell.

cheers,


On Sat, Jul 30, 2011 at 7:44 AM, René Dudfield ren...@gmail.com wrote:

 Instead, I could try and put the SDL*.framework into the
 site-packages/pygame folder.  That would give the same benefits of making
 the install easier I think.  It would mean, not requiring root access to
 install pygame.

 cu.



Re: Pygame for the Lion(pre). Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread Brian Fisher
I had heard that SDL's fullscreen crashes on Lion, have you experienced that
problem with pygame on your lion machine? Did you do some kind of workaround
for that?

On Sat, Jul 30, 2011 at 10:36 AM, René Dudfield ren...@gmail.com wrote:

 Hi,

 here's a test for pygame on Lion with the apple supplied python2.7.

 http://rene.f0o.com/~rene/stuff/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip

 I don't think it'll work on anything but Lion and Snow Leopard (10.6 and
 10.7).

 I don't have a 10.5 machine to test with at the moment, so if anyone can
 confirm that it doesn't work that'd be swell.

 cheers,


 On Sat, Jul 30, 2011 at 7:44 AM, René Dudfield ren...@gmail.com wrote:

 Instead, I could try and put the SDL*.framework into the
 site-packages/pygame folder.  That would give the same benefits of making
 the install easier I think.  It would mean, not requiring root access to
 install pygame.

 cu.





Re: Pygame for the Lion(pre). Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread Keith Nemitz

Your build of pygame doesn't install on snow leopard. Apple Python 2.7 is only 
on Lion. I tried the python.org mac 2.7, but no go.


--- On Sat, 7/30/11, René Dudfield ren...@gmail.com wrote:

From: René Dudfield ren...@gmail.com
Subject: Pygame for the Lion(pre). Re: [pygame] static linking SDL, SDL_image, 
SDL_mixer etc on OS X
To: pygame-users@seul.org
Date: Saturday, July 30, 2011, 10:36 AM

Hi,

here's a test for pygame on Lion with the apple supplied python2.7.

http://rene.f0o.com/~rene/stuff/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip


I don't think it'll work on anything but Lion and Snow Leopard (10.6 and 
10.7).  

I don't have a 10.5 machine to test with at the moment, so if anyone can 
confirm that it doesn't work that'd be swell.


cheers,


On Sat, Jul 30, 2011 at 7:44 AM, René Dudfield ren...@gmail.com wrote:

Instead, I could try and put the SDL*.framework into the site-packages/pygame 
folder.  That would give the same benefits of making the install easier I 
think.  It would mean, not requiring root access to install pygame.



cu.





Re: [pygame] static linking SDL, SDL_image, SDL_mixer etc on OS X

2011-07-30 Thread Greg Ewing

René Dudfield wrote:
Instead, I could try and put the SDL*.framework into the 
site-packages/pygame folder.  That would give the same benefits of 
making the install easier I think.  It would mean, not requiring root 
access to install pygame.


I'd be wary about doing anything non-standard with frameworks.
If the user *does* happen to have an SDL framework installed
in one of the usual places, he will probably expect that
version to be used rather than one buried somewhere unexpected.

Frameworks can be installed in ~/Library/Frameworks without
requiring root access.

--
Greg




Re: [pygame] Scrolling background

2011-07-30 Thread Samuel Mankins

All right, that's pretty much what I'm doing. Thank you!

On 7/30/11 12:56 PM, NBarnes wrote:

Samuel Mankinswaterfli...@speakeasy.net  wrote:



Forgive me if this is a trivial question.
What is the nicest way to go about having a background which moves at a
constant speed in one direction (as in a side-scrolling shooter)? Right now,
I draw all the sprites onto the background image, which is moving, and then
draw that onto the screen, but is there a neater way?

You have a background that you want to scroll, so it's bigger than the
screen, right?  However it pleases you to do so, determine which
subsection of the background you want to display that frame, then draw
that onto the screen, then draw the sprites on top of that.