Chapter 4
Animation and Game Programming
In This Chapter
Using threads to control animation
Creating a bouncing ball
Creating a whole room full of bouncing balls
Devising a simple Pong-like game
Because of its powerful drawing capabilities, Java lends itself especially well to creating game programs — especially games that are created as applets so they can be played over the Internet. Game programming is a huge subject, big enough for a whole shelf of books. In this chapter, I just scratch the surface of creating basic animations and playing simple games. Specifically, you find out how to get a ball bouncing in an applet, how to create a paddle to hit the ball, and how to find out when you miss.
In other words, welcome to the 1970s! You're going to create an applet that plays Pong!
Get Java All-in-One For Dummies, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.