O'Reilly logo

Developing Games in Java™ by Bret Barker, David Brackeen, Laurence Vanhelsuwé

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. 3D Objects

KEY TOPICS

  • Hidden Surface Removal

  • 3D Animation

  • Polygon Groups

  • Loading Polygon Groups from an OBJ File

  • Game Objects

  • Managing Game Objects

  • Putting It All Together

  • Future Enhancements

  • Summary

In a typical game, the player will find objects to bump into, grab, jump over, jump on, eat, catch, dodge, nudge, fight with, throw, shoot, or whatever else you can think of.

In this chapter, you'll create a 3D object-animation system to move and rotate objects in the world. To draw the 3D objects, you'll use z-buffering to draw polygons in the correct z-order. You'll also create a parser to read 3D objects from OBJ files so you don't have to define lots of polygons in Java code. Finally, you'll put everything together by creating a few simple game ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required