Had I intended it just for use on a PC, it would've been bloated and slow
Judging from your previous posts about Stargazer, you refused to make any compromises (so far) regarding scaling anything down, and run the same engine on both the GP2X and on the PC. You also say that it runs slow on the GP2X. Seeing the quote above, this leads me to believe even more that you wrote it with the PC in mind - talking in circles anyone? :huh:
Your comments indicate you haven't actually written anything using SDL or you wouldn't have made that statement.
I did write a number of C games using SDL, and have quite a few in the making. Granted, most of what I have done so far don't have as many layers of graphics and massive amounts of sprites on-screen, as you claim Stargazer to have. I fully agree with the fact that after a certain amount of blitting, you hit a bottleneck that drops you to 55 or so fps in a matter of less than 10 sprites. Putting OGG on top of that only slows it down even more.
It's a matter of design. It's a matter of acknowledging these weaknesses of the GP2X, and dealing with them in an acceptable manner. That means optimizing your general code as much as possible (which I believe you have done already), switching to a faster library to handle the framebuffer (such as rlyeh's minimal library), using the second cpu for OGG decoding (I believe Dzz wrote an article on how to achieve that), and if that still isn't enough, and it probably won't be, start giving up some of the graphics layers. With a bit of creative design, users won't even notice that it's missing. Gameplay is kind after all, and one more or less background layer won't make much of a difference in that aspect.
I'll be honest and admit that at this time I do not possess the knowledge to do the fancier things I talked about in the previous paragraph (such as using the second core for OGG decoding, or using rlyeh's minimal lib), but you obviously have a lot more programming experience than I do. Judging by your more technical posts, I'd wager you have some form of formal training in this domain, which I only just started. That's why for the time being I'm sticking with C and SDL, and doing the most with what I have. Most importantly, I'm having fun with it, so what more could I want?
This is a very important facet of my thinking you must understand-- if you were faced with the choice of making your engine work only on one system, a system with a near-broken thumbstick that makes the game no fun to play, but you'd gain some marginal performance improvements and lose compatibility with every other platform (including those with working controls), would you do it? Or would you sacrifice compatibility with the system that the game isn't fun to play on anyway, to support platforms that run it better anyway, with controls that more than 5% of the players will find tolerable? Which would you pick?
There you go, you just admitted you never had the GP2X's specific hardware in mind when writing the GP2X version of Stargazer, but merely expected it to work as a port. Well that simply isn't going to happen. If you have such a complex game in mind and are unwilling to put some effort in hardware-speific optimizations, that is entirely your own fault, and not the platform's.
- Alex