Racing Games

The racing genre has been around for some time. Racing can be composed of space vehicles with less regard for a physics system or other vehicles in hostile environments, but the true test of a racing game comes from its implementation under circumstances to which we are all accustomed. Car racing is one of the most popular sports in the world. It is broken out into a separate section to identify some of the concerns that would come from creating a fairly accurate representation of the physical forces involved with racing.

Originally, games such as Pole Position challenged players to “Prepare to Qualify” as they drove on a winding track, avoiding other cars and oil slicks. Today, this genre has stepped out into a showcase for real-world simulation. Vehicle dynamics between restrictor-plate stock car racing and Formula 1 racing radically alter game play, but the fundamental forces involved are pretty similar. Though older than most games on the market, Gran Prix Legends is still hailed for its accuracy and maintains throngs of loyal players because of its startling realism. Fans are willing to deal with a lower graphic component if the game play holds up well.

Racing Games and Java

Java is well matched to produce commercial-quality racing games. The authors of this book developed a commissioned technology demo/game for Sun Microsystems called Java Gran Prix in 2002 (Figure 1.2). The spec required that it drive like a real Formula 1 race car in a networked environment, showcasing the strengths of Java3D and the Java platform overall. The game debuted at SIGGRAPH 2001 and maintained long lines of players who wanted to see just what was possible when people really pushed the Java platform.

image from book
Figure 1.2: Java Gran Prix.

The earlier description of racing games showed that the true test of these games is in the physics system. During the development cycle of Java Gran Prix, the physics system and vehicle dynamics were modeled far too well—so well, in fact, that only a driver with the skills of the great Mika H kkinen could make it around the track. A new player needed more than 30 minutes to learn to drive the car. The conclusion was reached that the car was too hard to drive, so the physics system was curtailed for the entertainment value. One downside was the lack of a standardized input API that allowed for easy access to steering wheel controllers. When Java Gran Prix was written, a special linkage was required to allow the game to be played with a steering wheel. The actual implementation wasn’t too difficult, but it required the use of native function calls to complete. The full implementation of devices is covered later in Chapter 11, “Java Native Interface.” A fully networked Formula 1 simulation was created using dated technologies that were not as well suited for game production as the tools currently available and discussed later in this book.

In summary, Table 1.3 lists the major benefits and drawbacks to using Java for creating racing games.

Table 1.3 :  PROS AND CONS OF JAVA IN RACING GAMES

Pros

Cons

Contains Java math libraries, which can be organized to create a satisfactory physics model for

Lacks a standard high-precision timer racing vehicles

Provides high-quality rendering tools through JOGL and LWJGL

Offers limited official support for nontraditional input devices



Practical Java Game Programming
Practical Java Game Programming (Charles River Media Game Development)
ISBN: 1584503262
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net