|Java 1.4 Game Programming|
Don't be confused by the fact that
Java 2 Game Programming was published before this
book, Java 1.4 Game Programming. "Java 2" refers to the
Java 2 Platform which both books cover. "Java 1.4"
refers to the specific version of the Java 2 Platform.
You can blame the marketing folks at Sun for the
I just finished reading the book "Java 1.4 Game Programming" by
Mulholland and Murphy. You may wonder how it is that I was able to read
this 650 page book in one day. I confess that I skipped or skimmed all
of those chapters that had little or nothing to offer on the subject of
game programming specifically. This means that of the 18 chapters in
the book, I really only read the following three:
Chapter 09, "Graphics"
Chapter 10, "Using the Mouse and Keyboard"
Chapter 12, "Game Programming Techniques"
Chapter 9 takes a valiant stab at Swing-based animation. It should be
noted that this is the first Java game programming book published to do
so as all of its predecessors focused exclusively on the AWT. The
authors properly warn of issues related to threading and synchronization
but they have, in my opinion, a solution than complicates rather than
simplifies matters. Rather than taking the easy route of pushing frame
animation into the AWT Event Queue for serial execution using
EventQueue.invokeAndWait(), they keep it in a separate animation thread
and then struggle with the consequences.
Since mouse and keyboard events can update state in their solution
without being properly synchronized with the main animation thread, much
of Chapter 10 attempts to rectify this by offering their own custom
version of an event queue. I find this to be confusing and redundant.
In Chapter 12 they offer a few simple interactive animation examples
which are built upon this animation engine. While helpful, none of
these examples is fleshed out enough that it could be considered a game.
If Chapter 12 were removed and I had to guess what the title of this
book was based upon the other chapters, my guess would be "An
Introduction to Java". Just to drive this point home, let me share with
you the titles of the chapters that I skipped or skimmed:
01 Introduction to Java 1.4
02 Basics of Java Programming
03 Arrays and Strings
04 Multiple Classes
05 Packages, Utilities, and Error Handling
06 Stream I/O
08 Applications and Applets
11 Using Sound and Music
13 Introduction to GUI
14 Introduction to Databases
15 Using SQL with MySQL
16 Using the JDBC
17 Introduction to Networking
18 Introduction to NIO Networking
Experienced Java programmers will not find anything new in this book
that they do not already know. Less experienced Java programmers may
find themselves misdirected by Chapters 9 and 10. Both will be
disappointed by the lack of completed example games.