Rockbox

Tasklist

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

Attached to Project: Rockbox
Opened by Brian Morey (Morey) - Monday, 19 November 2007, 02:50 GMT
Task Type Patches
Category Games
Status Unconfirmed
Assigned To No-one
Operating System Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
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, 13:21 GMT
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, 13:31 GMT
Here are the files.
Comment by Daniel Siebrecht (DimensionSix) - Monday, 19 November 2007, 14:14 GMT
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, 14:25 GMT
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, 14:58 GMT
This one should include button mapping for the H3xx.
Comment by harry tu (bookshare) - Tuesday, 20 November 2007, 06:28 GMT
What do I o o make it work on the ipod4g?
Comment by Jonathan Gordon (jdgordon) - Tuesday, 20 November 2007, 06:31 GMT
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, 06:32 GMT
What nees to be done t support none color targts
Comment by Jonathan Gordon (jdgordon) - Tuesday, 20 November 2007, 06:33 GMT
the buttons and drawing code will need to be sorted for each target
Comment by harry tu (bookshare) - Tuesday, 20 November 2007, 06:40 GMT
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, 15:40 GMT
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, 17:15 GMT
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, 18:07 GMT
This should fix that issue.
Comment by Daniel Siebrecht (DimensionSix) - Tuesday, 20 November 2007, 18:35 GMT
Thank you. It compiles now. I have 3 screendumps where text overlaps the images.
Comment by Brian Morey (Morey) - Tuesday, 20 November 2007, 20:01 GMT
Try this one.

Again, just add these images to "apps/plugins/bitmaps/native/"
Comment by Daniel Siebrecht (DimensionSix) - Tuesday, 20 November 2007, 20:53 GMT
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, 21:33 GMT
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, 01:09 GMT
This should fix the overlap in text.
Comment by Daniel Siebrecht (DimensionSix) - Wednesday, 21 November 2007, 12:53 GMT
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, 00:54 GMT
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, 04:04 GMT
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, 09:24 GMT
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, 03:07 GMT
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, 03:17 GMT
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, 20:48 GMT
Seems out of sync again?
Comment by Brian Morey (Morey) - Sunday, 27 January 2008, 03:20 GMT
My computer has been down, hopefully i'll get a new sync soon.
Comment by Brian Morey (Morey) - Sunday, 27 January 2008, 04:48 GMT
That wasn't so bad. Here is a re-sync.
Comment by Isaac (Izzeh) - Saturday, 09 February 2008, 01:54 GMT
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, 00:43 GMT
Try this one.
Comment by Isaac (Izzeh) - Friday, 21 March 2008, 08:20 GMT
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.) - Saturday, 17 May 2008, 23:04 GMT
Sync and clean up.
Comment by Craig Mann (inigomontoya) - Sunday, 18 May 2008, 17:18 GMT
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.
Comment by Brian Morey (Morey) - Thursday, 31 July 2008, 20:44 GMT
The backdrop appears to clear whenever the application starts on my Sansa. What platform are you having trouble with the text on?
Comment by Craig Mann (inigomontoya) - Thursday, 31 July 2008, 22:07 GMT
I'm using a Sansa E200 with r17981.
Comment by Brian Morey (Morey) - Thursday, 13 November 2008, 21:36 GMT
Everything looks good to me.

Here is a sync with svn 19102.
Don't forget to install the casegame_images.zip file from above.

Comment by Johannes Linke (Jaykay) - Saturday, 20 December 2008, 11:39 GMT
it think its ready to commit...?
Comment by Brian Morey (Morey) - Sunday, 21 December 2008, 04:03 GMT
That would be my opinion. I've spent a lot of time testing and it seems to work really well.
Comment by Brian Morey (Morey) - Sunday, 24 May 2009, 05:16 GMT
Here is a sync with svn 21065.
Don't forget to install the casegame_images.zip file from above.
Comment by Brian Morey (Morey) - Monday, 12 October 2009, 19:45 GMT
Here is a sync with svn 23129

* Fixed Makefile implementation to conform to standard
* Updated structures with the new implementations in svn

Don't forget to install the casegame_images.zip file from above.

Loading...