Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Games
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by DrSpud - 2007-02-27
Last edited by dionoea - 2007-06-29

FS#6702 - More Sokoban Improvements

A new set of improvements:

- Full support for text format levels, including RLE (Run Length Encoded) levels. This alone allows all targets to cache the entire default levelset, since the levels now take less than half the space they did before.
- Solution/progress saving/loading: menu on quit button press lets user choose to save & quit or quit without saving; prompt on level completion screen to save solution; .sb solution files may be ‘played’ to have a solution played out.
- External levels can be opened with the sokoban plugin to be played. Standard text format or RLE only, and lines with comments must start with a semicolon. When progress is saved, the current levelset (external or default) is saved as well - thus a ‘load default levelset’ menu option for convenience.
- Playback control on menu.
- A few more misc tweaks & code cleanup.

I think this about covers just about every bit of sokoban code I’ve modified or rewritten now ;)

The features & the way they turned out all made sense to me, so I didn’t bother asking around for feedback. Everything works great as far as I’ve tested, and I haven’t even noticed the slightest performance hit when resuming a level with 5000+ move progress on my iHP-140 :)

Closed by  dionoea
2007-06-29 19:52
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Applied (again). Thanks.

One more little update: ROWS & COLS are set dynamically so all targets can support levels that fill their entire screen. No guarantee that a target will allow larger than 20x16, but several do.

Where'd you go, Zakk? ;)

Out of sync!

Ah, from revision 12807. Fixed.

New updates:

- Menu reworked & converted to new menu API.
- Levels with non-level data are properly ignored now, though a more thorough check might be better.
- Remote no longer has menu or save screen stay on it after exiting from either.
- Display fixed on H10 5GB.
- Adjustable solution playback speed - press up/down to increase/decrease speed, respectively.
- Keys in manual synced to recent changes, and updated screenshots for all screen sizes included in zip. (The iPod mini [138x110x2] has a background color different from all the other screenshots for it… Not sure how that's supposed to work.)
- Error messages tweaked.
- Suffix for level set and saved solutions changed to the more conventional '.sok'.
- Using its own colors seemed unnecessary, so the user's choice of colors/background are used. It makes sense to me. Easy fix if anyone disagrees - I know there are plenty of other plugins that use their own colors, but a few don't…

Also, I think I found a case of bug  FS#6164  present - pressing play on the 'You Win' or 'Keys' screen seems to cause the previous button to fire again, exiting the menu or reentering the Keys screen. Looks like it happens when the play button is released.

The first patch got a lot more attention than this one is getting - is everyone off working on other stuff, or what? :)

Are all the pictures just for the manual?

Yup. Also, I can't seem to get the manual to build (I get 'LaTeX Error: Missing \\begin{document}.'), so I'd appreciate it if someone could test it & make sure I did everything right.

tucoz commented on 2007-03-28 08:34

Sean, are you running Ubuntu? In that case you'll have to tell either the Makefiles to use SHELL=/bin/bash (i.e. the Makefile in the manual build directory and the Makefile in the manual directory) by adding that line to the top of the Makefiles somewhere. Or you could change the symlink /bin/sh to point to /bin/bash instead of /bin/dash.

tucoz commented on 2007-03-28 09:10

There is a patch at http://www.rockbox.org/tracker/task/6919#comment14245 to help you build the manual with ubuntu.

Thanks Martin, that got it working.
…and I'm running Kubuntu, actually ;)

Fixed a couple things in the manual and the sokoban.levels → sokobanlevels.sok rename. With the exception of the iPod mini (see above), it's looking perfect.

I'm not sure that I like the new sokobanlevel file and how it looks - even though it surely saves space it'll be harder for someone to create an own level because you don't get a picture of how it'll look, like it was with the old code…

Regarding the background colour of the Mini screenshot: how did you take the screenshot from the sim (did you use F5)?

Oh. I see. Screenshot fixed. :)

I have to say I agree about having the levels in a human-readable format. It does make editing quite friendly. The size savings really weren't much anyway (4k, not really all that significant even on, say, archos targets). Changed.

I'd say this is ready for a commit now, as long as no other issues arise.

Hi again, Sean. :)

Sorry, I haven't had the ability to commit this lately. A short while ago, Vista crashed on me and I'm on a somewhat-temporary XP installation. I don't really want to spend the time downloading and setting up VMware and the image, because I won't be set up like this for long.

Within a few days I hope I'll have everything saved out to where it needs to be so I can reformat and reinstall an OS for good. Soon after I hope I'll get around to committing this.

Thanks for your continued work!

That's really too bad Zakk. :(
I'll hold my tongue (erm, fingers) about Vista, but I will say it's awful nice (not to mention convenient) running it all natively. Hope you can get everything back up & running eventually.

You're welcome as always. :)

sync'ed

the above patch compiles well , patches successfully , but while make zip , sokoban.levels is not created

Here it is with the levels and synced. The icon update makes things a lot nicer :)

i cant get the levels file to form everytime it gives me an error asking which file to patch sokobanlevels.sok does not exist , how do i make this patch work

Make a copy of sokoban.levels and name it sokobanlevels.sok, then apply the patch. The patch was supposed to rename it, then change its contents, but I see now that it doesn't quite work the way I expected.

Synced with r13436, manual updated too.

So Zakk, did your OS survive?

Ugh, no, I still haven't done it. My plans for the reformat revolved around finding my external drive to backup a bunch of files to and, unbelievably, I couldn't find it anywhere. I'll have to do so soon though… but I'm really not looking forward to it. I've got quite a mess of files to clean and sort: some here, some there.

As for the patch, sorry, this is far more likely to be committed by somebody else before I'm in such a position to do so. I'd be glad to prod some developers into doing it though… thanks for covering all the bases (patched source and manual, bug-checked, etc) - makes it a lot easier.

hey guys fixed this patch, the sokobanlevels.sok earlier patch had the XXXXX also appearing causing it to go above 30kb, now its 17kb only , & this patch is synced with the svn, c ya, please stik to the order of the the svn's file, like there were many instances where edits were shown to be made , when they lease required to be made,like jus two lines wrongly placed, one above the other, please dont change the way the original files are & then make a patch this causes some lines to be appearing for addition & cutting out of no reason, hope you understand , c ya enjoy, oh did anyone get across the 11th level please send me the solution please !!!!!!

made a mistake with the earlier one please always follow this procedure, this is for people who don't know or people who will make mistakes like me
1.always before applying this patch revert sokoban.levels (after patch 0kb), in apps/plugins to get the original sokoban.levels(33kb before patch or after reverted to svn)
2.copy this file & rename the copy to sokoban.sok ie 33kb , just like the original sokoban.levels
3.then apply patch attached herewith, everything will be smooth

Also would like to know why are those PNG images included, with earlier patches, do we use them somewhere?
p.s: people patching please read the comment above this also.

sorry my net connection passed out

sync'ed

In response to http://forums.rockbox.org/index.php?topic=11023.0 , I fixed a few levels that differed from the 'official' versions:
52 - removed walls restored
58 - goal area lowered
61 - start moved
62 - extra wall removed, start is easier
70 - extra boxes removed
74 - removed walls restored
75 - extra walls removed
87 - extra wall removed
92 - moved box restored, made level solvable!
97 - start moved
100 - moved walls & boxes restored

86 was left alone since it's more correct than the original.
I also fixed a bug in the loading process found while testing the level changes.

@Nikkhil: I think I'll just let whoever commits this figure out the details with the filenames. The pics are for the manual, since the appearance has been updated some. Also, there are solvers you can use if you get stuck - 11 isn't hard compared to later levels :)

Fixed typo.

Updated the manual to mention some of the extra features, and fixed one last bug similar to the previous one. Now I think it's good :)

Patch applied. Thanks.

Reopened since Sean still has sokoban modifications pending.

Thanks Antoine, here's what I was about to add:

After thinking about it for a while, I decided it made more sense to follow the naming conventions of other games and go back to the original filenames. Plus the level set & save file are hidden away underneath the hidden (by default) .rockbox folder, so it doesn't matter much if they have a .sok extension. It now defaults to the folder /games when saving a solution from the default level set; other level sets are still the same though.

Also a few other additions:
- Level select on menu lets you choose any level in the current set
- I found out that some versions out there mixed in some slight variation from the extra set, so some levels were changed back to the correct version. Now only the following are different than what they were originally: 52, 58, 74 (doesn't affect gameplay), 92, and 100
- Solution playback can be paused, and progress can be manually moved forward or backward
- The folder a save file is in is created if it doesn't exist; prevents errors if, say, /games hasn't been created and a solution is saved there.
- A few tweaks to solution playback speed changing.

You'd need to change the level file name back, too. Sorry about the inconvenience. This patch now concludes all the changes I had in mind :)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing