may88 said:
DrCJBoduma said:
Just to add,
I am trying to learn python myself. I made a crappy game on my pc before I got my pandora with python and pygame, when I received my lovely pandora I put my game onto an sd card plugged it in and it worked straight away, touch screen and everything. (except from having to change the odd file location)
CJ
Have you any feel for how quick pygame runs on the Pandora?
Short answer; not that fast but not that slow.
Long answer; Onee-sama Tasukete! is a 400x240 game and I can probably get away with parallax scrolling and lazy updating easily while hitting 30 fps. Fortunately Pygame (which comes installed with Python) will let you fix the framerate so if you can consistently get over 30 fps, just lock it there.
What my game engine is currently doing is creating two offscreen 440x280 (tiles are 20x20) surface buffers. One I treat as the "backbuffer" and the other holds the tiles for the background of my level. When the player scrolls a whole tile, it'll only update the newly exposed background tiles. That's the only serious optimization I've made. Every pass it blits the background onto the backbuffer, then blits the sprites on there, then scales the entire thing (offset for player position of course) to the screen.
Adding a bunch more background buffer steps in there didn't impact performance much. We're talking going from 62 fps to 54 fps with like 6 or 7. Plenty for parallax scrolling and such at 30 fps, in my case, and I'm not even doing anything super efficient to update the screen.
Course I'm also only running 400x240. If you wanna make a game at 800x480 you'll have to be more efficient which would in my case also probably mean parallax scrolling is out, since there's no way to do that and not update the entire screen when scrolling. But it should still definitely be possible to get over 30 fps out of that, assuming you blit efficiently enough.
paulguy said:
The Python in the Pandora OS is missing a lot of stuff (out of requirement, really.). So be careful and be prepared to have to either make some exceptions or possibly package some python modules in your PND if this is possible.
Can you name some modules it's missing? I haven't run into this myself so I'm curious.