Big Updates to Oh Craps!

More fun updates to my Oh Craps game! I had a bunch of ideas and worked them all into my code, play tested them all, and just pushed them out to the Master branch up on git. I follow a lot of different Craps content creators on YouTube, and when I come across a strategy, I make sure it is playable within my game. I created the following features and tweaks:

• I rewrote the entire game from the ground up using Python3. Code-wise, I made all the betting and features much more modular and centered around functions rather than using straight-forward if statements all over the place like in the original Python2 variant of the game. All the Line Bets, Come Bets, Place and Lay Bets, Prop Bets, and Odds have been encapsulated into dictionaries rather than being individual variables. This makes the overall flow in the game more efficient, and easier to parse and understand when messing with the code. Running in Python 3, I’m also no longer running into the VoiceOver issue in Terminal where the game would just stop or not read out the current terminal prompt. VoiceOver does still seem to hiccup a bit in the way it tries to read out the Terminal prompts ever so often, sometimes repeating an input prompt or print string, making you have to interact with the Terminal text and jump down to the last line to figure out which prompt is currently active, but once you get the hang of the game layout and flow, it’s easy to work around this VO bug. The game also seems to run a little better in iTerm.

• The biggest feature update to the game is my Chips on the Table feature. Originally, all betting was done from the bank, but the bank never took into account the bets you actually had out on the table. If you had a bankroll of $100, you could keep making bets as long as each individual bet didn’t exceed $100, so you could put out much more than $100 all over the table. Now, every time you make a bet, or when bets win and come down, or when you lose a bet, I update a variable that is keeping track of what you have out on the table, and every bet you make is tracked to make sure it does not exceed your bankroll. The chips on the table are subtracted from the overall bankroll to ensure that you aren’t betting more than you actually have in your rack, so no more bet cheating!

• My original game plan only allowed you to make either a Pass or Don’t Pass bet. I retooled this so you can add both bets rather than one or the other. I utilize the same bet mechanic as my Prop bets, where you initiate the bet, use ‘p’ or ‘d’ to choose the bet you want to make, type in your number, then it loops you back to the main Line betting prompt, where you type ‘x’ to exit or one of the other prompts to make another bet. It then returns you to the main game flow.

• If you make a Don’t Pass bet, once a Point is established and you are in Phase 2, an option to take down the Don’t Pass bet appears. In Craps, Pass Line bets are contractual, so once you make them, you are not allowed to remove them until you win or a 7 out. However, Don’t Pass has a much lower House advantage, so casinos allow you to remove them whenever you want. I built in this feature to emulate that, and it will take down both your Don’t Pass bet and Don’t Pass Odds at the same time. Once they are down, you cannot bet on Don’t Pass again until the next Come Out roll.

• You can now place odds for both Pass and Don’t Pass bets in Phase 2, rather than the original either or situation I had. You can take them both down whenever you like and they both show up in the game flow so you always know how much you have bet on both.

• I fixed the Don’t Come Odds since it turns out that I forgot to add in the whole function of adding winnings to the bank. Odds would win, but the bank wouldn’t actually be updated with the win amount. That was rather silly of me.

• Lay Bets received an upgrade to ensure they paid out correctly and properly adjusted the Chips on the Table amount.

• The All Tall Small feature wasn’t actually working correctly. Turns out that when you set three variables equal to an empty list in Python, all three of those variables are associated with each other rather than becoming initialized as an individual empty list. So when numbers were being added to the Small list, the Tall list would also get the same number appended, and vice verse, so the Small and Tall would never actually pay out when they hit since their lists would be full of the wrong numbers. I set them all equal to their own empty lists and now the ATS works perfectly. I even hit the Small, Tall, and All in one playthrough without having to set up my dice rolling test to hit sequential numbers and forgive the 7 out! It’s a rare feat, so that payout was rather enjoyable. Remember, the Small and Tall pay out 35:1 each, and the All pays out 176:1, so when you have $5 on each bet, woohoo!

• I gave the bank initialization and management system an upgrade, making sure it checks if you have enough money for each individual bet you make, plus built in an ATM so if you needed more money during a hand, you are now able to add more to the bank if you are running low. Much nicer than having to quit and restart the game to reset your bankroll. Made sure that you can’t set a $0 bankroll nor a negative one.

Phew! The next features I’m working on right now are a few more Prop bets and Hop Bets. Prop and Hop bets are the worst bets in Craps, but people like them and certain strategies require specific numbers to be hopped, so will work them all in. Hop Bets are when you bet on specific dice outcomes to appear and they are one-roll bets. If you told the dealer to “Hop the 7s for #3 each” for example, you would throw out $9 and they would place $3 on each of the three outcomes possible that make a 7; 1-6, 2-5, and 3-4. Each of the individual hop bets pay 15:1, so if on the next roll a 1-6 appeared, you’d win $45, but you’d lose the other $6 that was spread out to the other two combinations.

Hard Way hopping is also a thing, where you can bet on any combination of dice pair outcomes to pop up, and those pay 30:1. So all the Hard Ways like 4, 6, 8, and 10, but also including 2 and 12. Unlike Hard Ways bets, these are only one-roll bets rather than staying up until a 7 out. Not only are there ways to make individual bets across number outcomes, but individual ways that each number can come out can be bet, which increases the difficulty of making sure this feature in my game is accessible and intuitive to use. There are also specific Prop Bets that can be made which set up groups of bets across the Hop Bets. A “Buffalo” bet sets up bets on the hard ways plus the 7 as a one-roll bet, so this would utilize the Hop betting across the hard ways. “Hop the Easies” is a bet that strews bets across all the easy-way hop numbers on the table, so generally made in $15 increments since there are 15 individual outcomes that get covered. Currently building this vetting experience in such a way that a player will be able to use proper language to set the bet, much like an adventure game. There will be short codes, but I like having user input to increase the variability of game play.

If interested in giving my game a try, head over to this github link: Marconiusiii Oh Craps!

Download the OhCraps_Py3.command file, and double-click it from the Finder to have it launch in Terminal. If you are more comfortable with the command line, change your directory to wherever you downloaded the command file and type:

$ python3 OhCraps_Py3.command

Hit Enter and the game will start! When you are done playing, close out the Terminal window or type Ctrl+C to terminate the game and go back to your main Terminal prompt. Enjoy!


Posted

in

by