Pandora Pandora Vs. Pc


Sephiroth

Active Member
Joined
Jul 11, 2006
Messages
658
Age
33
Location
Germany>kaiserslautern>Hohenöllen
Website
Visit site
Hello again!

For a few weeks/months i'm working on a platformer game with python & pygame.
yesterday, i was a bit shocked after running it on my pandora!
Without a framelimiter or something, on my desktop pc it runs about 300-600 FPS. And on the Pandora it runs on 10-11 fps. Same code, without any change, the same level etc.

Is there really such a difference?
Have i forgotten an important thing?

greetings

My desktop pc:
2GHz core2duo
4GB RAM
..
 
laurens said:
SDL on pandora is, iirc, still quite unoptimized and using software rendering only, which could account for (part of) the difference.
Is there any information if there is somebody working on this?
Will it ever be? Is there a good chance that it will be in the future?

Is pygame(SDL) really so bad on the pandora, or am i only such a lousy programmer? :D
I think i can remember that the code works on my gp2x much better than on the pandora. But this is nearly a year ago. In the evening i will test it.

greetings
 
Last edited by a moderator:
Capitano said:
Is there any information if there is somebody working on this?
Will it ever be? Is there a good chance that it will be in the future?
SDL is pretty important to the Pandora, considering how many applications are written with it. It's definitely being worked on. But many other things are also being worked on, so it'll take some time.


Capitano said:
Is pygame(SDL) really so bad on the pandora, or am i only such a lousy programmer? :D
I think i can remember that the code works on my gp2x much better than on the pandora. But this is nearly a year ago. In the evening i will test it.
How long have you been using Pygame? You might be a lousy programmer :p . There are tricks for speeding things up (namely, you should only blit and flip the rects that have been changed from frame to frame). Unoptimized code may run well on your desktop, but you'll see the difference on slower hardware. I can't find any specific tutorials on optimization, but if you read through some of the Pygame tutorials, they cover it.
 
Last edited by a moderator:
I think there is a GLES backend for SDL, no?

Probably apps themselves can bundle their own SDL.
 
Could you describe a little what your game is actually doing? If you're pushing a bunch of hardware accelerated blits on your desktop then that could explain the discrepancy. It might even explain why the GP2X was doing better, but I doubt the GP2X's hardware accelerated blits would be faster than Pandora's software ones since they'd both be limited by memory bandwidth.

If you're going out in windowed mode in 16bpp your surface might be converted real time to 32bpp, which could be slow, especially if you're at a high resolution. Try running it fullscreen instead.

In the future we'll probably have simple color-keyed blits done in hardware on Pandora, using the DMA controller. It shouldn't be too hard to make these available in SDL, although you may have to use hardware surfaces. You won't ever get hardware accelerated alpha blits though (without using OGL ES).

Torpor, you might be thinking of the SDL_OPENGLBLIT target, which to the best of my knowledge isn't even supported anymore.
 
In general you should also avoid alpha blended surfaces and not use images with an alpha channel.
As everyone pointed out SDL currently does not support hardware acceleration on the Pandora and therefore these images can create a huge performance loss.
Try to use colour-keyed images instead and only make use of an alpha channel if you really need to (for alpha-gradients for example).

foxblock out
 
The GP2X is slower, as is the WIZ. Tried Barbie Seahorse Adventure.

However, the Pandora is slow when there are a lot of sprites and scrolling, etc.
I guess that's because pygame is just a direct compile doesn't use hardware surfaces, etc.
 
Another thing SDL does that's always annoyed me is, say you're writing a 16bit image to a 32bit surface (or vice versa), SDL will convert the image every time you draw it and not flag it's doing this.

In short make sure your image format matches the surface you're writing to.
 
fusion_power said:
When SDL is that "ineffective" (at the moment), why everybody seems to use it? ^^"
Because most linux games use it, and because we all expect someone else to fix SDL for us :D
 
Last edited by a moderator:
sebt3 said:
fusion_power said:
When SDL is that "ineffective" (at the moment), why everybody seems to use it? ^^"
Because most linux games use it, and because we all expect someone else to fix SDL for us :D
Hm, because nobody did it yet could indicate that it will be a hard task. ^^"
 
Last edited by a moderator:
fusion_power said:
sebt3 said:
fusion_power said:
When SDL is that "ineffective" (at the moment), why everybody seems to use it? ^^"
Because most linux games use it, and because we all expect someone else to fix SDL for us :D
Hm, because nobody did it yet could indicate that it will be a hard task. ^^"

It's not too hard, but no one was in the mood to do it yet ;)
 
Last edited:
This is really bad news for me, if this is confirmed... I have developed and almost finished a game using Pygame dedicated to the Pandora, but only tested it on the PC so far.

However, Barbie Seahorse Adventure seemed to run really nicely. You should double-check whether there is not something wrong with surface conversion, alpha channel or something like that.

EDIT: Could you try using the python profiler to check what is actually slowing down your program? I would be really interested.
 
Back
Top