Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8183 - The Case Game - (Deal or No Deal variant)

Attached to Project: Rockbox
Opened by Brian Morey (Morey) - Monday, 19 November 2007, 03:50 GMT+2
Task Type Patches
Category Games
Status Unconfirmed
Assigned To No-one
Player type Sansa e200
Severity Low
Priority Normal
Reported Version current build
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

The Case Game

Here is a variant of Deal or No Deal for Rockbox.

26 cases contain random amounts of virtual money. After choosing 1 case for yourself, you open the other cases until the banker makes you an offer to buy your case. If you choose to accept the offer the game ends and you receive that offer as your final score. By declining the offer, you continue to open the remaining cases until the next offer. If you decline all offers you get the amount that was in your case as your final score. If play continues until your down to 1 case plus the case you chose, you are given the option to swap cases.

Gameplay controls:

() While opening cases: pressing UP shows the remaining case amounts.
pressing DOWN shows the high scores.
() While deciding on an offer: pressing UP shows the previous offers.
pressing DOWN shows the high scores.

This game allows name entries into a high score board.

This game currently only works on color lcd screens (Sansa e200 176x220) or greater.

Apply the patch and place the .bmp files in the "apps/plugins/bitmaps/native/" directory.

Please post results for other platforms as well as comments. I tested the game out on the Gigabeat simulator and it seemed to work well.
This task depends upon

Comment by Daniel Siebrecht (DimensionSix) - Monday, 19 November 2007, 14:21 GMT+2
WinRar says that the arcive is "destroyed" (I have the german version, don't know what the english version would say)
Comment by Brian Morey (Morey) - Monday, 19 November 2007, 14:31 GMT+2
Here are the files.
Comment by Daniel Siebrecht (DimensionSix) - Monday, 19 November 2007, 15:14 GMT+2
When compiling for the H3xx I get errors because the buttons are "undeclared (first use in this function)"
Comment by Brian Morey (Morey) - Monday, 19 November 2007, 15:25 GMT+2
In the file casegame.h you need to add the button maps for your player. I currently only have the Gigabeat and Sansa defined.
Comment by Brian Morey (Morey) - Monday, 19 November 2007, 15:58 GMT+2
This one should include button mapping for the H3xx.
Comment by harry tu (bookshare) - Tuesday, 20 November 2007, 07:28 GMT+2
What do I o o make it work on the ipod4g?
Comment by Jonathan Gordon (jdgordon) - Tuesday, 20 November 2007, 07:31 GMT+2
if you want this to be commited, please add support for all sensible targets (probably all excpet the arhcos player)
Comment by harry tu (bookshare) - Tuesday, 20 November 2007, 07:32 GMT+2
What nees to be done t support none color targts
Comment by Jonathan Gordon (jdgordon) - Tuesday, 20 November 2007, 07:33 GMT+2
the buttons and drawing code will need to be sorted for each target
Comment by harry tu (bookshare) - Tuesday, 20 November 2007, 07:40 GMT+2
Could someone atach casegame.h? My build laptop is nusable right ow bu I will add keymaps fr ipods on this empoa laptop.
Comment by Brian Morey (Morey) - Tuesday, 20 November 2007, 16:40 GMT+2
I took a stab at adding button maps for almost all players. The graphic displays still need to be changed for smaller screens and grayscale players but this is a start.

Please post comments on players that work or don't work so that I get some feedback. If your screen is grayscale or smaller then 176x220 I already know it won't work, but I'm working on it!
Comment by Daniel Siebrecht (DimensionSix) - Tuesday, 20 November 2007, 18:15 GMT+2
Can't compile. I get the following errors

CC casegame.c
casegame.c: In fuction 'play_case_game':
casegame.c:81: error: duplicate case value
casegame.c:80: error: previously used here
casegame.c:87: error: duplicate case value
casegame.c:81: error: previously used here
casegame.c:88: error: duplicate case value
casegame.c:87: error: previously used here

I tried to fix this myself but have no success.
Tried to compile for H3xx with revision 15722.
Comment by Brian Morey (Morey) - Tuesday, 20 November 2007, 19:07 GMT+2
This should fix that issue.
Comment by Daniel Siebrecht (DimensionSix) - Tuesday, 20 November 2007, 19:35 GMT+2
Thank you. It compiles now. I have 3 screendumps where text overlaps the images.
Comment by Brian Morey (Morey) - Tuesday, 20 November 2007, 21:01 GMT+2
Try this one.

Again, just add these images to "apps/plugins/bitmaps/native/"
Comment by Daniel Siebrecht (DimensionSix) - Tuesday, 20 November 2007, 21:53 GMT+2
Thank you again. The images fit now. Only one thing. The last line of the message "The contents of this case are yours to keep unless ..." is overlapped by the text "Press SELECT to choose case. Exactly as on the first screendump I attached to the last comment.

And the second problem. The new images aren't shown correct. Maybe this is a compiling error of me but cygwin didn't show up errors. (See new screendumps)
Comment by Brian Morey (Morey) - Tuesday, 20 November 2007, 22:33 GMT+2
Perform a "make clean" then re "make" and the images should show up right. I'll look into the other issues.
Comment by Brian Morey (Morey) - Wednesday, 21 November 2007, 02:09 GMT+2
This should fix the overlap in text.
Comment by Daniel Siebrecht (DimensionSix) - Wednesday, 21 November 2007, 13:53 GMT+2
Thx works now without any problems on H3xx. IMO the cases are a bit small, there's so much space, but that's no real problem. Also the resized images are not that good. I will change them myself and post you the result.
Comment by Isaac (Izzeh) - Wednesday, 28 November 2007, 01:54 GMT+2
Very nice! Works perfect and a fair bit of fun when you don't want to pay to much attention to it. This should definately be implemented...
Comment by Brian Morey (Morey) - Wednesday, 28 November 2007, 05:04 GMT+2
I'm glad people are enjoying the game. If you like this game please click on the vote link at the top of this thread so I get some feedback on people using it.

This post is a re-sync with svn and a tar ball of all of the images for this game.
Apply the patch then place these images in "apps/plugins/bitmaps/native/"
Comment by Dave Chapman (linuxstb) - Thursday, 29 November 2007, 10:24 GMT+2
I haven't tried the game yet, but a few comments from a quick read of the source:

1) The UP/DOWN mappings on the ipod look reversed - MENU is located at the top of the wheel (but is mapped as DOWN), and PLAY is at the bottom (but mapped as UP). Other targets use UP/DOWN normally.

2) It's enabled for all targets with bitmap displays, but is missing key mappings for all Archos targets.

3) You haven't included a (C) header with license information in the source files

Comment by Brian Morey (Morey) - Friday, 30 November 2007, 04:07 GMT+2
Thanks for the feedback linuxstb.

This version of the patch adds the following:
() Fixed the iPod UP/DOWN mapping
() Added support for Archos targets
() Added support for grayscale targets
() Added header license information to casegame.h
Comment by Brian Morey (Morey) - Friday, 14 December 2007, 04:17 GMT+2
This patch allows for high score name to replace the current entry if score ties a current entry. This was just ignored previously.
Comment by David Maliniak (major_works) - Thursday, 17 January 2008, 21:48 GMT+2
Seems out of sync again?
Comment by Brian Morey (Morey) - Sunday, 27 January 2008, 04:20 GMT+2
My computer has been down, hopefully i'll get a new sync soon.
Comment by Brian Morey (Morey) - Sunday, 27 January 2008, 05:48 GMT+2
That wasn't so bad. Here is a re-sync.
Comment by Isaac (Izzeh) - Saturday, 09 February 2008, 02:54 GMT+2
The images .tar doesn't appear to extract with winrar or 7zip - Gives a 320kb FILE :s
Comment by Brian Morey (Morey) - Tuesday, 12 February 2008, 01:43 GMT+2
Try this one.
Comment by Isaac (Izzeh) - Friday, 21 March 2008, 09:20 GMT+2
Hmm the images file isn't working again.. maybe it's my fault.. could someone possibly upload it to another site? www.savefile.com for example?
Comment by Thomas Martitz (kugel.) - Sunday, 18 May 2008, 01:04 GMT+2
Sync and clean up.
Comment by Craig Mann (inigomontoya) - Sunday, 18 May 2008, 19:18 GMT+2
I would suggest that the game should clear the backdrop on start to black. Depending on the backdrop, it is difficult to see the text on the screen.

Loading...