Killer Game Programming in Java

Killer Game Programming in Java

Paperback

$53.99 $59.99 Save 10% Current price is $53.99, Original price is $59.99. You Save 10%.
View All Available Formats & Editions
Choose Expedited Shipping at checkout for guaranteed delivery by Thursday, February 21

Product Details

ISBN-13: 9780596007300
Publisher: O'Reilly Media, Incorporated
Publication date: 05/15/2005
Pages: 998
Product dimensions: 7.00(w) x 9.19(h) x 2.00(d)

About the Author

Andrew Davison received his Ph.D. from Imperial College in London in 1989. He was a lecturer at the University of Melbourne for six years before moving to Prince of Songkla University in Thailand in 1996. He has also taught in Bangkok, Khon Kaen, and Hanoi. His research interests include scripting languages, logic programming, visualization, and teaching methodologies. This latter topic led to an interest in teaching games programming in 1999. His O'Reilly book, "Killer Game Programming in Java", was published in 2005.

Table of Contents

Preface;
Who Are You?;
What This Book Is About;
This Book (and More) Is Online;
What This Book Is Not About;
A Graphical View of This Book;
Conventions Used in This Book;
Using Code Examples;
Comments and Questions;
Safari Enabled;
Acknowledgments;
Chapter 1: Why Java for Games Programming?;
1.1 Java Is Too Slow for Games Programming;
1.2 Java Has Memory Leaks;
1.3 Java Is Too High-level;
1.4 Java Application Installation Is a Nightmare;
1.5 Java Isn't Supported on Games Consoles;
1.6 No One Uses Java to Write Real Games;
1.7 Sun Microsystems Isn't Interested in Supporting Java Gaming;
Chapter 2: An Animation Framework;
2.1 Animation as a Threaded Canvas;
2.3 Converting to Active Rendering;
2.4 FPS and Sleeping for Varying Times;
2.5 Sleeping Better;
2.6 FPS and UPS;
2.7 Pausing and Resuming;
2.8 Other Animation Approaches;
Chapter 3: Worms in Windows and Applets;
3.1 Preliminary Considerations;
3.2 Class Diagrams for the WormChase Application;
3.3 The Worm-Chasing Application;
3.4 The Game Panel;
3.5 Storing Worm Information;
3.6 Worm Obstacles;
3.7 Application Timing Results;
3.8 WormChase as an Applet;
3.9 Compilation in J2SE 5.0;
Chapter 4: Full-Screen Worms;
4.1 An Almost Full-Screen (AFS) Worm;
4.2 An Undecorated Full-Screen (UFS) Worm;
4.3 A Full-Screen Exclusive Mode (FSEM) Worm;
4.4 Timings at 80 to 85 FPS;
Chapter 5: An Introduction to Java Imaging;
5.1 Image Formats;
5.2 The AWT Imaging Model;
5.3 An Overview of Java 2D;
5.4 Buffering an Image;
5.5 Managed Images;
5.6 VolatileImage;
5.7 Java 2D Speed;
5.8 Portability and Java 2D;
5.9 JAI;
Chapter 6: Image Loading, Visual Effects, and Animation;
6.1 ;
6.2 Loading Images;
6.3 Applying Image Effects;
6.4 Displaying Image Sequences;
6.5 Visual Effects for 'o' Images;
6.6 Packaging the Application as a JAR;
Chapter 7: Introducing Java Sound;
7.1 Applet Playing;
7.2 The AudioClip Class;
7.3 The Sound Player;
7.4 The Java Sound API;
7.5 Sampled Audio;
7.6 MIDI;
7.7 Java Sound API Compared with JMF and JOAL;
7.8 Java Sound API Resources;
7.9 Audio Resources;
Chapter 8: Loading and Playing Sounds;
8.1 Loader Design and Implementation Issues;
8.2 Testing the Loaders;
8.3 The Sounds Panel;
8.4 The Clips Loader;
8.5 Storing Clip Information;
8.6 The Midi Sequences Loader;
8.7 Storing Midi Information;
8.8 LoadersTests as a JAR File;
Chapter 9: Audio Effects;
9.1 Audio Effects on Sampled Audio;
9.2 Audio Effects on MIDI Sequences;
Chapter 10: Audio Synthesis;
10.1 Sampled Audio Synthesis;
10.2 MIDI Synthesis;
10.3 Audio Synthesis Libraries;
Chapter 11: Sprites;
11.1 Bats, Balls, and Sprites;
11.2 Class Diagrams for BugRunner;
11.3 The Bug Starts Running;
11.4 The Animation Framework;
11.5 Defining a Sprite;
11.6 Coding a Sprite;
11.7 Specifying a Sprite with a Statechart;
11.8 The Ball Sprite;
11.9 Defining the Bat;
Chapter 12: A Side-Scroller;
12.1 JumpingJack in Layers;
12.2 Class Diagrams for JumpingJack;
12.3 Start Jack Jumping;
12.4 The Animation Framework;
12.5 Managing the Ribbons;
12.6 Wraparound Ribbons;
12.7 Managing the Bricks;
12.8 Storing Brick Information;
12.9 The Fireball;
12.10 The Jumping Sprite;
12.11 Other Side-Scroller Examples;
12.12 Tiling Software;
Chapter 13: An Isometric Tile Game;
13.1 Isometric Tiles;
13.2 Class Diagrams for AlienTiles;
13.3 The Animation Framework;
13.4 Managing the World;
13.5 Managing WorldItems;
13.6 The Tile Occupier;
13.7 A Sprite on a Tile;
13.8 The Player Sprite;
13.9 The Alien Sprite;
13.10 The Quadrant-Based Alien Sprite;
13.11 The A*-Based Alien Sprite;
13.12 Storing Tile Details;
13.13 Further Reading;
Chapter 14: Introducing Java 3D;
14.1 Java 3D;
14.2 Java 3D Strengths;
14.3 Criticisms of Java 3D for Games Programming;
14.4 Alternatives to Java 3D;
Chapter 15: A 3D Checkerboard: Checkers3D;
15.1 Class Diagrams for Checkers3D;
15.2 Integrating Java 3D and Swing;
15.3 Scene Graph Creation;
15.4 Floating Spheres;
15.5 The Floor;
15.6 Viewer Positioning;
15.7 Viewer Movement;
15.8 Viewing the Scene Graph;
Chapter 16: Loading and Manipulating External Models;
16.1 An Overview of LoaderInfo3D;
16.2 Loaders in Java 3D;
16.3 Displaying a Model;
16.4 Examining a Model's Scene Graph;
16.5 Adjusting a Model's Shape Attributes;
16.6 An Overview of Loader3D;
16.7 Using Loader3D;
16.8 Creating the Scene;
16.9 Managing the Model;
16.10 Building the Model's Scene Graph;
Chapter 17: Using a Lathe to Make Shapes;
17.1 Class Diagrams for Lathe3D;
17.2 Creating the Scene;
17.3 The Lathe Curve;
17.4 The Lathe Shape;
17.5 Subclassing the Lathe Shape;
Chapter 18: 3D Sprites;
18.1 Class Diagrams for Tour3D;
18.2 Creating the Scene;
18.3 The Basic 3D Sprite;
18.4 The User's Touring Sprite;
18.5 The Alien Sprite;
18.6 Behaviors in Java 3D;
18.7 Controlling the Touring Sprite;
18.8 Updating the Alien Sprite;
Chapter 19: Animated 3D Sprites;
19.1 ;
19.2 Class Diagrams for AnimTour3D;
19.3 Creating the Scene;
19.4 The Animated 3D Sprite;
19.5 Controlling the Sprite;
19.6 Animating the Sprite;
19.7 Full-Screen Exclusive Mode (FSEM);
19.8 A Full-Screen Version of the Application;
19.9 Pros and Cons of Keyframe Animation;
Chapter 20: An Articulated, Moveable Figure;
20.1 The Articulated Figure Application;
20.2 Forward and Inverse Kinematics;
20.3 Class Diagrams for Mover3D;
20.4 Creating the Scene;
20.5 Processing User Input;
20.6 The Commands Panel;
20.7 Making and Moving the Figure;
20.8 Modeling a Limb;
20.9 Moving a Limb;
20.10 Other Articulated Figures;
20.11 Articulation and Mesh Deformation;
20.12 Articulation and Skinning;
20.13 Articulation and Morphing;
Chapter 21: Particle Systems;
21.1 Particle Systems in Java 3D;
21.2 Class Diagrams for Particles3D;
21.3 Creating the Scene;
21.4 A Fountain of Points;
21.5 A Fountain of Lines;
21.6 A Fountain of Quads;
21.7 Performance Results;
21.8 More Particle Systems;
21.9 Other Java 3D Approaches;
21.10 Non-Java 3D Approaches;
Chapter 22: Flocking Boids;
22.1 A Flocking Application;
22.2 Scene Creation;
22.3 Adding Obstacles;
22.4 Types of Boids;
22.5 Grouping the Boids;
22.6 Flock Behavior;
Chapter 23: Shooting a Gun;
23.1 Class Diagrams for Shooter3D;
23.2 Scene Creation;
23.3 The Sound of Shooting;
23.4 Picking Scene Objects;
23.5 Controlling the Gun;
23.6 Preparing the Laser Beam;
23.7 Causing an Explosion;
23.8 Picking with a Mouse Click;
23.9 Shooting Behavior;
23.10 Firing the Beam;
23.11 More on Picking;
Chapter 24: A First-Person Shooter;
24.1 Class Diagrams for FPShooter3D;
24.2 Setting Up the Target;
24.3 Positioning and Moving the User's Viewpoint;
24.4 Initializing the User's Viewpoint;
24.5 Adding an Image to the Viewpoint;
24.6 Managing the Ammunition;
24.7 Managing a Laser Beam;
24.8 Moving the Viewpoint;
Chapter 25: A 3D Maze;
25.1 Class Diagrams for Maze3D;
25.2 Making a Maze Plan;
25.3 The User Interface;
25.4 Managing the Maze;
25.5 Scenery Creation;
25.6 Tiling the Floor;
25.7 Viewpoint Creation;
25.8 The Back Facing Camera;
25.9 Moving the Viewpoint;
25.10 The Bird's-Eye View;
25.11 Related Approaches to Scene Generation;
Chapter 26: Fractal Land;
26.1 Class Diagrams for the Fractal Land;
26.2 Building the Fractal Land;
26.3 Creating the Landscape;
26.4 Constructing the Ground;
26.5 Generating a Fractal Landscape;
26.6 Responding to Key Presses;
26.7 Terrain Following and Collision Avoidance;
26.8 Placing Objects in the Scene;
26.9 Other Fractal Landscapes;
Chapter 27: Terrain Generation with Terragen;
27.1 Class Diagrams for Terra3D;
27.2 Terragen;
27.3 Scenery Creation;
27.4 Building the Landscape;
27.5 Making 3D Scenery;
27.6 Adding Landscape Walls;
27.7 Creating Ground Cover;
27.8 Moving over the Surface;
27.9 Finding the Surface Height;
27.10 Accelerating Terrain Following;
27.11 More on Terrain Generation;
Chapter 28: Trees That Grow;
28.1 Class Diagrams for Trees3D;
28.2 Creating the Scene;
28.3 Building a Tree Limb;
28.4 Executing the Rules;
28.5 Displaying Leaves;
28.6 Comparison with L-Systems;
Chapter 29: Networking Basics;
29.1 The Elements of Network Communication;
29.2 The Client/Server Model;
29.3 The Peer-to-Peer Model;
29.4 Client/Server Programming in Java;
29.5 P2P Programming in Java;
29.6 Firewalls;
29.7 Other Kinds of Java Networking;
Chapter 30: Network Chat;
30.1 Threaded TCP Clients and Server;
30.2 UDP Multicasting Clients and a Name Server;
30.3 Clients Using a Servlet as a Server;
Chapter 31: A Networked Two-Person Game;
31.1 The Standalone Tic-Tac-Toe Game;
31.2 The Networked Tic-Tac-Toe Game;
31.3 Comparing NetFourByFour and FourByFour;
Chapter 32: A Networked Virtual Environment;
32.1 Background on NVEs;
32.2 An Overview of NetTour3D;
32.3 Scene Creation on the Client;
32.4 Defining Sprites;
32.5 Local Sprites;
32.6 Watching the Server;
32.7 Server Activities;
32.8 Other Java NVEs;
Appendix A: Installation Using install4j;
A.1 install4j Versus JWS;
A.2 The Java 3D Components;
A.3 The BugRunner Application;
A.4 The Checkers3D Application;
Appendix B: Installation Using Java Web Start;
B.1 JWS Benefits;
B.2 JWS Downsides;
B.3 The JNLP Deployment File;
B.4 Steps in Developing a JWS Application;
B.5 A JWS Installer for BugRunner;
B.6 A JWS Installer for Checkers3D;
B.7 Another Way to Install Checkers3D;
B.8 The JWS Portal Page;
B.9 Third-Party Certificates;
B.10 More Information;
Colophon;

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews

Killer Game Programming in Java 3.6 out of 5 based on 0 ratings. 8 reviews.
Anonymous More than 1 year ago
This book is extremely helpful to any looking to program awsome games, the author dose an amazing job of teaching you how to program games. He starts off with an aproach of 2D game pogramming, platformers and such, and then he gets to the really fun part: 3333333DDDDDDDD!!! He explains 3D shape generation classes and motion techniques. He really simplifies both 3D and 2D game programming in a fairly simple layout. And if you're worried about the speed and the console ability STOP: now a days the java 7 compiler is not any slower than c++. It is true that there is no java compiler on the sony playstation, but it is made up for by the xbox which DOSE have a java compiler.
Guest More than 1 year ago
Until very recently, there was no serious commercial game development in Java. For various reasons of varying validity, as Davison explains. The most compelling being the slowness of Java bytecode compared to C/C++ binaries, and the lack of a Java compiler on the Sony Playstation. But if you are pondering doing a Java game nowadays, then things look brighter. The latest Java 5 Hotspot compiler can mean that Java code is now only about 10% slower. For all but the most extreme twitch games, this delay might be acceptable. While there is still no official Java compiler for the Playstation, two things counterbalance. The number of PCs is much larger, and Java compilers exist for these. Also, games for mobile devices (which basically means cellphones) are rising hugely. Here, there are no high resolution and big screen twitch games. So the Java graphics is usually quite adequate. The book shows how to use Java 5 to handle video, audio and graphics in a combined manner for a game. The examples are somewhat minimal. Due mostly to practical limitations on book size. (It's large enough as is.) All of the example games have trivial graphics. You'll have to investigate with a protracted non-trivial case study if indeed Java 5 works for you to make games.
irishkitsune on LibraryThing 8 months ago
I think I was the wrong audience for this book. This book seems aimed at people who already know game development and Java and are looking for techniques to adapt their current knowledge to the Java paradigm. If you're an experienced game developer who's looking to transfer your existing knowledge to Java, this is probably the book for you. As for me, it was a bit over my head.
Anonymous More than 1 year ago
jeremy stark More than 1 year ago
You may think that many commercial games are not made with java and that is true but one of the most sucsessful indie games of all time was writen in java. That game is minecraft by markus persson (notch)
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
"testosterone-drenched games" wat