First Game - Blackjack

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.

It’s best if you give us a ready made jar instead of making us compile and run :stuck_out_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 :slight_smile:

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.

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

Which class?

AWTEventMulticaster :slight_smile:

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.

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

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.

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

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

The compiled version is an executable jar?

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