Riven
|
 |
«
Posted
2005-12-07 20: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  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 go for it!) Here is the JNLP (added mime-types through .htaccess  ) And some screenshots:     The game might not be the most thrilling or all entries, I admit, but I'm very proud of it 
|
|
|
|
Morre
|
 |
«
Reply #1 - Posted
2005-12-07 20: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 :/
|
|
|
|
noblemaster
|
 |
«
Reply #2 - Posted
2005-12-07 20:36:20 » |
|
Same here, cannot run the jar file.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Riven
|
 |
«
Reply #3 - Posted
2005-12-07 20:37:14 » |
|
to get around the missing manifest  The JNLP version will solve that, right? Oh, and it uses Java 1.5 (nanoTime for smooth gfx)
|
|
|
|
Morre
|
 |
«
Reply #4 - Posted
2005-12-07 20: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  EDIT2: I'm really impressed with this one - you all manage to get your graphics so awesome :>
|
|
|
|
noblemaster
|
 |
«
Reply #5 - Posted
2005-12-07 20: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?
|
|
|
|
Riven
|
 |
«
Reply #6 - Posted
2005-12-07 20: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 
|
|
|
|
Riven
|
 |
«
Reply #7 - Posted
2005-12-07 20: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
|
|
|
|
Morre
|
 |
«
Reply #8 - Posted
2005-12-07 20: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? 
|
|
|
|
Markus_Persson
|
 |
«
Reply #9 - Posted
2005-12-07 21:00:03 » |
|
Holy sweet looking graphics, batman!
I really like those shadows. =)
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Riven
|
 |
«
Reply #10 - Posted
2005-12-07 21: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.  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! 
|
|
|
|
arne
Senior Member   
money is the worst drug- we should not let it rule
|
 |
«
Reply #11 - Posted
2005-12-07 21:19:30 » |
|
nice graphics  - but the something that can make you play a game for ages simply misses. It starts to get boring after some time.
|
|
|
|
Riven
|
 |
«
Reply #12 - Posted
2005-12-07 21: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  I will keep working on the little game to make it better. Feel free to share your two cents!
|
|
|
|
arne
Senior Member   
money is the worst drug- we should not let it rule
|
 |
«
Reply #13 - Posted
2005-12-07 21: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.
|
|
|
|
Morre
|
 |
«
Reply #14 - Posted
2005-12-07 23: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).
|
|
|
|
jbanes
|
 |
«
Reply #15 - Posted
2005-12-07 23: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.  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.
|
|
|
|
Riven
|
 |
«
Reply #16 - Posted
2005-12-08 00: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.
|
|
|
|
Riven
|
 |
«
Reply #17 - Posted
2005-12-08 01: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.
|
|
|
|
jbanes
|
 |
«
Reply #18 - Posted
2005-12-08 02: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.  P.S. Even if the MIME type is wrong, users can always download the JNLP then execute it.
|
|
|
|
CaptainJester
|
 |
«
Reply #19 - Posted
2005-12-08 04: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
|
|
|
|
woogley
|
 |
«
Reply #20 - Posted
2005-12-08 06: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 ..
|
|
|
|
|
|
|
Riven
|
 |
«
Reply #22 - Posted
2005-12-08 11:28:35 » |
|
currentTimeMillis is jerky... (and takes more bytes  ) 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 
|
|
|
|
Morre
|
 |
«
Reply #23 - Posted
2005-12-08 17:39:12 » |
|
Didn't have to be that creative, haha... (As I said earlier.) 
|
|
|
|
f.l.x
|
 |
«
Reply #24 - Posted
2005-12-08 18:27:13 » |
|
Very impresive graphics for 4k! good game! 
|
|
|
|
Riven
|
 |
«
Reply #25 - Posted
2005-12-08 18:40:58 » |
|
w00t! hehe.. I'll spend every free hour adding stats and betting! Hm... that would be tomorrow then 
|
|
|
|
oNyx
|
 |
«
Reply #26 - Posted
2005-12-08 19:36:20 » |
|
Nice visuals  Btw you can use longer names for the jar and the jnlp file.
|
|
|
|
appel
|
 |
«
Reply #27 - Posted
2006-01-31 16: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.
|
|
|
|
Riven
|
 |
«
Reply #28 - Posted
2006-01-31 16:25:34 » |
|
Wow, that was a nice *bump*  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  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.
|
|
|
|
Malohkan
|
 |
«
Reply #29 - Posted
2006-02-01 03:49:40 » |
|
Uh oh appel, that's a standard font on Windows! Sounds like something messed up on your machine  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  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...  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
|
|
|
|
|