6 ms·
Show HN: I've open sourced DD Poker
I'm the original author of DD Poker, a Java-based computer game that ran on Mac, Linux and Windows and originally sold in stores in physical boxes.
I shut down the backend servers in 2017 but the game is still functional and people can still play each other online even though the central lobby and find-a-game functionality no longer work.
I've been asked over the years to release the source code, especially during the pandemic, and again this year. I finally got motivated to clean up the code and put it out there.
The code is 20 years old and uses some ancient Spring, log4j, Wicket and other dependencies, but it still works on Java 1.8.
- _mlbt 2y agoThank you for taking the time to open source this! It’s fun peeking at the source code of old games from bygone eras and more open source games are definitely a good thing.
- dougdonohoe 2y agoMy pleasure. Thanks for taking a peek.
- namanyayg 2y agoI've never worked with Java before. Out of curiosity, do you think the game's architecture and tech stack would be easily portable to a more modern setup, or would it require a significant rewrite?
- dougdonohoe 2y agoThe architecture is very Java centric. The UI is all Swing based (no 3D graphics engine stuff). I would think very little is portable to a modern gaming engine.
- pc86 2y agoJava 22 was released less than a month ago.
- deleted 2y ago[deleted]
- dudinax 2y agoAny plans to release the source for War Age of Imperialism? I bought and played the heck out of that game years ago but never could get anyone to try it multiplayer. Thanks for the great games!
- dougdonohoe 2y agoGlad you enjoyed the games! Unfortunately, I don't own the IP rights to War! Age of Imperialism, so can't release the source code.
- romac 2y agoI wonder if this could be made to work in the browser using CheerpJ? https://cheerpj.com https://cheerpj.com
- dougdonohoe 2y agoInteresting. I hadn't heard of this before. I'll have to check it out.
- apignotti 2y agoLead dev of CheerpJ here, if you need support you can find us on Discord: https://discord.gg/X9ruPkchM5 https://discord.gg/X9ruPkchM5 Edit: Tool a quick look at the repo, if the game is a Java 8 Swing application (as it seems) then it will most likely work out-of-the-box with CheerpJ
- BatmansMom 2y agoPorted my java game to Cheerp and it was the easiest thing ever. I highly recommend and you can see the results here: http://liarsdiceonline.com http://liarsdiceonline.com Only criticism is that it can take a few MINUTES to initially load the game and there isn't a loading bar or anything
- apignotti 2y agoI see the game was ported with the legacy CheerpJ 2.3 runtime. Consider upgrading to the new CheerpJ 3.0. Improving boot times has been one of our main goals and upgrading is very easy: https://cheerpj.com/docs/migrating-from-cheerpj2 https://cheerpj.com/docs/migrating-from-cheerpj2
- TSP00N3 2y agoFun game! I thought you programmed it wrong till I realized in your version of liars dice 1s are wild. Also never played the way of guessing the total number of dots, and we always have loser go first on the next round. Thanks for sharing!
- jonrosner 2y agoWow thanks a lot! We played DD Poker during the Pandemic. It really saved us from going insane:)
- dougdonohoe 2y agoThat's great! You are the 2nd person who's told me that. You don't happen to know someone named Ryan in Oakland?
- jonrosner 2y agoNo, I am from germany. Also good job on programming a game that plays flawlessly on pretty much all systems after so much time. Also, online play via IP address was super easy.
- localfirst 2y ago[flagged]
- dougdonohoe 2y agoIt should just work. The developer notes mention M1 (https://github.com/dougdonohoe/ddpoker/blob/main/README-DEV.md https://github.com/dougdonohoe/ddpoker/blob/main/README-DEV....), specifically around which java to install. If you are having trouble, feel free to file an issue.
- bigiain 2y agoJava: Write once, debug everywhere. <smirk>
- localfirst 2y agocareful these type of comments might get you flagged like mine: any instructions on how to get this running on m1
- v64 2y agoThank you for taking the time to clean this up and release it. I've never played DD Poker, but have experienced the loss of other games when servers go down and the software stops being updated. I realize source releases aren't always possible, so it's a great gift to the community when one can make it happen and they put in the effort to do so.
- dougdonohoe 2y agoThanks for the kind words. It did take a bit of work, but it was my pleasure to do so. I hope it is valuable to someone!
- cjcole 2y agoThanks! (My son loves to play.) BTW, the old Windows installer runs great under Crossover on Apple Silicon. I'm going to try running this native. I'll file issues for what I can't readily fix.
- dougdonohoe 2y agoAwesome, glad to hear your son likes it. Thanks for your help.
- TheDudeMan 2y agoCould you say a bit about how the poker AI works? I know it's not modern, but just curious. Thanks.
- PaulRobinson 2y agoThe source code is right there, you can dive in. [0] I just took a very quick scan read, and think by modern standards calling it "AI" would be a stretch ;) [0] https://github.com/dougdonohoe/ddpoker/tree/main/code/poker/src/main/java/com/donohoedigital/games/poker/ai https://github.com/dougdonohoe/ddpoker/tree/main/code/poker/... - I recommend looking at V1Player.java and V2Player.java in particular
- dougdonohoe 2y agoThere is a write up in the docs/AI_Whitepaper.rtf file.
- fnord77 2y agoah, good old Java Swing. Spent years working on big Swing projects. BTW, you want to wrap statements like this in a logger.isDebugEnabled() especially in the paint loop because otherwise you always incur the cost of string concat, debug or not! > logger.debug("REPAINT COMPONENT "+(CNT++)+" ("+ImageComponent.getDebugColorName()+") portion " + bounds_.x +","+bounds_.y+" " +bounds_.width+"x"+bounds_.height);
- dougdonohoe 2y agoThat code block is in an "if (debug)" block, which is enabled if "settings.debug=true" is set.
- indigodaddy 2y ago“Even though DD Poker and the backend servers was shutdown in July 2017, folks continue to play it by manually sharing game URLs” Anyone have more details about how the above works?
- dougdonohoe 2y agoThe in-game help explains, which I have a copy here: https://static.ddpoker.com/gamehelp/help/hostonline.html https://static.ddpoker.com/gamehelp/help/hostonline.html
- SloopJon 2y agoThis was a bit of a bear to get running on my Mac. Everything depends on ddpoker.rc, which doesn't behave as expected unless an OSNAME environment variable is defined. I don't have that on macOS 14 (Sonoma) Mac using either zsh or bash. I hopped onto a 10.13 (High Sierra) hackintosh, and it doesn't have that variable either. For the person who was having trouble getting this to work on an M1 Mac (flagged, really?), try this (after installing Java 8 and Maven using Homebrew): % git clone https://github.com/dougdonohoe/ddpoker.git ... % cd ddpoker % export OSNAME=darwin % source ddpoker.rc JAVA_HOME changed, version now openjdk version "1.8.0_422" % mvn-package-no-tests ... % poker I built this before figuring out the OSNAME thing, so I can't actually vouch for the build step working out of the box. Anyway, thank you very much, Doug. This looks really cool.
- dougdonohoe 2y agoI'll have to fix the OSNAME thing, my apologies. That's an env var I have in my local ".zshrc" I had overlooked. I'll fix it later today.
- dougdonohoe 2y agoThis is fixed. Proper variable is `OSTYPE`, which I've fixed. `OSNAME` is a personal historical artifact.
- galenmarchetti 2y agofast fix! appreciate this
- dougdonohoe 2y agoI added a `TL;DR` section to the base readme with jus this info.
- dougdonohoe 2y agoI just added functionality to allow users to specify a DD Poker backend server in the UI (see https://github.com/dougdonohoe/ddpoker/issues/1 https://github.com/dougdonohoe/ddpoker/issues/1). This makes it easier for users to connect to a private DD Poker server in their community.