Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Poker4k  (Read 6761 times)
0 Members and 1 Guest are viewing this topic.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Posted 2005-12-07 19:30:41 »

This will be my first 4k entry ever... wooh!

The fake 3D renderer took about one third of the code, gameplay and AI fill the gap. The jar is exactly 4096 bytes. All rules of standard poker are implemented, you only can't bet for ingame coins yet. Their purpose is decoration Smiley

The AI does a bruteforce calculation and manages to swap cards in a perfect way.

For those new to standard poker, or for those who know standard poker and think I messed up on the rules, here is how to play it:
- click the card-deck to get your cards
- click on the cards you want to swap, they will raise.
- click the desk to swap cards
- you'll see who won the round
- click anything to start the new round

Here is the JAR (you'll have to find the sourcecode yourself Tongue go for it!)
Here is the JNLP (added mime-types through .htaccess Grin)
And some screenshots:









The game might not be the most thrilling or all entries, I admit, but I'm very proud of it Grin

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #1 - Posted 2005-12-07 19:34:31 »

Looks very impressive, I can't understand how you managed to get those graphics in 4k... however, it won't start. Lack of manifest file?

(Says invalid or corrupt jar file, so there might be some other problem).

EDIT: Worked when I extracted class via winrar and fired it up manually. Very impressive graphics, albeit slow - it takes a long time to do most things :/

Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #2 - Posted 2005-12-07 19:36:20 »

Same here, cannot run the jar file.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2005-12-07 19:37:14 »

1  
java -cp A.jar A


to get around the missing manifest Angry Embarrassed The JNLP version will solve that, right?

Oh, and it uses Java 1.5 (nanoTime for smooth gfx)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #4 - Posted 2005-12-07 19:42:09 »

Yep, the JNLP should fix that. However, contest rules says 1.4.2, so I guess nanoTime's not allowed?

EDIT: That source code was well hidden, haha Cheesy

EDIT2: I'm really impressed with this one - you all manage to get your graphics so awesome :>

Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #5 - Posted 2005-12-07 19:44:07 »

Pretty cool and very nice graphics! Card animations are great too!

How about adding some stats: e.g. you automatically bet $10 per
hand. So you see: "Won 7/10 hands" / "Total Earnings: $20" or
something like that?

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #6 - Posted 2005-12-07 19:47:46 »

Yup, thanks for the feedback! I was thinking some stats too, but ATM I have no space for it unfortunately.

I think I can optimize a lot to get back some bytes. Adding stats is the first thing on the todo-list Kiss

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2005-12-07 19:50:27 »

Very impressive graphics, albeit slow - it takes a lone time to do most things :/

Mind to share some specs?

It works smooth on a P4 1.8

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #8 - Posted 2005-12-07 19:53:19 »

P4 2.4 Ghz, XP Pro... runs smoothly, but has long loading times (that is, it takes a few seconds before I get to see the cards after I get them).

Also, I had two aces and lost versus Bill (who had a pair of fours). That doesn't seem right? Smiley

Offline Markus_Persson

JGO Wizard


Medals: 15
Projects: 19


Mojang Specifications


« Reply #9 - Posted 2005-12-07 20:00:03 »

Holy sweet looking graphics, batman!

I really like those shadows. =)

Play Minecraft!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #10 - Posted 2005-12-07 20:08:09 »

Hehe.. you found the bug!

Aces are worth 1
2's are worth 2
9's are worth 9
K's are worth 13

It's a heck of a lot work to get that fixed, as most stuff is stored in long long LONGs.

 Angry

For those who care why:
All suits locations on the cards for each and every card, are stored in 1 long: 768154053244724416L. Finding the position-data is done with bit-shifting. When I make the ace worth more, I have to remove it from the beginning and add it add the end of the cards. so i'd have to re-encode all those longs and, well, I'm not feeling like it! Cheesy

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #11 - Posted 2005-12-07 20:19:30 »

nice graphics Cheesy - but the something that can make you play a game for ages simply misses. It starts to get boring after some time.

:: JOODE :: Xith3d :: OdeJava ::
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #12 - Posted 2005-12-07 20:22:38 »

Indeed. I consider it a proof-of-concept, until I get betting in, then it might be addicting... it might... "Win the most money in X rounds" ... maybe? The replay value still wouldn't be jawdropping Smiley

I will keep working on the little game to make it better. Feel free to share your two cents!

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #13 - Posted 2005-12-07 20:44:49 »

What about not using the real poker rules, but random generated rules, where you have to think of new tactics every round and so on.
Hmm - the AI would then be rather difficult...
Or you can add a timer, so you'll only have let's say 10 secs to make your decision. You could shorten that time for higher levels.

:: JOODE :: Xith3d :: OdeJava ::
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #14 - Posted 2005-12-07 22:33:28 »

I'm not sure about the timer idea... doesn't run smoothly enough for that on my computer, I'm sure the ten seconds wouldn't be enough to make a decision (as it takes at least 5 before I get to see the cards).

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #15 - Posted 2005-12-07 22:49:12 »

Create a file called "A.jnlp" in the same directory as your A.jar file, then put the following code in it:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
<?xml version="1.0" encoding="utf-8"?>
<jnlp
  spec="1.0+"
  codebase="http://www.songprojector.com/static/"
  href="A.jnlp">
  <information>
    <title>Poker4K</title>
    <vendor>Riven</vendor>
    <description>A Poker Game with psuedo-3D graphics and AI in 4 kilobytes.</description>
    <description kind="short">A Poker Game in 4K.</description>
    <offline-allowed/>
  </information>
  <resources>
    <j2se version="1.4.2,1.5+"/>
    <jar href="A.jar"/>
  </resources>
  <application-desc main-class="A"/>
</jnlp>


It can't be tested anywhere but on the server. That should do the trick. Smiley

P.S. Your JAR file can have a long filename without impacting the size of the JAR itself. It's always nicer to have something like "Poker4K.jar" instead of A.jar.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2005-12-07 23:55:32 »

Well yes, thank you, although I know how to make JNLP files, I only need a server that had the proper mime-type set.

Maybe modern browsers will ignore the mime-type all together (I know IE ignores a lot of things...) so I'll give it a go.



Update: IE opens it in its XML editor, bah.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #17 - Posted 2005-12-08 00:01:51 »

I'm not sure about the timer idea... doesn't run smoothly enough for that on my computer, I'm sure the ten seconds wouldn't be enough to make a decision (as it takes at least 5 before I get to see the cards).

There is not any loading going on, so I think there is something wrong in my timing code. For me it takes 1s (manual delay) to get the cards in standing position. It can be any delay, even 0ms. I'll try to fine-tune it, or fix a bug that's causing the delay to last longer.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #18 - Posted 2005-12-08 01:13:21 »

Oh, sorry. Misread that as "someone get me a JNLP file, quick". If you need a server, I can provide. Just let me know. Smiley

P.S. Even if the MIME type is wrong, users can always download the JNLP then execute it.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #19 - Posted 2005-12-08 03:02:12 »

Found another bug.

I had AQJT6

Computer AQ542

And it said that I lost.  This wouldn't be the Ace bug, because we both had aces.

ps.  Nice job with the 3D.  Works smooth on my machine.  AMD Athlon 64 3000+, 512MB, ASUS Radeon 9600PRO

Offline woogley
« Reply #20 - Posted 2005-12-08 05:56:17 »

great graphics, very impressive

don't forget you have to at least support 1.4.2 in order for the entry to pass validation, which means nanoTime() isn't available this year ..
Offline hvor2

Junior Member




Beyond mind, there is an awareness...


« Reply #21 - Posted 2005-12-08 10:22:51 »

Wow! In 4k? I have to think how the heck did you manage it? Very very nice cartoonish graphics. I like pictures very much. And i'm very sad  Cry Cry Cry that required version is 1.5 because im at my job now and have 1.4. Can't wait to see it in action at home...

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #22 - Posted 2005-12-08 10:28:35 »

currentTimeMillis is jerky... (and takes more bytes Tongue)

I could make a 2nd version that supports Java 1.4 and call it B.jar and B.jnlp

As for how I did it: be a tiny bit creative and you'll find the source-code Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #23 - Posted 2005-12-08 16:39:12 »

Didn't have to be that creative, haha...
(As I said earlier.) Smiley

Offline f.l.x

Senior Member


Projects: 3


there is no place like 127.0.0.1


« Reply #24 - Posted 2005-12-08 17:27:13 »

Very impresive graphics for 4k! good game! Smiley

Litterarum radices amaras, fructus dulces
http://flx.proyectoanonimo.com
figth spam!
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #25 - Posted 2005-12-08 17:40:58 »

w00t!

hehe..

I'll spend every free hour adding stats and betting! Hm... that would be tomorrow then Undecided

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #26 - Posted 2005-12-08 18:36:20 »

Nice visuals Smiley

Btw you can use longer names for the jar and the jnlp file.

弾幕 ☆ @mahonnaiseblog
Offline appel

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #27 - Posted 2006-01-31 15:20:07 »

Looks very impressive.

1. On my system (win xp) I don't seem to have the font that enables me to see the hearts, spades etc. All I see is a square.
2. The jar file doesnt have a manifest file, so I can't doubleclick on it and run.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #28 - Posted 2006-01-31 15:25:34 »

Wow, that was a nice *bump* Smiley



The font is Helvetica, which I assumed to be commonly available on systems.

There are lots of tiny bugs in the game, and it lacks good gameplay, but well, 4 weeks remaining Smiley
The problem is, I have optimized the heck out of it, and changing anything will be a complete nightmare.


the JAR file has no manifest because that would be a waste of space. When using JNLP no manifest is required.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Reply #29 - Posted 2006-02-01 02:49:40 »

Uh oh appel, that's a standard font on Windows!  Sounds like something messed up on your machine  Grin

Great job on the game Riven!
I have some insight on how you did your graphics as my card games on GameLizard have the same strategy in place.  All the cards in my games are created through Java2D, no pre-made graphics, and I like em best that way!  I lack real art skills so I pride myself in being able to produce pretty things through Java2D haha.

But anyway, very well done Smiley  The game runs perfectly smooth for me and all of the effects are just great.  The graphics really do look well polished.  Now if you could only fit in more gameplay... Wink

Don't you love it?  I'm sure all the other 4k entry developers understand how it feels to cram all you can into that 4k and then watch people say, "could you add this and this?" haha

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Pages: [1] 2
  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.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (44 views)
2014-09-23 14:38:19

radar3301 (27 views)
2014-09-21 23:33:17

BurntPizza (63 views)
2014-09-21 02:42:18

BurntPizza (32 views)
2014-09-21 01:30:30

moogie (40 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!