Online No Limit Texas Hold'Em 4K

[quote=“pjt33,post:1,topic:32792”]
Funny you should say that… 8)

Online No-Limit Texas Hold’Em Poker in 4K!

I’ll need hosting before people can play this, but I’m working on arranging that now. As it is, there are 2 jnlp files, one for running the server and one for running the client. Those wishing to run their own server will need to modify the client jnlp file to provide the appropriate IP address, and then make that jnlp file available to their players.

The jar file is not signed - when testing this on my local machine (both server and clients running locally) I was able to run it without signing. If the lack of signature causes problems with connections over the wider internet, I will be happy to sign it and repost.

Notes about the game:

The game will start when 3 or more people have connected.
There are no side pots. When one player goes all-in, no further raises are allowed.
To play, type the first letter of your desired action when prompted - F for Fold, C for Call or Check, B for Bet, R for Raise, or A for All In.

Enjoy!

I don’t want to ruin the fun, but do the rules not stipulate the game needs to be playable without supplying any arguments (either from the jnlp or command-line).
If they don’t, they need to (and used to), otherwise you can completely bypass the 4kb size limitation by passing in as much data as you like.

I’ve found throwing up an input dialog asking the user for a host is the cleanest approach.
Cancelling the dialog will return null indicating the game should begin hosting, otherwise you have a String containing the host name or ip address to connect to.

:edit:

Incidentally, are you aware neither of the jnlp files you’ve linked to work?

Seems kinda a lot of work to just start playing - I’d prefer some AI rather than the multiplayer code… :-\

Do the rules permit network access?

No, they don’t. I understand the reason to include such a rule, but the rules as posted at java4k.com do not stipulate such a restriction. However - in the interests of fairness, if it is deemed necessary I will be happy to attempt to modify the game to take input in a manner similar to your recommendation.

[quote=“Abuse,post:2,topic:32940”]
Yes. Without hosting, the codebase would prevent the files from running on all systems no matter what I put there. I am in the process of arranging hosting, and it should be up later tonight or early tomorrow.

Additionally, I realized while reviewing the rules that I did make an error with this submission - it is not compiled for 1.5. I will recompile and repost.

[quote=“SimonH,post:3,topic:32940”]
The “lot of work” should disappear once hosting is arranged.

I considered AI vs multiplayer, and decided that multiplayer was a greater challenge, and was what I wanted to try. I may create an AI version, we’ll see how my schedule looks in the next few weeks.

[quote=“zeroone,post:4,topic:32940”]
Yes. What the rules do not allow is downloading of content (resource files, sound files, images, etc) from an external site.

This game is 100% self-contained. All logic, artwork, etc is contained within the one jarfile, which is less than 4K.

[quote=“EnderGT,post:6,topic:32940”]
I think you were right! ;D

A 4K game server is pretty impressive - but I just want an instant hit…

I hear ya… maybe after I convince someone to set up a server, you’ll give it a try :slight_smile: Or maybe not, it’s all good :slight_smile:

Hi all! EnderGT has asked me to set up a server instance.

The client can be found here: Texas Hold’em…

We are working through some bugs in connectivity, so please give us feedback in this thread! :slight_smile:

Anyone up for some Hold’em?

Nice work, can’t wait to play :wink:

I guess i’m connected… not a whole lot of feedback from the interface :slight_smile:

No, I guess not.

I saw that someone was on-line here at least once today, so a remote connection works…

Yeah, that’s the problem with the multiplayer code… not much room left at all for user interface stuff. I tried to leave in as much as I could, but it’s a really, really tight fit.

Basically, if the client runs, you’re connected. Period. You’ll see a red box with your starting cash (2000), and a blue box with your current bet (0). If there are others connected, you’ll see their red boxes with their cash, and their blue boxes with their current bets. If there is a game in progress, you should also see the cards (face down, unless they are in the showdown) and pot values.

Once a game starts, the active player will be shown with a yellow background. If it’s your turn, you will also see an action bar with your choices. Type the first letter of your choice, and the game will continue. At the end of the hand, the winner’s (or winners’) blue box will turn gold with red lettering showing the amount won.

A note about the showdown - if a player raised during the last round, the last player to raise will be the first to show their cards. Otherwise the player at the dealer’s left will be the first. Progressing around the table to the left, if a player’s hand is equal to or better than the previously shown hands, then their hand will be shown, otherwise it will be automatically mucked.

There is a hidden 1 minute (approximately) timeout for user action. If the server does not receive your input within that minute, your hand will be automatically folded.

Never fear that the person running the server will have an unfair advantage - they cannot see anyone’s cards unless the cards are face up for the whole table to see.

Last but not least, the game will start when 3 people or more join. Switching from heads-up (2 people) to normal play and back was a bit more than I could fit into the game.

Yep, it works! Now to get people on all at the same time :slight_smile:

Edit: now I wish I’d been able to fit even a crude chat interface… someone else is on, but there’s no telling who :slight_smile:

Hehe, it was me… was hoping one more person would join ;D

Edit: …maybe you could allow the game to start with a minimum of 2 people?

The problem is that the rules for advancing the dealer button and who posts the small and large blinds are different for 2 players than they are for 3 or more. I can take another look at it, and see if I can make it fit.

Just played against myself. Ok not that much fun, but at least it worked ;D

Just an inconsistency i found:
When ther is Fold, Call, Raise and All In you can click “B” as for Bet. :wink:

Edit: I think it’s just as a matter of size that you had no chance to implement it, but if multiple players going all in, there is only one pot

If y’all join my forum at Sapo’s Joint, you’ll have access to a chat board during play.

And working is half the battle :slight_smile: There’s a lot of features I wanted to include to make it more fun (like chat), but the multiplayer code doesn’t leave much room for anything else.

Yep. There’s really only four actions - Fold, Call/Check, Bet/Raise, and All In - and I didn’t think it worth the bytes to make sure you hit the right letter for the Bet/Raise action, since it does the right thing either way.

Yep. The side pot implementation was very costly, and I couldn’t find a cheaper way of doing it, so instead it’s tournament-style.