Book description
Although the number of commercial Java games is still small compared to those written in C or C++, the market is expanding rapidly. Recent updates to Java make it faster and easier to create powerful gaming applications-particularly Java 3D-is fueling an explosive growth in Java games. Java games like Puzzle Pirates, Chrome, Star Wars Galaxies, Runescape, Alien Flux, Kingdom of Wars, Law and Order II, Roboforge, Tom Clancy's Politika, and scores of others have earned awards and become bestsellers.Java developers new to graphics and game programming, as well as game developers new to Java 3D, will find Killer Game Programming in Java invaluable. This new book is a practical introduction to the latest Java graphics and game programming technologies and techniques. It is the first book to thoroughly cover Java's 3D capabilities for all types of graphics and game development projects.Killer Game Programming in Java is a comprehensive guide to everything you need to know to program cool, testosterone-drenched Java games. It will give you reusable techniques to create everything from fast, full-screen action games to multiplayer 3D games. In addition to the most thorough coverage of Java 3D available, Killer Game Programming in Java also clearly details the older, better-known 2D APIs, 3D sprites, animated 3D sprites, first-person shooter programming, sound, fractals, and networked games. Killer Game Programming in Java is a must-have for anyone who wants to create adrenaline-fueled games in Java.
Publisher resources
Table of contents
-
Killer Game Programming in Java
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- A Note Regarding Supplemental Files
- Preface
- 1. Why Java for Games Programming?
- 2. An Animation Framework
- 3. Worms in Windows and Applets
- 4. Full-Screen Worms
- 5. An Introduction to Java Imaging
-
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
- 7. Introducing Java Sound
- 8. Loading and Playing Sounds
- 9. Audio Effects
- 10. Audio Synthesis
- 11. Sprites
-
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.6.1. Drawing the Ribbon's Image
- 12.6.1.1. Case 1: Draw the image at JPanel (0,0)
- 12.6.1.2. Case 2: Image moving right, where xImHead is less than pWidth
- 12.6.1.3. Case 3: Image moving right, where xImHead is greater than or equal to pWidth
- 12.6.1.4. Case 4: Image moving left, where xImHead is greater than or equal to (pWidth-width)
- 12.6.1.5. Case 5. Image moving left, where xImHead is less than (pWidth-width)
-
12.6.1. Drawing the Ribbon's Image
-
12.7. Managing the Bricks
- 12.7.1. Loading Bricks Information
- 12.7.2. Initializing the Bricks Data Structures
- 12.7.3. Moving the Bricks Map
-
12.7.4. Drawing the Bricks
- 12.7.4.1. Case 1. Bricks map moving right and bCoord is less than pWidth
- 12.7.4.2. Case 2. Bricks map moving right and bCoord is greater than pWidth
- 12.7.4.3. Case 3. Bricks map moving left and bCoord is greater than (pWidth-width+imWidth)
- 12.7.4.4. Case 4. Bricks map moving left and bCoord is less than (pWidth-width+ imWidth)
- 12.7.4.5. The drawBricks() method
- 12.7.5. JumperSprite-Related Methods
- 12.8. Storing Brick Information
- 12.9. The Fireball
- 12.10. The Jumping Sprite
- 12.11. Other Side-Scroller Examples
- 12.12. Tiling Software
-
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
-
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
- 15. A 3D Checkerboard: Checkers3D
-
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
- 17. Using a Lathe to Make Shapes
- 18. 3D Sprites
- 19. Animated 3D Sprites
-
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
- 21. Particle Systems
- 22. Flocking Boids
- 23. Shooting a Gun
- 24. A First-Person Shooter
-
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
-
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
-
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
- 28. Trees That Grow
-
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
-
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
-
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
- 32. A Networked Virtual Environment
- A. Installation Using install4j
- B. Installation Using Java Web Start
- Index
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
Product information
- Title: Killer Game Programming in Java
- Author(s):
- Release date: May 2005
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596552909
You might also like
book
Learning Java Through Games
Learning Java Through Games teaches students how to use the different features of the Java language …
book
Learning Java by Building Android Games - Third Edition
Get ready to learn Java the fun way by developing games for the Android platform with …
book
Introduction to Java Through Game Development: Learn Java Programming Skills by Working with Video Games
Interested in learning how to program with Java? Let’s face it, the best way to learn …
book
Learn Java with Math: Using Fun Projects and Games
There are many good Java programming books on the market, but it's not easy to find …