This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6625 - Sokoban Improvements
Attached to Project:
Rockbox
Opened by Sean Morrisey (DrSpud) - Tuesday, 06 February 2007, 03:37 GMT+2
Opened by Sean Morrisey (DrSpud) - Tuesday, 06 February 2007, 03:37 GMT+2
|
DetailsA large number of improvements and fixes to the game Sokoban:
- Support for levels that have the mover start on a goal ('+' character). - New bitmaps for when the mover is on a goal, plus the brick texture was slightly reworked to look cleaner. - The undo function has been mostly rewritten and uses one byte per undo (was 21 bytes/undo before). This allows for a nearly unlimited number of undos (5000) in the same amount of memory that about 260 could fit before (but only 5 were allocated, for some reason). Additionally, non-moving button presses no longer eat an undo slot. - Redundant code for both the undo and player movement has been unified & modularized similar to - Redo feature added. - Keys remapped to accommodate redo, some switched around a little. Let me know if any of the key mappings don't make sense, as I'm not very familiar with most of the platforms and some of the mappings are a little weird. - Button repeat enabled on platforms that support it. Don't know why it wasn't before, since it's so trivial. - Level & move info cleaned up and moved to bottom of screen for targets with unaccommodating screen dimensions. Sansa & Gigabeat targets now display correctly, as should any future targets. - Skipping of the help text screen via any button press now possible. - 'Pushes' counter for targets with a big enough screen. - 'Level Completed' screen that shows moves & pushes. - Error messages fixed: they now display for 2 seconds instead of 0. |
This task depends upon
Closed by Zakk Roberts (midkay)
Tuesday, 13 February 2007, 07:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed, thanks a lot for your work! :)
Tuesday, 13 February 2007, 07:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed, thanks a lot for your work! :)
If you need more than that, there's a good chance you'd be better off just restarting the level, right?
At the beginning of a level you have 1. Every 10th move adds one. So, more complex levels automatically give you more available undos the further you are into the level. (As well, if you REALLY wanted to, you could wobble back and forth to increase them, I suppose, but for purposes of increasing the number you could only count actual pushes as opposed to steps, perhaps).
Just a concept, but it'd allow the number of undos to scale with the complexity of the level without having to predetermine a number for each level.
As for the undo limit issue.. I think unlimited (or merely memory-limiting) undos is the best system after looking at all the options (at least all the options I see). Limiting the number of undos to a constant level can be a pain on the levels that require over a thousand moves, basing the number of undos on the level is painful and has to be done manually, basing it on the number of moves can be exploited.... You can already skip levels, so if one really wants to use unlimited undos to "cheat" and make it easier on themselves, they can already just make it real easy and skip the level. I think unlimited is the best.
New changes:
- Number of undos is now dynamic - 4k to 32k based on how much is plugin memory is left over.
- Keys for X5 fixed. According to http://forums.rockbox.org/index.php?topic=4146.0 , simultaneous button presses on the X5 don't work. Redo & level repeat had to be cut, but you can now change levels.
- Some minor cleanup.
I probably won't get to that tonight... if I don't, then it'll be Friday night.
I'm just off to bed now. Tomorrow I'll commit this. :)
I did find one bug caused by code cleanup that broke the '+' character support. Now I think it's good :)
Sorry it's taking me so long to get this in SVN. I won't try to convince you it's not my fault, I did delay for a few days. But I went into VMware to commit last night, and Rockbox won't compile at all (not this patch's fault..). I might need to reinstall it.
I'm re-downloading it (VMware image) and giving it another shot. If I still can't compile, I'll just commit it later tonight without having tested it - I'm sure you've done this yourself. :)
Don't worry about it whatever happens, it's not like this patch is very urgent or anything. And I found a bug I missed before, too, so it's not a bad thing that it wasn't committed right away.
Also, I've made some progress on supporting normal text-format and RLE levels. It'll be a while, but it will let even the most memory limited (archos) players cache all the levels at once. More features are planned, like saving/resuming progress/solutions. I'd like to hear any suggestions anyone has about them.
Sounds good about what you're working on, looking forward to future developments. Saving progress when you quit automatically and maybe giving the option to resume when you start the plugin again sounds like a nice feature. Don't forget about the forums if you're looking for input/opinions, many are happy to oblige there. :)