Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (407)
games submitted by our members
Games in WIP (293)
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  
  First Game - Blackjack  (Read 1765 times)
0 Members and 1 Guest are viewing this topic.
Offline JosephML

Junior Newbie





« Posted 2012-02-12 20:30:40 »

I wrote the majority of this in hotel rooms and, as a result it's full of bugs, but it's not too bad for a first attempt (I think). Theoretically, you can use both mouse and keyboard input but for some reason mouse input throws a bunch of stack overflow errors. Eventually I hope to implement AI players with differing skill based on probability and different tables with different max/min bets etc and maybe even, if I ever get round to it, some sort of networking function.

In the mean time enjoy (or not).

The source can be found here: http://www.mediafire.com/?hjk86r94s103luv

And compiled here.
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #1 - Posted 2012-02-12 20:50:42 »

It's best if you give us a ready made jar instead of making us compile and run Tongue

It runs really fine, I was actually surprised how professional it felt with all the smooth moving and fading transitions.

I did get a continuously printing exception at java.awt.AWTEventMulticaster.mouseMoved(...) that occurred whenever the mouse moved. Scrolling up did not show the source of the exception, that line just kept getting printed in droves.

Great job Smiley

Offline JosephML

Junior Newbie





« Reply #2 - Posted 2012-02-12 20:57:23 »

The stack overflow on mouse move is very annoying and I can't get the root of the problem for some reason... I think it's something to do with info box thing which I'll probably take out anyway cause it looks rubbish.
Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #3 - Posted 2012-02-12 20:59:23 »

I have never heard of that class in my entire 3 years using Java2D :S

Offline JosephML

Junior Newbie





« Reply #4 - Posted 2012-02-12 21:03:30 »

Which class?
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #5 - Posted 2012-02-12 21:04:34 »

AWTEventMulticaster Smiley

Offline sproingie
« Reply #6 - Posted 2012-02-13 00:39:33 »

Sounds to me like there's an event loop, which will manifest as a stack overflow error.  Probably spiking the CPU really good whenever you move the mouse, so fixing it should make things run a lot more smoothly.
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #7 - Posted 2012-02-13 00:43:15 »

Oh well guess what I found Tongue
It also seems like an internal Swing bug too.

Offline elamre

JGO Coder


Medals: 15
Projects: 1


hitar!


« Reply #8 - Posted 2012-02-13 01:03:18 »

Im not abble to play it.
Sometimes it keeps asking for my Name. Also i can spell my name with unlimited length.
And the other times i get in, then i can bet. After i pressed +5, i press go.
Nothing happens from here on, nothing. Cant press anything either.

My projects:
Tower Defence!]http://www.java-gaming.org/topics/iconified/25690/view.html]Tower Defence! [lll.......] 30%!
Lightsnakerider! [llllll....] 60%!
Offline ReBirth
« Reply #9 - Posted 2012-02-13 05:37:40 »

I'm in work time. Executable jar would be great.

Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline JosephML

Junior Newbie





« Reply #10 - Posted 2012-02-13 08:16:14 »

Im not abble to play it.
Sometimes it keeps asking for my Name. Also i can spell my name with unlimited length.
And the other times i get in, then i can bet. After i pressed +5, i press go.
Nothing happens from here on, nothing. Cant press anything either.

This happens if you use mouse input in the menus which is annoying, if you use keyboard input it should be fine.

I'm in work time. Executable jar would be great.

The compiled version is an executable jar?
Offline ReBirth
« Reply #11 - Posted 2012-02-13 08:38:07 »

No, I meant if it was. Compiled version need to packed into jar first so I just double click to run it.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (88 views)
2013-05-17 21:29:12

alaslipknot (96 views)
2013-05-16 21:24:48

gouessej (128 views)
2013-05-16 00:53:38

gouessej (123 views)
2013-05-16 00:17:58

theagentd (131 views)
2013-05-15 15:01:13

theagentd (119 views)
2013-05-15 15:00:54

StreetDoggy (161 views)
2013-05-14 15:56:26

kutucuk (184 views)
2013-05-12 17:10:36

kutucuk (185 views)
2013-05-12 15:36:09

UnluckyDevil (191 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.078 seconds with 22 queries.