pygame development


17 posts
by Yam » Fri Jun 22, 2012 12:45 pm
Is anyone working on porting pygame to the raspberry?
My current project is heavily based on pygame.

How long is it expected to be before the binary blob for the graphics is complete?
How long before sound?

Does anyone know if pygame is being developed in parrelell to these things?
Does anyone know if pygame is defiantly being ported?
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by andyl » Fri Jun 22, 2012 3:11 pm
Yes pygame runs on the pi - why wouldn't it.

I don't do sound but I can't see why it wouldn't work. pygame doesn't handle the low-level stuff itself.

As for the binary blob. Then it is completely irrelevant. I doubt that there will be any work going into making SDL use any GPU functionality at this stage. Doesn't mean that you can't write decent games using pygame.

All these things are quite easy to try out yourself.
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am
by Yam » Fri Jun 22, 2012 5:18 pm
I've not tried to use it yet but i figured without access to the GPU it would run unbearably slow.
i'll give the alien demo a go on saterday.
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by antiloquax » Sat Jun 23, 2012 5:31 am
If you use the Debian release, pygame is already there.
If you use Arch, you can install it yourself quite easily.
Personally, I use Python 3.14 as that (AFAIK) is the most recent Python in which all of Pygame works.
I've had to compile that myself and then install Pygame. It's working nicely.
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
by andyl » Sat Jun 23, 2012 9:20 am
Yam wrote:I've not tried to use it yet but i figured without access to the GPU it would run unbearably slow.


It all depends quite a lot on what you are trying to do. Anything really heavy (in terms of blits/sec) or 3D I would be looking at OpenGL/ES. I'm not sure what the integration is like between SDL and GLES but theoretically it is possible.
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am
by Braqoon » Sun Jun 24, 2012 1:06 am
My game in pygame works a ok. Here's a test on Debian without much tinkering.

https://vimeo.com/43205057

I use lot's of transparent .png files and probably can optimize better in overall , but still game runs decently for a first go. I will be testing that more and stripping Os from unwanted stuff to make it work better. Simple change on default LXDE theme makes a difference so i think i got a lot of room to make it run nicely.
http://dfourgames.com/
User avatar
Posts: 15
Joined: Sun Jun 24, 2012 12:17 am
Location: Sheffield, UK
by Yam » Sun Jun 24, 2012 1:43 am
I'm not able to run the alien demo as I'm not able to find it
the module pygame.examples doesn't even exist? were they stripped for size reasons? is there an easy way to get them back?
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by Yam » Mon Jun 25, 2012 10:48 am
sudo apt-get install python-examples
I'm hoping this works can't test it untill tonight again.

Looks obvious but this took me a while to find.
I don't know why this isnt installed with the default package the examples are tiny and the pygame.org documentation suggests they are installed by default.
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by Yam » Mon Jun 25, 2012 10:07 pm
Ok that didn't work, pygame examples not included ... I feel like I'm missing something obvious
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by Yam » Tue Jun 26, 2012 1:33 pm
If anybody is looking for the resolution the only solution I could find was to download a previous release from http://www.pygame.org/download.shtml and extract the examples manually.

Considering python is supposed to be the main feature of the raspberry pi
Is nobody else concerned that the examples aren’t included in the package :?:
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by KenT » Tue Jun 26, 2012 3:33 pm
Yam, which Debian are you using? Wheezy is more close to the education release than Squeeze and if pygame examples are not in there I'll raise an issue on Github.
Pi Presents - A toolkit to produce multi-media interactive displays for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Posts: 599
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
by Yam » Tue Jun 26, 2012 3:46 pm
I'm using squeeze, I'll try wheezy but I'm pretty sure its a repository issue as apt-get doesn't fix the issue.
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by Narf03 » Tue Jun 26, 2012 4:00 pm
Just received my Pi today, pygame doesn't run properly, some kind of no soundcard error when doing pygame init, followed some instructions to do init twice and it worked, but the sound quality is pretty bad, seems like the Pi still need some improvements here and there. :|
Posts: 230
Joined: Mon Jun 11, 2012 3:44 pm
by Yam » Tue Jun 26, 2012 4:04 pm
Sound drivers are not finished yet this is a known problem.
And someone is definatly working on it.
Posts: 48
Joined: Wed May 16, 2012 12:14 pm
by Narf03 » Tue Jun 26, 2012 4:57 pm
Ya, noticed, sound driver still in 'experimental' phase, maybe that is the reason, they didn't produce in large quantity and allow bulk purchase, after patching all these problems, I believe it will be a decent product.
Posts: 230
Joined: Mon Jun 11, 2012 3:44 pm
by KenT » Tue Jun 26, 2012 7:12 pm
Yam wrote:I'm using squeeze, I'll try wheezy but I'm pretty sure its a repository issue as apt-get doesn't fix the issue.


pygame examples are in wheezy and in the pi wheezy issue. I've just been playing aliens (well 10 seconds of disaster anyway). I'm in the middle of writing a bash script to launch the examples from a gui menu, hopefully asb will include the launcher in a wheezy update.

Looking at the debian pacakage list, pygame was not in the squeeze base repository that's probably why its not in pi. It is in the wheezy base repository though.
Pi Presents - A toolkit to produce multi-media interactive displays for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Posts: 599
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
by KenT » Tue Jun 26, 2012 7:23 pm
Narf03 wrote:Just received my Pi today, pygame doesn't run properly, some kind of no soundcard error when doing pygame init, followed some instructions to do init twice and it worked, but the sound quality is pretty bad, seems like the Pi still need some improvements here and there. :|


Well worth trying wheezy, Pygame sound worked out of the box for me. HDMI sound should be as good as your tele. Sound from the audio jack, which is the bit that is under development, will never be excellent because its based on very limited cost effective hardware.
Pi Presents - A toolkit to produce multi-media interactive displays for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Posts: 599
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK