I finished my first app for GP2X (I know I’m kinda late to the party… All the cool nerds have Dingoos and Pandora pre orders) and it comes in the form of a port of Revolt Of The Binary Couriers.
I’ll confess though that I’m not really sure what the deal is for GP2X software compatibility. I have an old GP2X F100 and that is what it was made for and tested with. It will presumably also work perfectly with a GP2X F200 but I’m doubtful about whether or not it will run on a GP2X Wiz. I’m under the impression that they cant run stuff made for the earlier models. Feel free to correct me about that if I’m wrong though.
The game runs smoothly and is functionally essentially a direct copy of the Wii and PC versions. I did cut out diagonal walking because it didn’t seem to be controlling very well with it in. I’m not sure whether it was the fault of something about the way that I wrote it or just the joystick sucking but either way I wasn’t completely sure about including diagonal walking so it doesn’t bother me to see it go.
Aside from the minor change in walking controls the only difference is that it seems to be a bit slower to save your game. Its not brutally or game ruining slow but a noticeable five to ten seconds which I think is longer then it takes with Wii and certainly longer then it takes on my PC. Still its not as bad as it was originally. When I first ported it over it took roughly 8 minutes to record your save game. That’s not an exaggeration. Eight minutes… I thought it had frozen at first. In the event that any programmers as noobish as me is reading this then take note that “\n” is the same as endl minus the flush which means it is a LOT faster. Or at least its a lot faster with GP2X though I dunno why the unnecessary calls of endl didn’t slow the Wii version by much if at all. I also cut out some unnecessary data from the game saves (the files are bloated for reasons that I’m not going to get into now) which helped to cut down on the time but means that GP2X game saves aren’t interchangeable with Wii/PC ones.
The frame rate (which is running great now) wasn’t doing so well at first either. I was able to get it up though by switching over from using the normal PNG alpha channel to color keying which let me use SDL_DisplayFormat to optimize the sprites to the correct bit depth without it messing up whether or not certain pixels should be transparent (which is what was happening before when I tried to do it with sprites with transparent pixels) and that gave it surprisingly big bump in performance. Since The Wii and PC (on my lPC anyways) versions are already running at the intended 60 frames a second I’m not really in much of a rush to roll back the change though.
It also for some reason had some objection to me having an SDL surface named font. There was no warning or error message when compiling but it just sat frozen at a black screen when I tried to run it. I never had any trouble with the surface having that name on PC or Wii. It only took a second to rename the surface but a while to figure out that it was the problem…
But overall its was a fairly painless transition to get the game running which just makes it seem worse that I never wrote anything for GP2X back when I first got it. Though admittedly it probably would have been rougher for me then. I only started using SDL relatively recently and I’m not sure I had even done anything yet at the time in C++.