Tuesday 15 April 2008

Some more news on the STPPC2x front:

Beta 3 will hopefully contain help and instructions for the games. If it takes too long, I'll be pushing that back so that people get to use the new configuration menu system first. I was going to use the existing puzzle instructions and some Wiki graphics for controls to help this along but nobody's quite sure of the license for the wiki graphics and the existing instructions are probably too long.

I'm aiming for a single window per game, accessible from the normal pause menu, which gives you the basics for that particular game (How to play) and a single generic window specifying information common to all games (Controls, how to pause, quit, etc.). It would most probably be a text file for the game, so new games can have instructions written by anyone. Unfortunately, it would have to be manually updated for each game which is a bit of a pain, but you can't have everything.

I was *toying* with the idea of some background music (obviously, with an on/off switch) but I don't know if I want to waste my time on that. It started when I thought that a "mouse-click" sound might be a good idea to put into the game. It seems incredibly simple to do, especially with SDL_Mixer, but I usually hate such unnecessary padding.

My plan, if I do implement sound, will be to have, in this order of importance:
An on/off switch for all sound.
Volume control for all sound.
Music in the menus, sound in the game.
A basic MP3/Ogg file in the game folder that people can change to their hearts content (e.g. "backgroundmusic.mp3", "clickeffect.mp3", etc.) so that if they prefer a different tune, they can have one.
A free (Probably creative commons) piece of music and sound effect included with the download (ideas welcome - but with my playing, probably the Mission Impossible theme tune would be best... )

I'm planning to look at saving/loading of games for Beta 4. It's annoying to get through a large game of bridges, only to have the battery die and you can't get it back. Saving/loading looks simple (the puzzles tend to do everything necessary except actually open the file and write to it) but it's the *first* line of code in the games that writes to disk, so I want to be incredibly careful. I'm not sure how it would work just yet but probably it would save to a sequential filename (e.g. net0001.sav, net0002.sav, bridges0001.sav etc.) each time you save and present them in reverse order for loading (sadly, there is no RTC on the GP2X otherwise I would have them named with the date).

CPU usage and speed is also on my list for the next Beta (although Beta 2 made tremendous leaps in that area especially where puzzle creation is concerned) - I'm setting up a code profiling system at the moment so that I can find the hotspots in the SDL code. For sheer number-crunching, the latest GP2X code can generate a 30x30, Hard, 4-bridges-max game of bridges in the same time (or less) as a 600MHz laptop, so I don't think I'm doing too bad on that front (a credit to ARM processors!). The display/animation is a little slower because of software drawing/scaling but the games have adjusted to take account of that since day one (you get less fps when it's animating a move than you would on a PC) - hardware acceleration would solve that problem but it has its downfalls too. Ideally, I'd like to be able to clock the GP2X right down to 66MHz when it's not generating a game or performing an animation (which is about 99% of the time it runs for).

Also, executable size is up for a revamp - I already have #define's for things the GP2X doesn't need, and I strip the executables but I think there's a lot more I can do to shrink them. There is some unnecessary but *seemingly* used code in them which the linker/strip doesn't like to remove, there is no end of fancy tricks to reduce the size including using an executable compressor like UPX on them. There are other things you can do but they all tend to cost you more in terms of memory (even UPX is an initial memory usage vs executable size trade-off), such as zipping the fonts, etc. Even if I save myself, say, 10 Mb on the entire collection without visible differences, I think it's worth the effort.

Anyway, look out for Beta 3 coming "soon", with game configuration menus, pause and (hopefully) instructions inside the game.

No comments: