Rockbox

Tasklist

FS#10497 - Mastermind on color LCDs

Attached to Project: Rockbox
Opened by Clément Pit--Claudel (CFP) - Saturday, 08 August 2009, 11:53 GMT
Last edited by Johannes Schwarz (Ubuntuxer) - Saturday, 24 October 2009, 19:00 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hello world :)

This plug-in adds a new game to rockbox, the mastermind game. It runs on all players with a color LCD, and I tested it on h10_5gb, iaudiox5, ipodnano, e200, ipodvideo (all sim), and gigabeat F (device).

I didn't find any bugs, but there must be some hiding here and there...

I've attached a screenshot.

CFP.

PS:
I've used PLA, although (if I remember well) it tends to be removed from plugins. What should I use then? #define(s) for each target? (the wiki page about plugins still advises to use PLA).
This task depends upon

Closed by  Johannes Schwarz (Ubuntuxer)
Saturday, 24 October 2009, 19:00 GMT
Reason for closing:  Accepted
Additional comments about closing:  r23332
Comment by Clément Pit--Claudel (CFP) - Saturday, 08 August 2009, 15:34 GMT
Rename the game to "codebuster" to avoid copyright issues.
Comment by Rosso Maltese (asettico) - Tuesday, 11 August 2009, 06:07 GMT
Probably it could be possible to extend the game to the non-colour LCD targets using some patterns to show the different elements.
Furthermore it could be useful an option to choose colour/pattern mode, useful for colour-blind users.
Comment by Clément Pit--Claudel (CFP) - Wednesday, 12 August 2009, 15:46 GMT
* Add a color (original game: 8 colors and five pieces)
* Add an option to display frames
* Add an option to display numbers, a simple "patterns" mode. This allow to use the plugin on non-color LCDs, yet it is not enabled on these by default since it has not been tested yet.

CFP
Comment by Rosso Maltese (asettico) - Friday, 14 August 2009, 17:35 GMT
I got this warning in r22309.
/home/asettico-9.04/Sviluppo/rockbox/rockbox/apps/plugins/codebuster.c: In function ‘draw_piece’:
/home/asettico-9.04/Sviluppo/rockbox/rockbox/apps/plugins/codebuster.c:127: warning: ‘color’ may be used uninitialized in this function
Comment by Teruaki Kawashima (teru) - Sunday, 16 August 2009, 11:54 GMT
A few suggestions.
* Clear backdrop (i.e. rb->lcd_set_backdrop(NULL);) and set background color when you set foreground color.
It's not so playable with white background...
* It would be better to use *rb->current_tick for seed for rb->srand. IIUC, get_time returns always same value for non-RTC targets.
Comment by Clément Pit--Claudel (CFP) - Monday, 24 August 2009, 05:42 GMT
asettico: I couldn't reproduce this warning... I added an else statement anyway, tell me if it does any good.
teru: Done (I added an option to clear the backdrop).
Comment by Clément Pit--Claudel (CFP) - Monday, 24 August 2009, 07:50 GMT
Woops, remove tabs.
Comment by Clément Pit--Claudel (CFP) - Monday, 24 August 2009, 07:52 GMT
... Add missing files
Comment by Mustapha Senhaji (DrMoos) - Tuesday, 15 September 2009, 16:22 GMT
I will try to look at it this week.
Comment by Rosso Maltese (asettico) - Wednesday, 16 September 2009, 09:22 GMT
OK, I got any error both for the sim and the FW. Thank you! :-)
Comment by Rosso Maltese (asettico) - Saturday, 17 October 2009, 08:36 GMT
Sync to 23221.
Comment by Johannes Schwarz (Ubuntuxer) - Sunday, 18 October 2009, 11:30 GMT
A few suggestions:
- delete the option clear backdrop instead use a background image or just let the background black
- the option display frames doesn't work; I would delete it
- use just one menu
- add a standard rockbox header label

Before the new game can be committed, it needs essentially a manual. In my opinion it doesn't need urgently a non-coloured target support.
Comment by Johannes Schwarz (Ubuntuxer) - Sunday, 18 October 2009, 22:26 GMT
I implemented the suggestions above.
Comment by Clément Pit--Claudel (CFP) - Tuesday, 20 October 2009, 21:01 GMT
Great! I haven't had any time to work on this lately, but I'll write the manual section during the holidays, so that it can be commited.
CFP.
Comment by Johannes Schwarz (Ubuntuxer) - Wednesday, 21 October 2009, 15:35 GMT
Ok, I fixed some bugs and revised the menu, so I think it's easy of use and the settings are saved now. Besides I made the game usable on small display sizes (c200).
I wrote that display frames doesn't wrote, but this isn't right and I reinserted it.
Please have a look at my changes. After you write the manual section, I'll commit your game.
Comment by Clément Pit--Claudel (CFP) - Saturday, 24 October 2009, 09:30 GMT
First of all, I like the changes you made ; thanks a lot !

I started writing the manual ; could you take a look at the diff to see if I forgot targets, or made any mistakes ? Do not hesitate to rephrase some of the sentences, I fear that my English still needs to improve..

Somehow, I liked to have the menu button enabled on gigabeat: it feels strange that in plugins, the POWER button goes to the menus, while in other screens the MENU key is used, and power exits... Plus, in some plugins, the POWER key does exit the plugin, which always makes me wonder whether I'm going to exit the game when trying to get to a game's menu. What about re-enabling the menu button, at least for Gigabeat ?

I didn't know how to add binary files to a patch, so I'm attaching images for the manual separatly.

CFP.

PS: I just came into a problem: it seems that on the new version, on targets with a scrollwheel, when you try to change the color a piece, it moves by two colors at once, and I can't really figure out why...
Comment by Teruaki Kawashima (teru) - Saturday, 24 October 2009, 11:15 GMT
In my thought, in the game plugin on gigabeat, POWER is not a key to bring up the menu, is a key to exit game and go back to the menu. so there isn't wonder for me.

I'd suggest to rename colorblind to labeling or something like.
I'm confused by button mapping. UP usually increases number and DOWN usually decreases number. it is confusing for me that it is contrary in your game.
Comment by Johannes Schwarz (Ubuntuxer) - Saturday, 24 October 2009, 18:36 GMT
> PS: I just came into a problem: it seems that on the new version, on targets with a scrollwheel, when you try to change the color a piece, it moves by two colors at once, and I can't really figure out why...
I suppose it's a bug in the simulator or the pluginlib_action, because on my Sansa e200 the problem doesn't occure.
>I'd suggest to rename colorblind to labeling or something like.
yes, colorblind is really unsuitable
>I'm confused by button mapping. UP usually increases number and DOWN usually decreases number. it is confusing for me that it is contrary in your game.
You're right, but the problem occurs because of the bad pluginlib_action. If you scroll down the number is increased rightly. kugel is working on it.  FS#10387 

Loading...