Re: [pygame] Testing pygame 1.8rc4 on PPC build (was: Mac OS X Rosetta (PPC))

2008-03-04 Thread René Dudfield
ah, thanks heaps.  I think I know how to fix that problem.

I don't think the png, and jpeg libraries were compiled as universal
binaries.  I'll try it again... tomorrow.

But in the mean time, are you able to try these builds from the compile farm?
http://thorbrian.com/pygame/builds.php


cheers,



On Wed, Mar 5, 2008 at 6:52 PM, Casey Duncan <[EMAIL PROTECTED]> wrote:
> On Mar 4, 2008, at 11:00 PM, René Dudfield wrote:
>
>  > Hi Casey,
>  >
>  > have you tried the new pygame build with your PPC computer?
>  >
>  > I think it should be a fair bit faster than pygame 1.7.1.
>  >
>  > There's a link to it on the pygame downloads page, if you haven't
>  > tried it out.
>  > http://pygame.org/download.shtml
>  >
>  > It'd be cool if you could test it out, because we haven't had all that
>  > many testers of it yet.
>
>
>  I gave it a shot (MocOS 10.4), but it is unable to load png images
>  (pygame.error: File is not a windows BMP file). I tried loading a
>  libpng/libjpeg binary and then reinstalling pygame, but that didn't
>  help. Note I do have 1.7.1 installed via fink and it doesn't have this
>  problem.
>
>  Is there something else I need to install?
>
>  -Casey


[pygame] Testing pygame 1.8rc4 on PPC build (was: Mac OS X Rosetta (PPC))

2008-03-04 Thread Casey Duncan

On Mar 4, 2008, at 11:00 PM, René Dudfield wrote:


Hi Casey,

have you tried the new pygame build with your PPC computer?

I think it should be a fair bit faster than pygame 1.7.1.

There's a link to it on the pygame downloads page, if you haven't  
tried it out.

http://pygame.org/download.shtml

It'd be cool if you could test it out, because we haven't had all that
many testers of it yet.



I gave it a shot (MocOS 10.4), but it is unable to load png images  
(pygame.error: File is not a windows BMP file). I tried loading a  
libpng/libjpeg binary and then reinstalling pygame, but that didn't  
help. Note I do have 1.7.1 installed via fink and it doesn't have this  
problem.


Is there something else I need to install?

-Casey

Re: [pygame] Mac OS X Rosetta (PPC)

2008-03-04 Thread René Dudfield
Hi Casey,

have you tried the new pygame build with your PPC computer?

I think it should be a fair bit faster than pygame 1.7.1.

There's a link to it on the pygame downloads page, if you haven't tried it out.
http://pygame.org/download.shtml

It'd be cool if you could test it out, because we haven't had all that
many testers of it yet.

cheers,



On Wed, Mar 5, 2008 at 5:14 PM, Casey Duncan <[EMAIL PROTECTED]> wrote:
>
> On Mar 4, 2008, at 8:59 PM, Sean Berry wrote:
>
>  > I just rebuilt my pygame program under Mac OS X, using the Python
>  > 2.4 universal binary, and while it runs fine on my Intel Mac (just
>  > like it ran fine when I didn't use universal binaries), when I pass
>  > it through Rosetta to simulate a PPC Mac, it runs very slowly.
>  >
>  > Basically, should I blame myself, or is there a known issue with
>  > pygame and PPC Macs?
>
>  My assumption is that rosetta emulates a PPC processor on intel. Such
>  processor-level emulation is typically much slower than running on the
>  native processor (even if the Intel processor is significantly faster
>  than the PPC it emulates). It's probably only useful for smoke-testing
>  (i.e., does it work at all?) for games since they are so performance
>  sensitive.
>
>  I have an Intel and PPC mac at home and pygame runs fine on both. The
>  PPC is a few times slower, but its performance is adequate. One game I
>  wrote defaulted to a lower res on PPC so it would be fast enough.
>
>  -Casey
>


Re: [pygame] Mac OS X Rosetta (PPC)

2008-03-04 Thread Casey Duncan

On Mar 4, 2008, at 8:59 PM, Sean Berry wrote:

I just rebuilt my pygame program under Mac OS X, using the Python  
2.4 universal binary, and while it runs fine on my Intel Mac (just  
like it ran fine when I didn't use universal binaries), when I pass  
it through Rosetta to simulate a PPC Mac, it runs very slowly.


Basically, should I blame myself, or is there a known issue with  
pygame and PPC Macs?


My assumption is that rosetta emulates a PPC processor on intel. Such  
processor-level emulation is typically much slower than running on the  
native processor (even if the Intel processor is significantly faster  
than the PPC it emulates). It's probably only useful for smoke-testing  
(i.e., does it work at all?) for games since they are so performance  
sensitive.


I have an Intel and PPC mac at home and pygame runs fine on both. The  
PPC is a few times slower, but its performance is adequate. One game I  
wrote defaulted to a lower res on PPC so it would be fast enough.


-Casey


Re: [pygame] Mac OS X Rosetta (PPC)

2008-03-04 Thread Sean Berry
Well, first I made an app with py2app. After that you select the app, hit
Apple->I, then check the "Run under Rosetta" checkbox.

On Tue, Mar 4, 2008 at 9:06 PM, René Dudfield <[EMAIL PROTECTED]> wrote:

> It should work fine with PPC macs.
>
> How do you run it under Rosetta?  I'd like to give it a try here.
>
>
> On Wed, Mar 5, 2008 at 3:59 PM, Sean Berry <[EMAIL PROTECTED]> wrote:
> > I just rebuilt my pygame program under Mac OS X, using the Python 2.4
> > universal binary, and while it runs fine on my Intel Mac (just like it
> ran
> > fine when I didn't use universal binaries), when I pass it through
> Rosetta
> > to simulate a PPC Mac, it runs very slowly.
> >
> > Basically, should I blame myself, or is there a known issue with pygame
> and
> > PPC Macs?
> >
> > Thanks,
> > Sean
>


Re: [pygame] how to display pygame graphics within a wxpython window

2008-03-04 Thread René Dudfield
hi,

Using pygame with wxpython is not supported.  See this page for details:
http://www.pygame.org/wiki/Gui


cheers,


On Wed, Mar 5, 2008 at 4:01 PM, Sibtey Mehdi <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi
>
> How to display pygame graphics within a wxpython window. I have
> tried the last example on http://wiki.wxpython.org/IntegratingPyGame but it
> opens the two separate window one for pygame one for frame. I want to create
> one frame that can use the pygame  drawing functionality.
>
>
>
>
>
> Thanks.
>
> Sibtey


Re: [pygame] Mac OS X Rosetta (PPC)

2008-03-04 Thread René Dudfield
It should work fine with PPC macs.

How do you run it under Rosetta?  I'd like to give it a try here.


On Wed, Mar 5, 2008 at 3:59 PM, Sean Berry <[EMAIL PROTECTED]> wrote:
> I just rebuilt my pygame program under Mac OS X, using the Python 2.4
> universal binary, and while it runs fine on my Intel Mac (just like it ran
> fine when I didn't use universal binaries), when I pass it through Rosetta
> to simulate a PPC Mac, it runs very slowly.
>
> Basically, should I blame myself, or is there a known issue with pygame and
> PPC Macs?
>
> Thanks,
> Sean


[pygame] how to display pygame graphics within a wxpython window

2008-03-04 Thread Sibtey Mehdi
Hi

How to display pygame graphics within a wxpython window. I have
tried the last example on http://wiki.wxpython.org/IntegratingPyGame but it
opens the two separate window one for pygame one for frame. I want to create
one frame that can use the pygame  drawing functionality.

 

 

Thanks.

Sibtey 



[pygame] Mac OS X Rosetta (PPC)

2008-03-04 Thread Sean Berry
I just rebuilt my pygame program under Mac OS X, using the Python
2.4universal binary, and while it runs fine on my Intel Mac (just like
it ran
fine when I didn't use universal binaries), when I pass it through Rosetta
to simulate a PPC Mac, it runs very slowly.

Basically, should I blame myself, or is there a known issue with pygame and
PPC Macs?

Thanks,
Sean


Re: [pygame] space ships (Re: Misnamed threads (Re: Posting styles (Re: Text To Speech PYTTS)))

2008-03-04 Thread AlgoMantra
> That's like saying that an ocean liner isn't
> > a ship because it wouldn't be able to get off
> > the ground into the sea by itself.
>
>

It has the body of a lion, and the head of a lion,
but does that, in fact, make it a lion?

----.-
1/f   )))  --.
---...
http://www.algomantra.com


Re: [pygame] space ships (Re: Misnamed threads (Re: Posting styles (Re: Text To Speech PYTTS)))

2008-03-04 Thread Ian Mallett
On Tue, Mar 4, 2008 at 1:19 PM, Greg Ewing <[EMAIL PROTECTED]>
wrote:

> Ian Mallett wrote:
> > hmmm.
> > I would not define the space shuttle as a space ship because it requires
> > an external fuel tank and two extra rockets to get into space.
> That's like saying that an ocean liner isn't
> a ship because it wouldn't be able to get off
> the ground into the sea by itself.

hmmm.
I see your point.
still wouldn't classify the space shuttle as a "space ship", as the shuttle
cannot travel the deeps of space.
This is sort of like the early submarines, which were more submerge-able
battleships than a real underwater boat.  These craft were designed to
attack above surface, and only submerge to hide.
So, either the space shuttle is not a "space ship" because it cannot be used
practically, or it is not a "space ship" because it can't really stay in
space very well.
Ian


Re: [pygame] space ships (Re: Misnamed threads (Re: Posting styles (Re: Text To Speech PYTTS)))

2008-03-04 Thread Adam Bark
>
> On Mon, Mar 3, 2008 at 4:59 PM, Adam Bark <[EMAIL PROTECTED]> wrote:
>
> > Cool cos I'm trying to right a game involving spaceships, it's 3d
> >
> http://www.turbosquid.com/3d
> Ian
>
Thanks

On 04/03/2008, Greg Ewing <[EMAIL PROTECTED]> wrote:
>
> Adam Bark wrote:
>
> > Cool cos I'm trying to right a game involving spaceships, it's 3d
>
>
> Make sure you include a garage to keep them in!
>
> --
>
> Greg
>

Will do.


Re: [pygame] space ships (Re: Misnamed threads (Re: Posting styles (Re: Text To Speech PYTTS)))

2008-03-04 Thread Greg Ewing

Ian Mallett wrote:

hmmm.
I would not define the space shuttle as a space ship because it requires 
an external fuel tank and two extra rockets to get into space.


That's like saying that an ocean liner isn't
a ship because it wouldn't be able to get off
the ground into the sea by itself.

Many of the ships in science fiction are
always in space and never land or take off at
all. I don't see that disqualifying them from
being *space* ships.

If we ever end up sending a manned mission to
mars, the main vehicle will probably be assembled
in space and remain there. To me that makes it
even more of a "ship of space".

--
Greg


Re: [pygame] Announce: pygame 1.8.0rc4 tar ball.

2008-03-04 Thread René Dudfield
hi,

yeah, we changed clock.tick to use the non cpu chewing one.  Just
because by default we should try to save energy.


To get the old behaviour on different pygame versions, you could use
something like:

if hasattr(clock , "tick_busy_loop"):
tick = clock.tick_busy_loop
else:
tick = clock.tick


However, I think it's best to use less power in general :)  Or to make
it an option for game players.



cu,


On Wed, Mar 5, 2008 at 4:54 AM, PyMike <[EMAIL PROTECTED]> wrote:
> Hmm... I played one of my more recent games, and sometimes moving stuff will
> jerk around a little bit. I used clock.tick_busy_loop and it seemed to go
> away...
>
>
>
> On Tue, Mar 4, 2008 at 11:51 AM, PyMike <[EMAIL PROTECTED]> wrote:
>
> > Aye. I always use clock.tick. Well this is awesome that games can now run
> fast and not chew up CPU! Thank you pygame! :D
> >
> >
> >
> >
> >
> > On Tue, Mar 4, 2008 at 11:45 AM, Brian Fisher <[EMAIL PROTECTED]>
> wrote:
> >
> > > I assume that's with games using Clock.tick?
> > >
> > > I think vs. 1.7 pygame 1.8 changed Clock.tick to be more cpu friendly:
> > > http://www.pygame.org/docs/ref/time.html#Clock.tick
> > >
> > > Clock.tick_busy_loop would be a CPU unfriendly alternative.
> > >
> > >
> > >
> > >
> > > On Tue, Mar 4, 2008 at 7:00 AM, PyMike <[EMAIL PROTECTED]> wrote:
> > > > Has anyone noticed that now games running at 60 fps are only using
> 10-16% of
> > > > the CPU?
> > > >
> > >
> >
> >
> >
> > --
> > - PyMike
>
>
>
> --
> - PyMike


[pygame] Re: Announce: pygame 1.8.0rc4 tar ball.

2008-03-04 Thread René Dudfield
Mac osx rc4 binary packages too:  http://pygame.org/download.shtml

Follow the link to the mac osx page.

cu.

On Mon, Mar 3, 2008 at 11:00 PM, René Dudfield <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I've tagged pygame1.8.0rc4.
>
>  Here's the tar ball for testing:
>  http://rene.f0o.com/~rene/stuff/pygame-1.8.0rc4.tar.gz
>
>  md5sum
>  4e07b4a68ebc1773f7a2ad557b6adc6c  pygame-1.8.0rc4.tar.gz
>
>
>  Mac OSX, and windows binary installers are coming soon.
>
>  It's also tagged in subversion as 1.8.0rc4.
>
>  The todo so far is:
>  - test builds with vista mods, so they install nicely without
>  administrator privs.
> - need to test with added manifest.
>  - update the credits file... we need to go through the WHATSNEW file
>  and add credits for all the contributions to pygame since the last
>  release.
>
>  and I think that is it.  I'll hopefully be able to test the manifest
>  stuff on a vista laptop tomorrow night.
>
>  Now we can test the tar ball, get the binaries out, test them a bit
>  more, and then release 1.8.0release in a week or so.  Assuming there
>  are no big issues :)
>
>
>  cu,
>


Re: [pygame] Announce: pygame 1.8.0rc4 tar ball.

2008-03-04 Thread PyMike
Hmm... I played one of my more recent games, and sometimes moving stuff will
jerk around a little bit. I used clock.tick_busy_loop and it *seemed* to go
away...

On Tue, Mar 4, 2008 at 11:51 AM, PyMike <[EMAIL PROTECTED]> wrote:

> Aye. I always use clock.tick. Well this is awesome that games can now run
> fast and not chew up CPU! Thank you pygame! :D
>
>
> On Tue, Mar 4, 2008 at 11:45 AM, Brian Fisher <[EMAIL PROTECTED]>
> wrote:
>
> > I assume that's with games using Clock.tick?
> >
> > I think vs. 1.7 pygame 1.8 changed Clock.tick to be more cpu friendly:
> > http://www.pygame.org/docs/ref/time.html#Clock.tick
> >
> > Clock.tick_busy_loop would be a CPU unfriendly alternative.
> >
> > On Tue, Mar 4, 2008 at 7:00 AM, PyMike <[EMAIL PROTECTED]> wrote:
> > > Has anyone noticed that now games running at 60 fps are only using
> > 10-16% of
> > > the CPU?
> > >
> >
>
>
>
> --
> - PyMike




-- 
- PyMike


Re: [pygame] Announce: pygame 1.8.0rc4 tar ball.

2008-03-04 Thread PyMike
Aye. I always use clock.tick. Well this is awesome that games can now run
fast and not chew up CPU! Thank you pygame! :D

On Tue, Mar 4, 2008 at 11:45 AM, Brian Fisher <[EMAIL PROTECTED]>
wrote:

> I assume that's with games using Clock.tick?
>
> I think vs. 1.7 pygame 1.8 changed Clock.tick to be more cpu friendly:
> http://www.pygame.org/docs/ref/time.html#Clock.tick
>
> Clock.tick_busy_loop would be a CPU unfriendly alternative.
>
> On Tue, Mar 4, 2008 at 7:00 AM, PyMike <[EMAIL PROTECTED]> wrote:
> > Has anyone noticed that now games running at 60 fps are only using
> 10-16% of
> > the CPU?
> >
>



-- 
- PyMike


Re: [pygame] Announce: pygame 1.8.0rc4 tar ball.

2008-03-04 Thread Brian Fisher
I assume that's with games using Clock.tick?

I think vs. 1.7 pygame 1.8 changed Clock.tick to be more cpu friendly:
http://www.pygame.org/docs/ref/time.html#Clock.tick

Clock.tick_busy_loop would be a CPU unfriendly alternative.

On Tue, Mar 4, 2008 at 7:00 AM, PyMike <[EMAIL PROTECTED]> wrote:
> Has anyone noticed that now games running at 60 fps are only using 10-16% of
> the CPU?
>


Re: [pygame] your opinion: singleton-pattern vs. modules vs. classes

2008-03-04 Thread Marius Gedminas
Hi,

On Mon, Mar 03, 2008 at 05:09:12PM +0100, Olaf Nowacki wrote:
> probably most of you use an mvc aproach for writing games with pygame.
> i would like to know how you implement these (mvc-) objects:
> 
> - as classes
> - as modules or
> - as singleton-pattern classes?

Classes.  I see no point to add a restriction of at most one game in a
Python process.

Regards,
Marius Gedminas
-- 
Computers are not intelligent.  They only think they are.


signature.asc
Description: Digital signature


Re: [pygame] space ships (Re: Misnamed threads (Re: Posting styles (Re: Text To Speech PYTTS)))

2008-03-04 Thread PyMike
Awesome, Nick!

On Tue, Mar 4, 2008 at 5:39 AM, Nick Moffitt <[EMAIL PROTECTED]> wrote:

> René Dudfield:
> > I like space ships.
>
> I made some fun Pixel Spaceships:
>
>
> http://zork.net/~nick/pixel/blackspace.py
>
> They're based on http://www.davebollinger.com/works/pixelspaceships/
>
> I think they're neat, even if that code is a terrible example of pygame
> coding.
>
> --
> "These people program the way Victorians dress.  Nick Moffitt
> It takes two hours and three assistants to put on   [EMAIL PROTECTED]
> your clothes, and you have to change before dinner.
> But everything is modular."-- Miles Nordin, on PAM
>



-- 
- PyMike


Re: [pygame] Announce: pygame 1.8.0rc4 tar ball.

2008-03-04 Thread PyMike
Has anyone noticed that now games running at 60 fps are only using 10-16% of
the CPU?

On Mon, Mar 3, 2008 at 1:16 PM, Lenard Lindstrom <[EMAIL PROTECTED]> wrote:

> I have updated all installers and document bundles on my site* to rc4.
> So the msi installer is ready for a Vista trial.
>
> Slightly off topic, but one thing I remembered is that the MMX scaling
> code Richard Goedeken so generously donated in not used in Visual C
> builds. The MMX code is in AT&T form, not used by masm. So the options
> are to add an masm translation of the code to transform.c or just use
> the MinGW compiled transform.pyd. Of course VC may be clever enough to
> do its own MMX optimization.
>
>
> Lenard
>
> *  http://www3.telus.net/len_l/pygame.htm
>
> md5sums:
>
> 9d703bc98c8c9072111409fb08208338 *pygame-1.8.0rc4.win32-py2.5.exe
> 38bc762790f190c13e4ef9431240007b *pygame-1.8.0a0.win32-py2.4.msi
> fb402e329d1e4e18071ee96e7cdda7fe *pygame-1.8.0rc4.win32-py2.4.exe
> 38bc762790f190c13e4ef9431240007b *pygame-1.8.0a0.win32-py2.4.msi
> c0efabf383c42652b384085a3311ef6b *pygame-1.8-docs-setup.exe
>
>
> René Dudfield wrote:
> > Hi,
> >
> > I've tagged pygame1.8.0rc4.
> >
> [snip]
> >
> > Mac OSX, and windows binary installers are coming soon.
> >
> > It's also tagged in subversion as 1.8.0rc4.
> >
> > The todo so far is:
> > - test builds with vista mods, so they install nicely without
> > administrator privs.
> > - need to test with added manifest.
> > - update the credits file... we need to go through the WHATSNEW file
> > and add credits for all the contributions to pygame since the last
> > release.
> >
> >
> [snip]
> > I'll hopefully be able to test the manifest
> > stuff on a vista laptop tomorrow night.
> >
> >
>



-- 
- PyMike


Re: [pygame] event.wait and userevents

2008-03-04 Thread Christian Reichlin

thanks for the input.
i just found out that it works properly either way. the application is 
for the olpc and the problem occurs only when run as an olpc activity 
inside an emulator.


Gary Bishop schrieb:

I think the problem is the way you are using it. This works fine for me.

pygame.time.set_timer(pygame.USEREVENT, 1000)

while True:
event = pygame.event.wait()
if event.type == pygame.QUIT:
break
elif event.type == pygame.USEREVENT:
print 'timer'



Christian Reichlin wrote:

hello,

i made a litte app with pygame. i had troubles with the event loop 
using pygame.event.wait and userevents, triggered by 
pygame.time.set_timer(pygame.USEREVENT, 1000)


the following code didn't work. it looks like during 
pygame.event.wait() userevents aren't processed internally. as long 
as no other event got triggered, the loop blocked.

   ...
   for event in [ pygame.event.wait() ] + pygame.event.get( ):
   # event handling code




Re: [pygame] event.wait and userevents

2008-03-04 Thread Gary Bishop

I think the problem is the way you are using it. This works fine for me.

pygame.time.set_timer(pygame.USEREVENT, 1000)

while True:
event = pygame.event.wait()
if event.type == pygame.QUIT:
break
elif event.type == pygame.USEREVENT:
print 'timer'



Christian Reichlin wrote:

hello,

i made a litte app with pygame. i had troubles with the event loop using 
pygame.event.wait and userevents, triggered by 
pygame.time.set_timer(pygame.USEREVENT, 1000)


the following code didn't work. it looks like during pygame.event.wait() 
userevents aren't processed internally. as long as no other event got 
triggered, the loop blocked.

   ...
   for event in [ pygame.event.wait() ] + pygame.event.get( ):
   # event handling code


[pygame] event.wait and userevents

2008-03-04 Thread Christian Reichlin

hello,

i made a litte app with pygame. i had troubles with the event loop using 
pygame.event.wait and userevents, triggered by 
pygame.time.set_timer(pygame.USEREVENT, 1000)


the following code didn't work. it looks like during pygame.event.wait() 
userevents aren't processed internally. as long as no other event got 
triggered, the loop blocked.

   ...
   for event in [ pygame.event.wait() ] + pygame.event.get( ):
   # event handling code

wehn i replace it with
   ...
   for event in get_events():
   #event handling code

def get_events()
   while True:
   evs = pygame.event.get()
   if len(evs) > 0:
   return evs
   pygame.time.wait(100)
   pygame.event.pump()

it works as expected.

i'm a bit irritated by this behavior. i think pygame.event.wait should 
either call pygame.event.pump periodically or the pygame.time.set_timer 
should call pygame.event.pump after adding an event. if there are 
reasons for this it would be nice if the documentation for 
pygame.event.wait notes this behavior.


maybe i also got something completely wrong and my problem is somewhere 
else, im new to python and pygame :-) in either case i'd be happy if 
someone can give me a short feedback on this.


thanks
chrigi
  



Re: [pygame] space ships (Re: Misnamed threads (Re: Posting styles (Re: Text To Speech PYTTS)))

2008-03-04 Thread Nick Moffitt
René Dudfield:
> I like space ships.

I made some fun Pixel Spaceships:

http://zork.net/~nick/pixel/blackspace.py

They're based on http://www.davebollinger.com/works/pixelspaceships/

I think they're neat, even if that code is a terrible example of pygame
coding.

-- 
"These people program the way Victorians dress.  Nick Moffitt
It takes two hours and three assistants to put on   [EMAIL PROTECTED]
your clothes, and you have to change before dinner.
But everything is modular."-- Miles Nordin, on PAM