07/17/2009, 05:46 AM
|
#1 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
http://www.precentral.net/homebrew-apps/craps
So, this is my first time writing an application from scratch, go easy on me. ![]() It's a very simple craps game, with only the two most basic bets: pass, and don't pass. I just released 1.0, and I'd say barring any bugs this might be my last version. It does the main stuff very well now, and the only thing to add would be more bets. I did some initial planning of the logic that would be involved with all of that and I'd say at least for the time being, it's too much for me. Source code is attached here, ipk in the Homebrew App link above. Anyway, if you play this game a lot, donations are welcomed. I did spend a little bit more time on this than I expected when I started it on a whim to learn Javascript because I couldn't sleep, but donations aren't a requirement or anything. The link is in the app menu, but if it's easier on the PC, it's here as well for anyone who wants it. If someone wants to contact the people who are doing that webOS-internals repository too, then it can definitely be included there as well. Also, if anyone is curious about the very preliminary planning work I started doing for additional versions past 1.0 (still probably not happening): Craps Application. Maybe it'll show why I decided against it. (And I have no idea why it's showing as dotted lines in the uploaded version, for the record.)1.0.0: Changed up Help scene to fit better. Added description for slider. 0.9.1: Fixed a bug where the shake function was still be listened for while in help-scene. (Forgot to add it to the Assistant.prototype.deactivate function.) 0.9.0: Accelerometer/ shake support! Shake to roll implemented thanks to boydell for his eight-ball app for helping me realize that shakeend works, just not shakestart. Make sure you hold onto your Pre tightly while shaking, there's some tactile feedback as well. I'm not responsible if it slips out of your hand. ![]() v0.8.8: Working on accelerometer stuff but the two commands I need don't seem to be working. Wanted to get out GUI fixes from last two updates. Accelerometer stuff is commented out and therefore not present in this release. v0.8.7: (Unreleased) Changed from text boxes to just palm-body-text. Looks much cleaner that way, and I was able to consolidate Bet & Money to the same line, which gives more room in case of notifications. A ton of behind the scenes changes had to happen for this. v0.8.6: (Unreleased) The bet slider is a little too touchy for my liking, so I decided to round to the nearest 5. Sort of like a minimum bet at a casino, and it makes it much easier to select the number you want. v0.8.5: Fixed game logic and help scene- a 12 on initial roll with don't pass bet is actually a draw / push. v0.8.0: Adds data storage support via a cookie and a reset button in the menu, as well as polls the slider every 0.1 seconds to aid in selecting a bet. Also made help scene fit on one page without needing to scroll. v0.7.0: Reworked help scene. Fixed bug mentioned below in v0.6.0. Reorganized functions to better prepare for when we finally get the accelerometer support. Disabled Roll button while in the process of rolling. v0.6.0: Work on prettying it up. Better dice graphics and added a function to make it seem like you're actually rolling dice rather than getting a number instantly. Bug- after the first roll, it's now possible to change the radiobutton mid-game. The disabling function doesn't kick in until the second roll. Working on that now. v0.5.0: Added a slider for the bet instead of having to type the number, Made text boxes read-only, Added Error if you try to bet more money than you have. v0.4.5: (Unreleased) Figured out why Radio button was off center. v0.4.0: Added How to Play and About to AppMenu. v0.3.0: Figured out how to conditionally disable the radio button depending on whether a game is in progress or not. v0.2.5: Changed Roll Dice color to stand out more. v0.2.0: Added Don't Pass mode, changed app ID. If you installed a previous version to this, delete before installing. v0.1.0: Removed Error Dialogs. v0.0.3: Added Betting. v0.0.2: Placeholder GUI. v0.0.1: Proof of Concept App. Last edited by jhoff80; 08/05/2009 at 05:46 PM. |
07/18/2009, 12:10 PM
|
#2 (permalink) |
|
Homebrew Developer
![]() Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
|
It looks great. I can't wait to see where you take this!
- Craig
__________________
- Milo → Getting Started → Ringtones → Videos/Movies → Patches/Themes → Music Player(Remix) → Battery Life → Backup/Syncing → Great Signal-Airave → iPhone Theme → Forum Guidelines |
07/18/2009, 06:57 PM
|
#3 (permalink) |
|
Member
![]() Join Date: May 2009
Location: ATL/ Athens, GA
Posts: 413
Likes Received: 0
Thanks: 61
Thanked 27 Times in 24 Posts
|
loves it. Now i dont have to look for a piece of cardboard to throw my dice on. Just shake my pre! (in future app that is)
__________________
SCK Manager
|
07/18/2009, 08:00 PM
|
#4 (permalink) |
|
Homebrew Developer
![]() Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
|
Would you update your OP with your most recent ipk? That is the convention in Homebrew because not everyone will go through looking to see if there is an update.
- Craig
__________________
- Milo → Getting Started → Ringtones → Videos/Movies → Patches/Themes → Music Player(Remix) → Battery Life → Backup/Syncing → Great Signal-Airave → iPhone Theme → Forum Guidelines Last edited by Milominderbinder; 07/18/2009 at 08:05 PM. |
07/18/2009, 08:45 PM
|
#5 (permalink) |
|
Member
![]() ![]() Join Date: Apr 2009
Location: Boston, MA
Posts: 773
Likes Received: 0
Thanks: 191
Thanked 101 Times in 58 Posts
|
Ditto. To update the thread title, PM Darth Pooh with the old and new version numbers and whether your app requires rooting or not. I know yours doesn't, but with the [NRR] at the end of the post, it's easier to know what's what.
|
07/18/2009, 08:58 PM
|
#6 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Yeah, this got moved on its own to homebrew apps, it was originally in webOS development, which is why it was set up like that.
I've now cleaned everything up in the first post so it should be easier for everyone. Last edited by jhoff80; 07/18/2009 at 09:13 PM. |
07/18/2009, 11:59 PM
|
#7 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Just uploaded a small update, 0.4.0. If you already know how to play craps, it's not a huge update. I'd been trying for a while tonight to get the cookie storage to work so that the money you've won remains between sessions, but couldn't get it to work so I'll return to that later.
|
07/19/2009, 11:18 AM
|
#9 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
v0.6.0 is done. There's a bug with the disable/enable function so you'll probably have some issues with the radio button with this version, but I am aware of that and working on it.
|
07/19/2009, 11:31 AM
|
#10 (permalink) |
|
Member
![]() ![]() Join Date: Apr 2009
Location: Boston, MA
Posts: 773
Likes Received: 0
Thanks: 191
Thanked 101 Times in 58 Posts
|
Thanx for the How to Play scene, but I don't understand the Don't Pass bet. There is too much going on to know what is opposite or how it would work.
Thanx for your work. Storing information in cookies has worked for other HB Devs. |
07/19/2009, 11:54 AM
|
#12 (permalink) |
|
Member
![]() ![]() Join Date: Apr 2009
Location: Boston, MA
Posts: 773
Likes Received: 0
Thanks: 191
Thanked 101 Times in 58 Posts
|
Are you able to install or update other apps? I've had this problem twice already. Try deleting some apps --Homebrew and App Cat -- and then try installing again. I have no idea what the problem is or how that fixes it, but that fixes it for me.
|
07/19/2009, 12:37 PM
|
#13 (permalink) |
|
Member
![]() Join Date: Jan 2004
Location: Southern MA
Posts: 274
Likes Received: 0
Thanks: 26
Thanked 12 Times in 9 Posts
|
I've not had a problem installing other Homebrew apps. I thought that perhaps it was an issue with the updated version 0.6.0. I was even able to install other Homebrew apps since trying the install of 0.6.0.
|
07/19/2009, 01:14 PM
|
#14 (permalink) | ||
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Quote:
Quote:
![]() I probably won't have time today to get that taken care of, but I'm hoping to do that tomorrow or the next day (unless of course the update that enables accelerometer APIs comes out before then, that's too cool to just not try immediately. )Can't say I've had that problem, but I've repackaged the ipk and reuploaded it to the first post, so you might want to download again, delete any old versions, and try reinstalling it. Last edited by jhoff80; 07/19/2009 at 06:01 PM. |
||
07/19/2009, 06:07 PM
|
#15 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
v0.7.0 up now. If anyone has any visual suggestions for the application, please, let me know.
All that really remains other than the visual stuff (which I'm pretty much running out of ideas for improving that) is the Cookie support and Accelerometer support. |
07/19/2009, 11:03 PM
|
#16 (permalink) | |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Quote:
v0.8.0 was just finished, adds data storage support via a cookie and a reset button in the menu, as well as polls the slider every 0.1 seconds to aid in selecting a bet.To reiterate now, if anyone has any ideas for how I can improve how the app looks, let me know, because I'm running out of ideas to make it look nicer. (I'll figure out the code, just tell me how you think it can be improved.) |
|
07/19/2009, 11:23 PM
|
#17 (permalink) |
|
Member
![]() Join Date: Jan 2005
Location: Southern California
Posts: 644
Likes Received: 0
Thanks: 126
Thanked 43 Times in 22 Posts
|
Great job on the app as well as the detailed updates too...
__________________
Remember, this is my opinion ! We all have a right to our own..... Treo's 650-800..NOW, Palm Pre
|
07/20/2009, 11:41 AM
|
#20 (permalink) |
|
Homebrew Developer
![]() Join Date: May 2009
Posts: 72
Likes Received: 3
Thanks: 0
Thanked 5 Times in 2 Posts
|
Well done. This should make teaching people craps a lot easier
If you want any ideas for future updates you could try to add complexity and implement "come bets" and the ability to add odds when betting on specific numbers. I know that's a lot of logic to program but if you need something to keep you busy it's perfect ;-) I think this craps game would be a great free app while the other one could be a welcome upgrade for a few bucks in the official app store. Just an idea of course. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



