+atari2600land Posted April 1, 2009 Share Posted April 1, 2009 For my next project, I thought I'd do a game that isn't on the 2600: Video Poker. Despite my earlier efforts, I think i'll get farther in this game than i have on previous attempts to make a video poker game for the 2600. There are a few bugs, though. #1 - the scanline is constant at 263, and #2 - see the picture below. You can select all five new cards by holding the reset button for a second or two. videopoker.bas.bin videopoker.bas Quote Link to comment Share on other sites More sharing options...
Piggles Posted April 1, 2009 Share Posted April 1, 2009 For my next project, I thought I'd do a game that isn't on the 2600: Video Poker. Despite my earlier efforts, I think i'll get farther in this game than i have on previous attempts to make a video poker game for the 2600. There are a few bugs, though. #1 - the scanline is constant at 263, and #2 - see the picture below. You can select all five new cards by holding the reset button for a second or two. It's a good start. The batari kernel may not be good for showing multiple hands of cards. But if your opponent's hand is hidden, then perhaps you'd hit Difficult switch a to b to see the opposing hand. Or if it's a texas holdem poker, the common cards could be viewed by sliding the switch, and then switching back to your and with the switch. You could use the multisprite kernel for a 3 player hold-em game, you vs two comps. Switch back and forth between displaying the two-card hands and the 5 common cards. Make it a supercharger game and use the extra ram for computer betting and folding A.I. I bet there's a way to use a pointer to a set of graphics without having to code manually all the cards for each sprite. There's 52 cards in a standard deck, so each card held could have a value of 1 to 52. A little if-then can prevent duplicates, and then you can call the appropriate subroutine to set the graphics for your sprite. I do believe there was a question posted here a few months back to that effect. I'll see if I can find it. I used a blue outline just so i knew not to get outside the 8 pixel width limit. Perhaps something like that would be good for your game. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted April 1, 2009 Author Share Posted April 1, 2009 This isn't a multiple-hands type of poker, this is the type of poker computer machine you'd find at a casino. 1 Quote Link to comment Share on other sites More sharing options...
MausGames Posted April 1, 2009 Share Posted April 1, 2009 Video Poker is the only electronic game I play at casinos, it's about the only electronic game there that requires some skill and attention to go with your luck. I hope your game allows you double-up when you win, and has Jacks or Better and Deuces Wild modes. Quote Link to comment Share on other sites More sharing options...
jrok Posted April 1, 2009 Share Posted April 1, 2009 Video Poker is the only electronic game I play at casinos, it's about the only electronic game there that requires some skill and attention to go with your luck. I hope your game allows you double-up when you win, and has Jacks or Better and Deuces Wild modes. Good call, yeah. I got a little hot streak going the last time I went to Atlantic City. First I hit for a straight flush on the video poker at the bar, then racked up a couple of hundred out on the floor. You definitely do have to pay attention to what you are doing. It would be nice to have those options. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted April 1, 2009 Author Share Posted April 1, 2009 You can now select cards to drop and get new ones. To do this, select a card you want to get rid of by using up & down and press fire. The card will then turn blue. To actually get the new cards, make the arrow go all the way down to the blank space and press fire. The version i'm posting here is different from the first, even though they have the same file name. videopoker.bas.bin videopoker.bas Quote Link to comment Share on other sites More sharing options...
+Atarius Maximus Posted April 2, 2009 Share Posted April 2, 2009 You can now select cards to drop and get new ones. To do this, select a card you want to get rid of by using up & down and press fire. The card will then turn blue. To actually get the new cards, make the arrow go all the way down to the blank space and press fire. The version i'm posting here is different from the first, even though they have the same file name. Looks good, nice game so far. Are you working on any further additions to the game, like a scoring system or maybe a computer opponent? Piggles had some good suggestions, maybe you could switch between two separate screens for the player and computer's hands. Steve Quote Link to comment Share on other sites More sharing options...
Snider-man Posted April 2, 2009 Share Posted April 2, 2009 (edited) You can now select cards to drop and get new ones. To do this, select a card you want to get rid of by using up & down and press fire. The card will then turn blue. To actually get the new cards, make the arrow go all the way down to the blank space and press fire. The version i'm posting here is different from the first, even though they have the same file name. Looks good, nice game so far. Are you working on any further additions to the game, like a scoring system or maybe a computer opponent? Piggles had some good suggestions, maybe you could switch between two separate screens for the player and computer's hands. Steve You're confusing this with a sim of sit-down Table Poker. In Casino Video Poker, you're not competing against another player. Video Poker is like a Slot Machine - solo game. You input whatever bet you'd like to make - up to the max. Youu're dealt five cards on the screen. You select the cards in your hand you want to keep and the dealer give you your replacement cards. Your final hand pays out depending on the poker hand. Usually the minimum payout is 1 to 1 for a pair of Jacks or better. Royal Flush is a 250-to-1 payout. Some machines have wild cards (Twos and Jokers) that make filling those better hands easier too. So - no - there is no opponent to play against just like there is no opponent when you pay the slots. Edited April 2, 2009 by Snider-man Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 28, 2009 Author Share Posted September 28, 2009 I decided to start over again - mainly because I got a new computer, and second if I looked at the code of the previous version, i would probably not be able to understand it. Right now, it displays 5 cards. That's it so far. This took about 2-3 hours. vp1.bin default.bas Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 28, 2009 Author Share Posted September 28, 2009 Now it plays more like it's supposed to: you can pick cards to keep and redeal. I haven't added any pair, flush or straight recognition yet. You'll notice when you start a new game, the score briefly turns red for a frame or so. Is there any way to tell what that number that is? I can't seem to time it right to pause it in Stella. default.bas vp3.bin Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 29, 2009 Author Share Posted September 29, 2009 (edited) Added some hands: one pair, two pair, three of a kind, full house, and flush. What I need to add is royal flush, four of a kind, straight flush and straight. I don't have any idea how I'm going to make it recognize a straight, though (i.e. 5, 6, 7, 8 & 9). Anyone have any ideas? Here's the breakdown of the "payments": one pair (Jacks or better) - 1 two pair - 2 three of a kind - 3 straight (not implemented yet) - 4 flush - 5 full house - 6 four of a kind (not implemented yet) - 7 straight flush - 8 royal flush - 9 vp4.bin default.bas Edited September 29, 2009 by atari2600land 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted September 29, 2009 Share Posted September 29, 2009 Added some hands: one pair, two pair, three of a kind, full house, and flush. What I need to add is royal flush, four of a kind, straight flush and straight. I don't have any idea how I'm going to make it recognize a straight, though (i.e. 5, 6, 7, 8 & 9). Anyone have any ideas? Here's the breakdown of the "payments": one pair (Jacks or better) - 1 two pair - 2 three of a kind - 3 straight (not implemented yet) - 4 flush - 5 full house - 6 four of a kind (not implemented yet) - 7 straight flush - 8 royal flush - 9 I will download it and try it out and let you know what I think when I get home this evening, looks like an interesting game!!! Thanks Disjaukifa Quote Link to comment Share on other sites More sharing options...
Zufolek Posted September 30, 2009 Share Posted September 30, 2009 To detect a straight, you could sort the card values from lowest to highest and check if card1=n and card2=n+1 and card3=n+2, etc. You could use a for-loop to make n=1 to 9 or whatever to let it check each possible straight. Best regards, Zuf Quote Link to comment Share on other sites More sharing options...
Zufolek Posted October 3, 2009 Share Posted October 3, 2009 Actually, I think you wouldn't need the for-loop if you sort the values, since you would know which card has the lowest value. You could just check that card1 equals card2-1, etc. You could use another way to avoid sorting, though. You could use a loop to check that there are cards all with values n to n+4. There are an infinite number of ways to solve any problem, so you may be able to come up with another solution. Quote Link to comment Share on other sites More sharing options...
supercat Posted October 7, 2009 Share Posted October 7, 2009 If one doesn't mind using 16-bit maths for things, one can rather easily detect card combinations with minimal RAM by using a bitmask table (0,0,0,0,0,0,0,0,1,2,4,8,16,32,64,128,0,0,0,0,0) and then doing something like: ; Initialization lda #0 sta oddL sta oddH sta evenL sta evenH ; Assume following code is run once for each card; the card number in X register ; is in the range 0..12 (for A-K). lda mask+8,x and oddL eor evenL sta evenL lda mask+8,x eor oddL sta oddL lda mask,x and oddH eor evenH sta evenH lda mask,x eor oddH sta oddH ; Then run the following code to normalize things ; (may loop forever if there were a odd number of ; cards). lp: lda oddL ora evenL lsr beq done lsr oddH ror oddL lsr evenH ror evenL jmp lp Now if oddH:oddL are $1E:01 the player has a royal; if oddL is $1F the player has a straight. If oddL is 1 and all other bytes are zero, player has four of a kind. I'll post the other card combinations later if you need. Quote Link to comment Share on other sites More sharing options...
+Living Room Arcade Posted December 14, 2023 Share Posted December 14, 2023 (edited) @atari2600land Hey, I got a straight 7-8-9-10-J, where's my payout! Edited December 14, 2023 by Living Room Arcade Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 14, 2023 Author Share Posted December 14, 2023 Why are you digging up my old 10+-year-old projects? They're just from my early days of programming. My newer ones are much better. Quote Link to comment Share on other sites More sharing options...
+Living Room Arcade Posted December 14, 2023 Share Posted December 14, 2023 6 hours ago, atari2600land said: Why are you digging up my old 10+-year-old projects? They're just from my early days of programming. My newer ones are much better. Hello @atari2600land! Well, because I like video poker. And I like your video poker game. Quote Link to comment Share on other sites More sharing options...
+Living Room Arcade Posted December 15, 2023 Share Posted December 15, 2023 (edited) @atari2600land Even though your Video Poker game is 10+ years old as you say, I really like it, and I was just wondering if you had any time to work on it. I think it needs to recognize straights and four of a kind hands. Looks like it's almost done. Edited December 15, 2023 by Living Room Arcade Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.