Go to advanced search

by tcstyle
Sun Jul 08, 2012 7:26 pm
Forum: Python
Topic: Pygame Project Based on Ludum Dare 23 Entry
Replies: 4
Views: 2288

Re: Pygame Project Based on Ludum Dare 23 Entry

After first profiling and struggling with code optimization I got some interesting results. First I was able to speed up the blitting of my number font to a third of the initial time per call. This was possible by removing an unnecessary copy of the surface in every call.This leads to the second ins...
by tcstyle
Sat Jul 07, 2012 3:58 pm
Forum: Python
Topic: Pygame Project Based on Ludum Dare 23 Entry
Replies: 4
Views: 2288

Re: Pygame Project Based on Ludum Dare 23 Entry

One thing I would like to do is to make a Steam-like game manager for pygames on the Pi. That sounds like a great but pretty challenging idea. Have you thoght about technical issues, like where the games are hosted, yet? Nevertheless would be pretty cool to have. Regarding my game, after profiling ...
by tcstyle
Fri Jul 06, 2012 3:35 pm
Forum: Python
Topic: Anyone used cProfile yet for profiling?
Replies: 2
Views: 1211

Re: Anyone used cProfile yet for profiling?

Manually installing the package worked.
If one is going to use cProfile, too, remember this:
Any path setting referring to the script's path via sys.path won't work as expected. The sys.path probably refers to the place cProfile is located.
by tcstyle
Thu Jul 05, 2012 8:36 am
Forum: Python
Topic: Anyone used cProfile yet for profiling?
Replies: 2
Views: 1211

Re: Anyone used cProfile yet for profiling?

After looking in the package descriptions of debian I found out that the python profiler is excluded from standard python. Looks like you have to get the python-profiler package, too, even if cProfile is in the standard python.
by tcstyle
Thu Jul 05, 2012 6:01 am
Forum: Python
Topic: ogg files playing slowly in pygame...
Replies: 6
Views: 3481

Re: ogg files playing slowly in pygame...

After some sleep and looking at it again: Yeah, you're right. :oops: So that should not be the cause of the issue. Nevertheless it's kinda strange becuase a very similar concept of playing the music works fine in my code with pygame. After starting to play, there is a loop with some quite heavy proc...
by tcstyle
Wed Jul 04, 2012 8:15 pm
Forum: Python
Topic: ogg files playing slowly in pygame...
Replies: 6
Views: 3481

Re: ogg files playing slowly in pygame...

Haven't tried your code out yet, but executing pygame.music.play() repeatedly in the mainloop could cause the problem. You should probably execute it only when something like "next track" is happening. Playing .ogg with pygame.music works fine on the Pi in my game: http://www.raspberrypi.org/phpBB3/...
by tcstyle
Wed Jul 04, 2012 7:34 am
Forum: Python
Topic: Keystroke detection without drawing a window...
Replies: 6
Views: 12128

Re: Keystroke detection without drawing a window...

Pygame is a good choice for this task. It can run without display and the event manager should handle your specified events. Example: import pygame pygame.init() finished = False while not finished: for event in pygame.event.get(): if event.type == pygame.QUIT: finished = True if event.type == pygam...
by tcstyle
Tue Jul 03, 2012 6:09 am
Forum: Python
Topic: Anyone used cProfile yet for profiling?
Replies: 2
Views: 1211

Anyone used cProfile yet for profiling?

I tried to profile my game ( see this thread ) this morning with cProfile. This started my game as intended. Unfortunately after quitting my game this raises an error that the module pstats is missing (that's true) in line 80 of cProfile.py. Has anyone an idea how to seolve this? Maybe get a newer m...
by tcstyle
Mon Jul 02, 2012 8:03 pm
Forum: Python
Topic: Pygame Project Based on Ludum Dare 23 Entry
Replies: 4
Views: 2288

Pygame Project Based on Ludum Dare 23 Entry

My first project on the Pi will be testing my Ludum Dare entries made with python and pygame to run on the Raspberry Pi. After installing the missing sound module in squeezy the first test with my game Bottlecolonies went quite well. Unfortunately the performance of the few animated stuff is rather ...
by tcstyle
Mon Jul 02, 2012 6:50 pm
Forum: Python
Topic: Can't get Python to run with Pygame
Replies: 6
Views: 2867

Re: Can't get Python to run with Pygame

I couldn't find any "bat and ball" example in the 2nd MagPi issue to check back, but the problem with errors like that ALSA lib confmisc.c:768:(parse_card) cannot find card '0' seems to be missing sound drivers in squeeze. Look at this to install the sound module: http://www.chrisnewland.com/solved-...

Go to advanced search