Can anyone recommend this book?

Hi all

I’ve done a fair bit of general Java Programming in the past including some Java3D way back at uni but would like to start learning how to program games more thoroughly. Can anyone recommend a good book? I’m mainly interested in doing 2D gaming to start with - some networked gaming would be good too.

I found this one on Amazon - http://www.amazon.co.uk/gp/product/1590591232/026-7900344-5010846?v=glance&n=266239 - it caught my eye because it said “whereas other Java game programming books focus on introductory Java material, this book covers game programming for experienced Java developers”. Obviously, I don’t want to waste time going through the very basics.

One question though - this book uses Swing rather than AWT - which would you advise me to go for?

Any other good books?

Thanks.

when it comes to (relatively) new technologies, like java in a gaming context, I’m much more inclined to get my information on the internet, rather than a book. They tend to get outdates before the publication date.

Besides:

if the book talks about generic game design concepts and/or patterns, the language doesn’t matter very much and you’ll be helped just as much by “classic” game design books for other languages. Especially since you know your Java very well.

if the book is specifically about Java OTOH, the book will need to talk about other bindings than Java3D (if only to make a comparison), and you might be better off reading this here forum :smiley: or the documentation of the specific libraries.

Thanks for the reply.

I’ve not done Java for a couple of years so I’m a bit out of touch. Given the current climate what kind of resources / tutorials should I be look for to make a 2D arcade game in Java? What about the Swing versus AWT thing? Can anyone point me in the right direction?

Probably croft will kill me - but this text is considered the default starters guide for Java gaming:

http://www.brackeen.com/javagamebook/

I’ve not actually read it - discovered it too late - but I hear nothing but rave reports about how great it is.

Incidently, the US amazon site has reviews of the book you mentioned that might give some insight:

http://www.amazon.com/gp/product/1590591232/sr=8-1/qid=1153414908/ref=pd_bbs_1/102-3467520-3784117?ie=UTF8

Kev

Ive read this, I didnt think too much of it tho, half of the book seems to be just about making a rather unconventional software renderer. There is also a bit about maing a 2d tile game, which you may find usefull. There is a little bit on java sound that was fairly helpfulll tho.I did find this tutorial very helpfull at one point tho:

http://www.planetalia.com/cursos/

EDIT: I also think more general books on game programming would be more usefull to you if you have experience using java already.

Yeah, that’s fair comment actually. Java games programming is pretty similar to every other language these days - less and less tricks for the platform - is that a good sign?

Kev

A heart-felt YES ! ;D

I have that book. I read that book. it’s a great book. not only do you make a 2D game by chapter 5 or 6, but before the book is done, you write your own 3D software renderer…

Thanks for the replies. I think I’ll start out with running through those two example games you posted.

One more question: What are the differences / issues in using swing for games as opposed to AWT?

Swing is a GUI toolkit. If your game is traditioanl GUIbased, its fine. Turn based games tend to work okay i nswing.

Swing is not intended for real time perforamnce. For any kind of action game it is utterly useless.

'course Im not a huge fan of AWT either for this. You can do some decent things with Java2D and active rendering. But in the end going to OpenGL through either JOGL or LWJG, or one of the technologies that build on them like JMonkeyEngine or Java3D are your no-compromise game solutions.

Swing is OK for menus and stuff in an action game. Why would you use it in the game itself anyway? shoot the JButton !?

Think chess, othethlo, stratego, backgammon, casino games - all very popular - all very possible in swing with resonable ease.

Looks prettier in LWJGL though :slight_smile:

Kev

I’ve read Advanced Java Game Programming, and I wouldn’t suggest buying it. As someone else said, half the book is about writing a screwy sort of renderer. There’s 2 chapters about HTTP tunneling and polling, respectively, and you would be much better off buying a networking book to learn about that. There’s other tidbits of information that are useful but are explained better in books/tutorials that have nothing to do with game programming.

You would be much better off buying either Developing Games in Java or Killer Game Programming in Java. I bought all 3 books, and those 2 are much better. In fact, you would benefit from buying both DGiJ and KGPiJ, though there is considerable overlap between the 2 books.

I also have Black Art of Java Game Programming which is really old now and worse than any of those 3 books.

On Amazon.com, there’s a number of Java game programming books that I’ve considered buying just because there’s people charging only a couple of dollars for them. You could try one of those if you like, but I’m sure that DGiJ and KGPiJ are good.

I have the Brackeen book - Developing Games in Java. I liked it. The 2nd half is devoted to a software 3D renderer which may or may not be to everyone’s taste. Initially I thought it would be useless in this day of hardware acceleration but when I ran the code (which ran flawlessly, not something all books can claim) I was quite impressed. It would be perfectly possible to make a nice little 3D game with his engine. He covers simple AI too. The first half covers 2D porgramming. He uses Java2D but the little sample works well enough. In fact I am thinking of using it for the Mario contest in this thread!