Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Online No Limit Texas Hold'Em 4K  (Read 5485 times)
0 Members and 1 Guest are viewing this topic.
Offline EnderGT

Junior Devvie





« Posted 2009-02-05 03:52:41 »

networking is not on the cards.
Funny you should say that...  Cool

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!
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #1 - Posted 2009-02-05 16:20:30 »

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?
Quote
<jnlp spec="1.0+" codebase="file:///C:/Personal/4KJO/">

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline SimonH
« Reply #2 - Posted 2009-02-05 16:28:20 »

Seems kinda a lot of work to just start playing - I'd prefer some AI rather than the multiplayer code...  Undecided

People make games and games make people
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zeroone
« Reply #3 - Posted 2009-02-05 21:09:42 »

Do the rules permit network access?
Offline EnderGT

Junior Devvie





« Reply #4 - Posted 2009-02-05 23:20:50 »

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.
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.

Incidentally, are you aware neither of the jnlp files you've linked to work?
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.
Offline EnderGT

Junior Devvie





« Reply #5 - Posted 2009-02-05 23:22:37 »

Seems kinda a lot of work to just start playing - I'd prefer some AI rather than the multiplayer code...  Undecided
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.
Offline EnderGT

Junior Devvie





« Reply #6 - Posted 2009-02-05 23:24:29 »

Do the rules permit network access?
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.
Offline SimonH
« Reply #7 - Posted 2009-02-06 04:57:28 »

I considered AI vs multiplayer, and decided that multiplayer was a greater challenge
I think you were right!  Grin

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

People make games and games make people
Offline EnderGT

Junior Devvie





« Reply #8 - Posted 2009-02-06 11:36:38 »

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 Smiley Or maybe not, it's all good Smiley
Offline muggins

Junior Newbie





« Reply #9 - Posted 2009-02-06 21:39:05 »

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!  Smiley

Muggins
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Hsaka
« Reply #10 - Posted 2009-02-06 22:34:06 »

Anyone up for some Hold'em?

Nice work, can't wait to play  Wink
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #11 - Posted 2009-02-06 22:58:34 »

I guess i'm connected... not a whole lot of feedback from the interface Smiley

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline muggins

Junior Newbie





« Reply #12 - Posted 2009-02-07 00:01:02 »

No, I guess not.

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


Muggins
Offline EnderGT

Junior Devvie





« Reply #13 - Posted 2009-02-07 03:10:07 »

I guess i'm connected... not a whole lot of feedback from the interface Smiley

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.
Offline EnderGT

Junior Devvie





« Reply #14 - Posted 2009-02-07 03:10:31 »

No, I guess not.

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



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

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 Smiley
Offline Hsaka
« Reply #15 - Posted 2009-02-07 03:29:58 »

Hehe, it was me.. was hoping one more person would join  Grin

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

Junior Devvie





« Reply #16 - Posted 2009-02-07 04:55:20 »

Hehe, it was me.. was hoping one more person would join  Grin

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.
Offline toasten

Junior Devvie





« Reply #17 - Posted 2009-02-07 13:51:02 »

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

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
Offline muggins

Junior Newbie





« Reply #18 - Posted 2009-02-07 14:00:53 »

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

Muggins
Offline EnderGT

Junior Devvie





« Reply #19 - Posted 2009-02-07 15:44:42 »

Just played against myself. Ok not that much fun, but at least it worked  Grin
And working is half the battle Smiley  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.

Just an inconsistency i found:
When ther is Fold, Call, Raise and All In  you can click "B" as for Bet.  Wink
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.

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
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.
Offline muggins

Junior Newbie





« Reply #20 - Posted 2009-02-24 20:10:48 »

Do you plan to develop this further?

As in: Beyond the 4K barrier, to add some user-friendliness, some rules, maybe a bit 'o eye candy?

If so, I'll continue to host it and link it as a game on our board.  Wink

Muggins
Offline EnderGT

Junior Devvie





« Reply #21 - Posted 2009-02-25 00:04:34 »

Do you plan to develop this further?

As in: Beyond the 4K barrier, to add some user-friendliness, some rules, maybe a bit 'o eye candy?

If so, I'll continue to host it and link it as a game on our board.  Wink

If there's interest, I wouldn't mind doing so... without the 4K limit, there's lots of functionality that can be added Smiley
Offline muggins

Junior Newbie





« Reply #22 - Posted 2009-03-03 23:27:18 »

Well, sure! I've been hosting the 4K version for weeks with no traffic.

Maybe it could be big fun, if you have the time to fool with it.  Grin

Muggins
Offline StephR

Senior Devvie


Medals: 9



« Reply #23 - Posted 2009-03-04 08:01:17 »

It's really too bad you didn't take the way of a poker game against a smart IA ; I'm sure there would have been a really great interest in it. And making your game multiplayer was not only a greater programmation challenge, but also the gamer interest would have been much less important in my opinion, as most of the time it is difficult to understand how such multiplayer games work...
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #24 - Posted 2009-03-04 10:13:33 »

I know for a fact that the ruling every year has been that you cannot provide arguments with the JNLP. It has been clearly stated before; if was not this year, this is simply a mistake on behalf of the organizers.

How does one go about hosting or joining a server? I'm confused. Smiley

Offline EnderGT

Junior Devvie





« Reply #25 - Posted 2009-03-07 03:07:22 »

I know for a fact that the ruling every year has been that you cannot provide arguments with the JNLP. It has been clearly stated before; if was not this year, this is simply a mistake on behalf of the organizers.

How does one go about hosting or joining a server? I'm confused. Smiley

In defense of my choice to use arguments on the command line - it is 4 bytes of data, and my jar file is more than 4 bytes lower than the 4k limit. It is also not sound data, art data, game logic, etc, it is configuration only - and I know other games have used the command line for configuration options before, such as whether to run windowed or full screen. That being said, this solution makes it the easiest for those wishing to host a server to do so with the least amount of trouble, and allows players to connect with the least amount of trouble.

That being said, all one has to do to host is a) have an http server up and running, and configured correctly (to host the jnlp file and jar), b) edit the client jnlp file to include your server's address, and c) either start the server from the server jnlp file or from the command line with java -jar Poker4k.jar. Point prospective players to the client jnlp file, and play on.

Also: You might need to make sure any firewalls and/or port forwarding are configured correctly.. the game connects on port 0x4096 (or 16534, for you hex challenged individuals - do we have any of those here?)
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (55 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (86 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (81 views)
2014-12-05 12:39:02

SHC (91 views)
2014-12-03 16:27:13

CopyableCougar4 (98 views)
2014-11-29 21:32:03

toopeicgaming1999 (157 views)
2014-11-26 15:22:04

toopeicgaming1999 (154 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!