Jump to content
IGNORED

Jacks or Better (Video Poker)


Recommended Posts

You just arrived at your favorite casino, and threw $40 into the video poker machine.  Maybe today's the day you walk away with more than you came with? :)

 

I've spent the last few weeks working on a Jacks or Better poker game.  It's a WIP, but it's at a state now that it's playable so I wanted to share it.  There may be some bugs (more play testing is needed), and I'm planning on changing and/or adding some sound effects, graphics, and colors.  I have not yet tested this on real hardware.

I'm sure everyone knows how to play this game, but I'll run through some simple instructions anyway.

 

You start the game with 160 coins displayed in the bottom middle of the screen ($40 in quarters!).  You can play until you run out of coins.  At the top of the screen your credits are displayed, the object is to get as many credits as you can with the 160 credits you start with.  If you wind up with more than 160, you're doing great!

When you start the game, you first need to make your bet.  You can bet up to four coins at once, and the payouts are highlighted at the top of the screen.  After the initial draw, you can't change your bet.  With the "Bet" button highlighted, press the fire button to cycle between 1-4 coins per hand.  Once you've chosen your bet, push right and push the fire button with "Draw" highlighted.  5 cards will be presented.  Here you can choose to hold or drop each card.  Select HOLD with the left fire button and DROP with the right fire button.  After you have made your choices, push down to go back to the "Draw" button and push fire.  Your hand will be analyzed for a win.  After winning or losing that hand, the "New Hand" button will be highlighted.  Push fire to start with 5 new cards.

 

Enjoy!  Please give me some feedback & suggestions if you play! 

 

Steve

 

Version 1.35 Screenshots:

135B.thumb.png.d9bc478b929b5289c46b8d314b042a51.png135A.thumb.png.5ed4a44e3249b7a57bfb02c0ff6339f7.png135c.thumb.png.7874c1cc67e58616e195aa3c6935ab24.png135d.thumb.png.bd2b70c10911c20ceebcf0b992c9bc94.png

 

Latest Version:

JacksOrBetter_1.37.a78 JacksOrBetter_1.37.bin

 

Old Versions:

JacksOrBetter_1.35.a78JacksOrBetter_1.35.bin

JacksOrBetter_0.36.a78 JacksOrBetter_0.36.bin

JacksOrBetter0.44.a78JacksOrBetter0.44.bin

JacksOrBetter1.00.a78JacksOrBetter1.00.bin

JacksOrBetter_1.12.a78 JacksOrBetter_1.12.bin

 

Source Code:

card_gfx.zipJacksOrBetter_1.35_Source.bas

 

Older v0.36 Screenshot:

jacksorbetter_screenshot2.png

  • Like 11
Link to comment
Share on other sites

I just tested it on real hardware and it works great.

 

An issue I'm aware of is the lack of a joystick debounce routine for some of the button presses.  For example, when you first switch to selecting to drop or hold a card, it "holds" the first card if you hold down the fire button for too long when you select Draw.  I had some issues getting it to work properly with how the code is written, so I'm going to tackle that problem later.

JB_CC2.jpg

Link to comment
Share on other sites

Plays without issue under Concerto:

 

IMG_2194.jpg.13be871a169e1747725fd0b76c2f7c88.jpg

 

Though the CRT shown above displays down justified slightly, it may still be worth considering eliminating some of the empty space and raising the bottom line of information a bit.  Especially, for screens under the typical average of 224 lines seen.  If it were just graphics, the point would probably be moot, but for crucial statistical information/data, it is better to avoid the display 'boundary' area.

  • Like 1
Link to comment
Share on other sites

8 minutes ago, Trebor said:

Plays without issue under Concerto:

 

IMG_2194.jpg.13be871a169e1747725fd0b76c2f7c88.jpg

 

Though the CRT shown above displays down justified slightly, it may still be worth considering eliminating some of the empty space and raising the bottom line of information a bit.  Especially, for screens under the typical average of 224 lines seen.  If it were just graphics, the point would probably be moot, but for crucial statistical information/data, it is better to avoid the display 'boundary' area.

Thanks for the feedback Trebor. That’s certainly something I could change. I almost forgot that I can test with a Concerto now too, it’s a bit easier than adding a new game to the CC2. Right now the only thing on my Concerto is Death Merchant. ;)

  • Like 2
Link to comment
Share on other sites

Here's my latest update.  I'm not quite ready to call this done yet, but I'm close.  I changed some graphics and sounds and updated the title screen with an option to adjust your starting coins.  I also fixed the issue with the joystick fire button debounce and raised the bottom line of info per Trebor's suggestion.

 

Edit: Well, it happens sometimes.  You make some changes and break something unintentionally.  You won't earn credits in this verision, I'll have to review that and post another update.

 

jb1.png

 

jb2.png

JacksOrBetter0.42.a78 JacksOrBetter0.42.bin

  • Like 3
Link to comment
Share on other sites

Well I'm down to a bit over 1000 bytes free now so I think I'm done adding features.  A couple of quick playthroughs and everything looks good.  This will be the final release barring any further bugs found, so starting at 1.0 now.  I will release the source code in the future after I've had time to properly comment it.

 

JBspace.png

 

This version adds a new timer feature, so you can play with 2, 5, or 9 minutes of time without worrying about coins and still giving you an "end" to the game.  The coins remaining bar will now indicate you are in a timed mode, and there is a visual countdown timer in the middle of the screen.  Choosing a normal untimed game removes the timer bar.

 

JacksOrBetter1.00.bin JacksOrBetter1.00.a78

 

JB48-1.png

 

JB48-2.png

 

  • Like 3
Link to comment
Share on other sites

Had the following happen twice in a game with v1.00:

 

First occurrence:

v1_0.PNG.4fab92f4166d8e0d43d7313ebc92270c.PNG

 

Second occurrence:

v1_0-TOO.PNG.5ddcb82933ae5de581613e2cf1e748fc.PNG

 

-New hand of cards appear without any HOLD/DROP option.  
-When I press a joystick button while under a card, it makes no difference.
-Selecting "DRAW" generates a new hand of cards with no benefit or consequence from the prior, 'no card options' hand, and the game proceeds as normal.

 

*EDIT:  Perhaps it can be brightened-up some... $08 --> $0C

  • Like 1
Link to comment
Share on other sites

Thanks for pointing those issues out Trebor, I'll take a look in the coming days and try to reproduce/fix them.

 

Edit:  I found and fixed the issue, but holding off a bit longer on posting an update.  I freed up enough space to add something else I wanted to add and I'm working on that now...

  • Like 1
Link to comment
Share on other sites

Here's the updated binary that includes the items mentioned by @Trebor

 

Version 1.10:

  • Colors were brightened up.  It's a bit bright in emulation, but looks much better on real hardware.
  • The issue with the deck of cards occasionally showing up without the drop/hold option has been fixed.
  • I added a new statistics screen that you can pull up in-game, and also shows up now when the game is over.  It will show the number of each type of winning hand you drew, the number of hands you won and lost, and the number of coins used (or the timer selected) and your credits.

I played it for a while and haven't noticed any bugs.  I'll keep playtesting and post another update if I come across anything.  If there are no further bugs discovered this will be the final version.

 

I did a fair amount of code optimization in order to squeeze in the stats screen and I'm down to 100 or so bytes remaining in this build.  It's unlikely I'll add any more features.

 

Note: Update two posts down.

 

JacksOrBetter_1.10.bin JacksOrBetter_1.10.a78

  • Like 2
Link to comment
Share on other sites

I forgot to mention how to access the stats screen and how it works.

 

To access the statistics screen during the game, press the right button.  The right button is also of course used when you're choosing to drop or hold a card, so simply press the right button whenever you're NOT on the drop/hold area.  Once your enter the stats screen, press the left fire button to exit it.

 

When the game ends, the "Statistics" title will change to "Game Over", and the game will restart with your previously chosen menu options when you press left fire rather than just returning you to the game.

 

One other important note:  The statistics are updated whenever you press "Deal".  If you're in a timed game, you're close on time, make sure you deal the next hand to get credit for the win on the stats screen.

 

Hmmm.... now that I just thought about this, when you use your very last coin you won't be able to select deal again, so it won't add to your stats.  I'm going to test that and I'll add another call to the subroutine that checks it when your coins reach 0 if it's needed.  There may be another update soon.

  • Like 1
Link to comment
Share on other sites

Yep, that was a problem.  On your last coin it would not register the win or loss, and it wouldn't even show you on screen what happened on your final hand before switching over to the game over screen.  This minor update fixes it. 

 

When you spend your last coin (or run out of time), it runs the stats check again and will display the final action on the screen for about 3 seconds... then automatically take you to the game over statistics screen.  During that last 3 seconds you can't press the fire button to proceed (fire does nothing), but it's a very brief pause.  Based on how much ROM space I have left it was the most efficient solution to the problem.

 

 

 

 

JacksOrBetter_1.12.a78 JacksOrBetter_1.12.bin

  • Like 2
Link to comment
Share on other sites

ZeroPage Homebrew is playing Jacks or Better on tomorrow's stream LIVE on Twitch, hope you can join us!

 
Games:

After Dark:

 (WATCH IN 1080P60 FOR BEST QUALITY)

 

 

  • Like 2
Link to comment
Share on other sites

Heya Steve! Not sure if were able to catch the stream last night but we noticed some possible issues with the game missing possible winning hands, but we may be misunderstanding the rules. Should the hand below win with  'Two Pair' or do you have to have them be Jacks or above?

 

- James

 

image.thumb.png.c1c8779dec1cd3948827de4d7145adce.png

  • Like 1
Link to comment
Share on other sites

22 hours ago, ZeroPage Homebrew said:

Heya Steve! Not sure if were able to catch the stream last night but we noticed some possible issues with the game missing possible winning hands, but we may be misunderstanding the rules. Should the hand below win with  'Two Pair' or do you have to have them be Jacks or above?

 

- James

 

image.thumb.png.c1c8779dec1cd3948827de4d7145adce.png

I based the game logic simply on some basic rules I read on the internet for video poker.  The hand in the picture should in fact be a 2 pair winner.  I missed two checks for two pairs.  Regarding the "jacks or better" rule, that only applies if you draw a single pair. 

 

I missed the two combinations below when checking for two pairs.  it's been fixed and a new post with that fix is coming shortly.  If you noticed any other hands that didn't properly register as a win please let me know.

 

;  1     2     3     4     5
; ---   ---   ---   ---   ---
;  x           y     y     x
;  x     y     y           x
Link to comment
Share on other sites

9 hours ago, gambler172 said:

Hi Steve

 

maybe, I am wrong?

But is not this a win?IMG_20220731_104937.thumb.jpg.b72ab785303c6aec64e8ca666c29f460.jpg

Btw the game is great

As I read the video poker rules originally, the hand above would not be a straight (King - Ace - 10 - Jack - Queen).  The ace cannot be the 2nd, 3rd or 4th card, which is how my current game logic processes the hand when checking for a straight.  The Ace must be high or low.

 

I'll do a little more reading, but I think this is the expected result.

Link to comment
Share on other sites

I found one more missing two pair check.  At this point I'll just re-review all of the game logic to make sure there are no other omissions.

 

If anyone plays and comes across a hand that doesn't register properly as a win or a loss, please let me know.

JacksOrBetter_1.14.a78 JacksOrBetter_1.14.bin

Link to comment
Share on other sites

43 minutes ago, Atarius Maximus said:

I found one more missing two pair check.  At this point I'll just re-review all of the game logic to make sure there are no other omissions.

 

If anyone plays and comes across a hand that doesn't register properly as a win or a loss, please let me know.

JacksOrBetter_1.14.a78 36.13 kB · 1 download JacksOrBetter_1.14.bin 36.01 kB · 1 download

Something is bad about the dumps - they're each oddly sized, missing 12kB, compared to the previous releases.

Link to comment
Share on other sites

You're right Trebor, sorry about that.  I've been doing more than one thing at the same time today, I'm a little bit busy.  The last version didn't compile correctly because I'm out of ROM space in the current build so I'll have to do some cleanup.  I didn't notice that earlier.  It'll have to wait until this evening.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...