Stppc2x - The Complete Collection - Beta 3


ledow

Member
Joined
Jan 6, 2008
Messages
430
Age
44
Location
UK
Website
www.ledow.org.uk
The next step on my efforts to port Simon Tatham's Portable Puzzle Collection to the GP2X. This is a a set of 27 addictive logic and puzzle games. Some are old favourites (like sudoku, sliding puzzles and minesweeper) and others you may not have seen before.

This is the third beta release of the entire collection of the games, which I call "STPPC2x". This beta has 26 fully-working games, the only remaining one is completely unplayable on the GP2X - mines, a minesweeper clone.

puzzlesyt1.gif


You can download BETA 3 of STPPC2x here: http://www.ledow.org.uk/gp2x/ or the GP2X archive

The full changelog from the previous Beta includes items such as:

- Implemented pause on the Start button.
- Added game configurability for all games under the Pause menu.

This greatly increases the potential of the puzzle collection and lets you configure
the types of puzzles in all manner of ways. So you can play bridges on a giant board,
cube with an octagon, dominosa with more dominoes, solo in a number of different ways,
net so that the board "wraps" and a million others.

The Pause menu hides all the configuration, and you have to start a new game from there
for the options to take effect. The games will tell you if you have set options
incorrectly, e.g. tried to play on a -1 x -1 board etc.

- Bonus points for anyone who finds the "hidden" jigsaw mode Sudoku.
- Added loading of game instructions from text files on the Pause menu (press "Help").
- Anti-aliased some parts of the display, e.g. text, lines, etc.
- Background colours tweaked slightly.
- Compressed all executables with UPX, reducing their size by 50%.

Feedback is appreciated (especially from F-200 and USB mouse users) and full source code is available from:

http://www.ledow.org.uk/gp2x/.

I'm also looking for help from any SDL/C coders to create a nice standalone menu program, add some more features, etc.

Note that this is an unofficial port - so please don't bother Simon Tatham with any problems, although he is aware of the project's existence.

There is now also a "development blog", which will contain articles about developments to come etc. at:

http://stppc2x.blogspot.com
 
Wonderful release! I'm a big fan of these games, you know, and the menu system is a great improvement. Comments:

- Could you change the default configuration to better match the Gp2x screen in some games? For example, 7x8 in bridges, 10x7 in galaxies or 10x8 in samegame. 6x8 in loopy solves the scaled graphics problem, as 15x10 in pattern nearly does.
- My traditional complain: too bright grey in galaxies and intertia :)
- AA fonts are really nice, except in the control messages on the top-left. Some numbers are illegible (5, 6). Could you try a different font, a bigger font size or just remove the antialiasing on these messages?
- Options saving would be a nice improvement.
- Game rules don't work for me, but it probably has something to do with my custom installation.
- A strange behaviour: sometimes the mouse cursor remains even after quitting and running other application. For example, run mines (doesn't work, i know), crash and run Gpfce. There your are, the mouse cursor in the very face of Mario :)

Thanks for your work! I love this game collection!
 
I just wanted to post to improve the post count on this thread a lil so you know that there are people (who don't necessarily post) who are following your progress closely and with much anticipation.

I just didn't want you to think that nobody cared just because nobody posted. This is some sweet sweet work. :)
 
Hi, thanks for the comments everyone. I know you've been a regular commenter juanvvc and I appreciate the vote of confidence Line O' Sevens.

juanvvc said:
- Could you change the default configuration to better match the Gp2x screen in some games? For example, 7x8 in bridges, 10x7 in galaxies or 10x8 in samegame. 6x8 in loopy solves the scaled graphics problem, as 15x10 in pattern nearly does.
It's certainly a possibility because the games differentiate between "settings" and "presets" (a bunch of "saved" settings if you like) and all the games come with a number of built-in presets. It just so happens that I've never bothered to change the presets (map's default is actually quite well sized, for instance, whereas net's is far too small a game to be challenging). I'll have a look and see what I can do. Although to me, most of the presets are either far-too-hard or far-too-easy (bridges in 7 x 8? You amateur! :p )

The "real" fix for that is going to be screen-zoom and scrolling but that's a while off yet. (No! All my beautiful code will need to be ripped apart to take account of where the cursor is actually pointing!)

juanvvc said:
- My traditional complaint: too bright grey in galaxies and inertia :)
Working on it! :D I'm actually trying to get a config option because the "default background" is completely configurable and the games work from that to make highlights, low-lights, indents etc. depending on its colour. Now that we have working configuration options, it's quite easy to add stuff like that. I'm just wondering if we'd need full "RGB" colours selectable, or just a "gamma/brightness" setting on the games. It may require a restart of a game to take effect though, which will be annoying until I can get some sort of "save config" into a public release.

I'm currently thinking of having a "grey scale" along the bottom or side of the config screen - clicking a certain shade of grey (from black to white) will make that the new background.

juanvvc said:
AA fonts are really nice, except in the control messages on the top-left. Some numbers are illegible (5, 6). Could you try a different font, a bigger font size or just remove the antialiasing on these messages?
Believe it or not, without AA, characters like lowercase M are very ugly. AA does a lot to make a character better when there are only about eight pixels width to work with. Having said that, I'm not too keen on the size of the text in the small "status bar" messages (the ones that appear in the top left) or the help text, so that will probably see an increase. Currently they are 8-point text, which happens to translate to 8 pixels top to bottom. For that size, the AA does a damn good job at making them readable.

If I can't safely increase the text-size (without stamping on the game screen), it might come down to me just removing the AA on the status bar, but I'd like to avoid that if possible. But, as you point out, if the trade-off is seeing the difference between 5 and 6 and not seeing a lowercase m, then the "m" will have to suffer.

juanvvc said:
Options saving would be a nice improvement.
As noted above, this is in the works. Before I play with people's filesystems, though, I'm very careful. Yeah, it's only a games machine and I can't do "damage" to the hardware, but I don't want people to lose their files if I miss off a "*" in the code. Not only will you be able to save the options, you'll be able to save "presets" (hopefully), so you can have "My kind of easy", "My kind of hard", etc. and you'll also be able to save the actual game (that's a bit further off, though) to carry on later. Ideas on how to implement that would be nice (i.e. how many save-games do you want to store for each game, do you want them just as "save0", "save1"... "save9" on a static screen, where to put it in the menu, should I compress the saves (they are tiny anyway) etc.) as most of the code is already in place but I just need ideas for implementation.

I'm hoping for a "quicksave" too on the Select button (nobody actually USES the Select button anymore now that the menu works, right?). So, if you see your battery light flick on, you can just hit that and be safe in the knowledge that your game is safe so you can change batteries.

I'm looking at an "INI" library written in C which looks useful. I think it could be a very good idea to save the configuration in INI-like files and the savegames could probably fit into the same format with a bit of squishing. Having one file per game (or even for the whole collection), no matter how many save games, presets, configuration changes etc. you have might be better. I don't see people "swapping" savegames much given the fact that the GP2X is quite rare. I think that if you WANT to do that, you're clever enough to take a line from one INI file on your machine and add it to another GP2X's.

juanvvc said:
- Game rules don't work for me, but it probably has something to do with my custom installation.
The code for showing the game rules is very simple. They are literally just plain text files, named after the games *internal* name (e.g. bridges.txt, rectangles.txt etc.) stored in the same folder as *the game is run from*. So, if you run the game through a menu system, they have to be in the same folder as the game itself (i.e. in the "games" folder with the programs named "bridges", not "bridges.gpe"). However, if you do a "clean install", then you also get the .gpe's, which are just shell scripts that run the real game and exit back to the GP2X menu. Thus, there are also copies of the txt files there (as well as the fonts, you'll notice). It's an ugly hack for the moment which means that everyone has two copies of every font and every txt file but it makes it work for more people and only adds about 1Mb to the game size.

However, the txt files have certain restrictions - the names are *internal* names (e.g. blackbox is I think called "Black Box" which means the filename becomes "black_box.txt"), filenames are ALWAYS lowercase (but this shouldn't matter unless you are formatting your SD card with ext2 instead of FAT32), they can only use about 60-columns and about 30 lines, although they are fully Unicode enabled (so you can get some nice characters into them). I deliberately made them this way in case people wanted to change the help text (or even translate it) and send their version to me. For a while they were also monospaced, so ASCII art also worked really well to help explain the games, but I keep changing my mind on that.

When you click for the instructions, if there is ANY problem accessing the txt file (doesn't exist, wrong name, wrong permissions, unreadable characters etc.) it just displays "Could not open help file" and carries on. If you are running from a terminal (e.g. serial, STerm etc.) then you will see an error which tells you what happened and what file it was looking for.

Chances are you've either not copied those txt files over, you've put them in the wrong place, or you're using ext2 and there's some sort of naming/permissions problem. I have to admit that it's all very primitive at the moment but it works well enough until I can get around to revamping it (I'm hoping to include the help text in the executable, or even the game's .INI file "sometime soon").

juanvvc said:
A strange behaviour: sometimes the mouse cursor remains even after quitting and running other application. For example, run mines (doesn't work, i know), crash and run Gpfce. There your are, the mouse cursor in the very face of Mario :)
Yes, it will do this with mines every time. Mines crashes so hard that SDL doesn't even get a chance to jump in and shut itself down nicely. Each time you run mines, you'll lose a bit of memory until you restart your GP2X, and the cursor will stick around until then as well. It shouldn't EVER do it in other games though. If you can get it to do the same thing in the other games (without EVER having run mines in that session), then give me a shout and I'll have a look. But I can only do so much - if the games crash with anything other than what's called an "assert", they clean up after themselves and remove the cursor. However, mines ALWAYS crashes with an assert and the other programs should NEVER crash with an assert.

juanvvc said:
Thanks for your work! I love this game collection!

Thanks for your feedback. It all helps to make the games better. I take comments direct from the forum and tie them straight into the list of things I need to do - I don't always prioritise how other people would like (e.g. mines is still not working) but comments are always taken on board.

Line O'Sevens said:
I just wanted to post to improve the post count on this thread a lil so you know that there are people (who don't necessarily post) who are following your progress closely and with much anticipation.

I just didn't want you to think that nobody cared just because nobody posted. This is some sweet sweet work. :)
Thanks for the vote of confidence! I know that people are watching because I have extensive download logs and I keep a track of comments in the archive, the forum, my blogs etc. It's always nice to know that there are "real" users of STPPC2x out there, though, rather than people who just download everything that appears on the archive / gp32x.de even if they never play any of them.

However, the popularity of these puzzles is waning a little, I think because some people don't keep up to date, or because they just wanted to be able to run one of these games and they're happy with BETA 1, or just because every other announcement on gp32x.de or the archive seems to be an STPPC2x release! :lol:

To be honest, they were more popular than I thought they would be. I was expecting to get them working in a basic state, and then nobody would bother to look at any further version at all and I'd be the only person left playing them. The encouragement to continue certainly comes from knowing that other people are enjoying them too. I'm even considering knocking up a basic menu system to run the games through, something I said I wouldn't get involved in (it's possible to build a "mega-executable" that plays all the games and have a nice menu system to let you go back and forth between them without having to go back to the GP2X menu each time). I'm not sure how good it would be because my graphics-skills suck, but I'm sure it would look better than the current pause menu and probably include game icons too.

As a kind-of thank-you to those users who continue to offer feedback, I'm trying to get some more people "involved". I'd like to see a pause menu background image, sketches for how a main menu should look, sketches of how the save menu should look and work, comments on which keys should do what (I assume that most keys are okay because nobody has said otherwise), I need the helpfiles rewritten or translated, and maybe even revamped with some ASCII art or even a small 320x240x16bit PNG help screen for each game (using more than one help screen is also very easy, for the more complicated games), maybe some tinkly-tonkly music (providing the license lets me use it), anything that you think will make the games look nicer or play better. Bear in mind that I can't "interfere" with anything the game does (so making untangle look like that "other" GP2X untangle game is out of the question). I'd even like a "promo" flash video of the games in action (maybe the VNC server for GP2X could help there, along with a VNC recorder, or even just filming the screen) because I think some people won't download it because they don't know how to play the games. Anything that ends up adding to the collection is welcome, even if they are just files to go on the website for those people who want to see them.

"Winners" will get credits in the program (I really need an About box now that the menu is working, and that'll need a background image etc.) as well as any release announcement, maybe a link to their website, because that's all I can offer, I'm afraid. Although their particular feature requests may be given more priority. <_<

Until then, as a thank-you, here's some development news for BETA 4 (at this rate, it'll be BETA 99 before I'm happy with it!):

- All games are now centered on the screen (yes, I said it would be in the previous beta but I'd hit "new code fatigue" where I just wanted to play with the features that worked already (menus, etc.) and get them perfect, rather than chase another new feature that meant changing loads of code again). But this WILL be in BETA 4. It's permanently embedded in the code for the next beta, no matter what happens, even if it did drive me mad doing it.
- Save states and configuration saving are nearing the point where I'm willing to let other people use them (I haven't had a filesystem problem at any point but I like to be careful when programming for other people).
- Saved a bit of memory because I was storing two copies of the puzzle screen (in anticipation of using triple-buffering). Hardware acceleration / double-buffering / triple-buffering do almost nothing to help the games - I know because I just tried all three. However, there is still potential for a lot more speed from manual code optimisation (I refresh the screen far too much) and compiler optimisiation so the games are still able to get significantly faster (maybe not for puzzle generation, but for screen smoothness etc.).
- I've got it to the point where I can just relax the SCREEN_WIDTH/SCREEN_HEIGHT requirements and play it full-screen on a PC with mouse or keyboard! I've always developed that way myself on a Linux machine (all this time, most of the development and testing was done on a real PC with only operational tests on the GP2X, or "bored and on the train to work" tests!) I *know* the puzzle collection already works on GTK/Windows/MacOS etc. but this is SDL-based so it's a lot more portable - a lot of people are asking for help with PSP ports of this code too.
- I've now got tons of debugging information that I can hopefully use to eliminate the "off-by-one" drawing errors (e.g. solo's loss of its thick lines, the stray dots on "net" and "map" etc.) - Basically I need to sit down with graph paper and pen and work out which buggers are causing the problem. It seems to be a combined blitting/clipping/rectangle-drawing problem that doesn't show up AT ALL in things like "bridges".
- A million and one other things that I've forgotten but I know I have a TODO list as long as my arm and a CHANGELOG that's only half as long. :lol:

Coding in C - For those people who don't want to have an ordinary nervous breakdown.
 
Last edited by a moderator:
This collection keeps getting better. :)

The new added stuff makes this feel more complete and more polished (although, some more work is need here and there). The configurations make the games much more fun and replayable. Anti-aliasing is also a nice touch.

I haven't thoroughly played them all yet, and I'll post back again with more comments when I do. ;)

Thanks for working on this. :D
 
Manjuu said:
This collection keeps getting better. :)

Well... that was the intention, yes :D

Manjuu said:
The new added stuff makes this feel more complete and more polished


:eek: Oh no! Quick, I'll hack something together to make it look tacky and horrible.

Manjuu said:
(although, some more work is need here and there)
Phew! Saved. :rolleyes:

I know... this is why I've put off calling it anything other than a Beta at the moment. It's "good enough" to be a full release by most people's standards but I'm not Microsoft - a v1.0 should work perfectly and smoothly. I would say that it will deserve the v1.0 moniker when that's true and all known problems are fixed (except for those ones I decide to ignore). And anything which is given a number after v1.0 should be changes that have come about due to upstream updates of the games (e.g. if Simon Tatham adds a new game or fixes an old one).

Anyone found jigsaw sudoku yet? :)
 
Last edited by a moderator:
Excellent collection !

I just tryed them this morning on the bus and that great !

Would it be possible to get a mouse acceleration [ I'm sorry If I didn't read the readme and I miss a thing or two ]

For the rest, everything is cool continue Good works

And thanks a lot for your hard works !
paxl
 
paxl13 said:
Would it be possible to get a mouse acceleration [ I'm sorry If I didn't read the readme and I miss a thing or two ]
It's a feature that a few people have called for but which is rather tricky to do properly because of the way the puzzles work - they are really looking for a real mouse, the entire GP2X-button controls are all "faking" a mouse using SDL. This means that accleration is tricky.

At the moment, every 25ms (might be 50, I can't remember) the buttons are checked, the directions are recorded and the mouse is moved 2 pixels in that direction (how many people even spot that it moves 2 pixels each time?).

Now the trouble is that you can't increase the number of checks you make per second (floods the event queue and button presses start getting lost), you can't increase the number of pixels you move (you then skip over things and it gets hard to click, especially if you playing "large" games on a small screen). It *could* benefit from "real" acceleration, as in the longer you hold the button, the faster it goes (more pixels it jumps). That's got to be hand-coded, though, which is a pain in the bum. It's not impossible, but it's near-impossible to get it to a state that everyone would like it.

I have it tagged for a future version, and have tried before a couple of times unsuccessfully (but each time I was only hoping for a "quick fix" version of the acceleration code to work) but it's not a priority. Even then, I'm going to get loads of people who want to adjust the acceleration, so it'll add more configuration options etc.

I have plans to do this but I quite like the way it works at the moment. It's a little slow but more than playable and takes the absolute minimum of code to work. Eventually I'll fix it but not just yet, I think.
 
Last edited by a moderator:
I may have a little suggestion that will give you a little works but not too much.

Just bind the Volume button to a variable to increase and decrease the number of pixel per move.

It would suite every game.

Thanks a lot for your port,
paxl13
 
Back
Top