• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Ubuntuxer - 2009-05-09
Last edited by Ubuntuxer - 2009-11-17

FS#10193 - unified the game menus and some improvements

The aim of this patch is to improve the usability of the games.

- add a standart menu to brickmania, pegbox, spacerocks, jewels, rockblox

(including Playback Control)

- add change of difficult to brickmania (if you select easy and have less than two lifes, you’ll get a extra life.
- add highscore list to the games
- add help text to the games (expandable)
- clean the code and delete unnecessary variables
- change the keymap of FUZE in pegbox
- fixed a bug in pegbox, which prevent to save a game
- you can save a game in brickmania now, but just the

Closed by  Ubuntuxer
2009-11-17 06:58
Reason for closing:  Accepted
Additional comments about closing:  

last commit r23653

The patch needs  FS#10099 , which I have attached.
Please test the patch and let me know your opinion.

Please, don’t put so much changes into 1 patch. Ideally, 1 change per path (it’s ok if the same changes applies to more plugins).

I will try to divide the patch.
The attached patch change the game pegbox.
- add standart menu to pegbox
- saves your current level and the highest level
- remove save game, because it didn’t work and isn’t really necessary
- rename functions, so it begins with pegbox_… - remove level up and down from Fuze, because often by accident you select the button
- clean up the code

The bitmaps pegbox_menu_items.bmp are now useless and should be removed.

PS: The patch is based on “lib_highscore.diff” and “lib_display_text.diff”.

I know in the patch still features and non-functional changes are mixed, but it’s really difficult to diffide it rigorous.

I fixed lots of bugs and synced the patch to svn. Besides I matched the manual to the changes in the patch.

teru commented on 2009-07-13 03:06

why in the world you want to change everything at once?
it would be better to separate some parts.
* displaying help
* score related stuff.
* adding standard menu.
* maybe the others? i’m not sure.
and there seems to be sooo many tabs.

I know I had wrong seized my plans. The patch is considerable to comprehensive, but it’s hard to divide the patch, because everything coheres, so it’ll make much effort.
If you help me to fix the remaining bugs, I would like to commit the patch and next time I’ll do it better. :-)

replaced all tabs with spaces
minor fixes

teru commented on 2009-07-13 22:54

i’d suggest to commit each part separately istead of creating diff of all changes and divide patch.
i.e. commit only displaying help part, then commit adding standard menu part, and so on.
how about complete  FS#10099  first?

/me whistles git :)

But yea, try to divide the patch into smaller pieces.

teru commented on 2009-07-14 10:02

quick look.

surrounding only content of plugin_start by #ifdef HAVE_LCD_BITMAP doesn’t make sense for me.

you use MENUITEM_STRINGLIST and rb→do_menu to set option like difficulty and level.
i think rb→set_option and rb→set_int are usually used.

is it allowed to use float?

chages of jewel seems overkill for me.
current system works find and i dislike auto saveing… i don’t see the reason of the cahnges.

according to docs/CONTRIBUTING, enum names should be all lower case.
i mean,
1693: +enum Difficulty{
should be
1693: +enum difficulty{
or something like in your patch.

i think it would be better to avoid to use same variable for arguments and to set return value like follows.
choice = rb→do_menu(&main_menu, &choice, NULL, false);
because pressing left reset selection.

adding preffix such as pegbox_ to function names seems to only make patch complicated… it’s not necessary after all, right?

i’m thinking it’s nice feature so-called attract mode is shown when start spacerocks game.
and it would be bit strange that selecting start in menu starts attract mode.
so, can it be change to show attract mode first and then, pressing start will start game and pressing menu (or somthing simmiler) will open the menu?

btw, i wonder why no one seems to consider adding menu to balckjack.

“is it allowed to use float?” why not ?

“chages of jewel seems overkill for me.
current system works find and i dislike auto saveing… i don’t see the reason of the cahnges.” It takes a long time to finish a game in jewels, so often you must pause it and exit the player. I think, it’s very annoying if you quit by accident a game without saving.
Why do you dislike auto saving?
The main disadvantage of your commit is that if you start jewels and without playing you have to save the game still.

It’s not exactly disallowed, but *highly* discouraged.

Our targets don’t have hardware units to do floating point calculation, hence GCC has to emulate this routines. And this is *horribly* slow.

There is also another reason to not use float calculations: if no float calculations are used the compiler doesn’t need to link the floating-point math library, hence it saves space. A single use of floating point calculations kills this advantage. Not sure if this affects the core for plugins and if the core itself uses floating point operations (though I assume the core is fixed-point only).

teru commented on 2009-07-15 08:23
Why do you dislike auto saving?
Because it causes disk access which takes ~2 secconds to finish and i rarely want to save game.

You also shouldn’t forget that every disk access is expensive on non-flash targets, of which we support quite a noticable amount.

Ok, you are right auto saving doesn’t make sense. From this it follows that also highscore tables shouldn’t be saved, if they weren’t changed.
I suggest to prevent to save a unchanged highscore direct in the lib. Besides I would move the function …_show_highscores to the lib, too.

Why stopping saving highscores? If you made one, it’s worth a spin-up IMO. It’s not comparable to autosave.

I don’t want to stop saving highscore, but if the highscore weren’t changed, there is no need to save it.

just a small note… you wrote colission in game_improvements3.diff :)

I would like to close this task, so here is the last patch, which adds a menu to rockblox.


Available keyboard shortcuts


Task Details

Task Editing