14.5 More Middleware


14.5 More Middleware

In the previous sections we covered libraries for graphics and sound, which are the core components of a game. Inevitably, however, there will be games whose features extend beyond those of graphics and sound. This section explores two libraries that are important for games in rather specific ways.

14.5.1 ODE (Open Dynamics Engine)

Games often feature fully integrative worlds that players can explore; they can wander through villages, enter houses, open and close doors, jump in the air, and perform all kinds of other actions. Inevitably, as any action is performed, players expect those actions to occur in predictable and realistic ways. For example, if a game character jumps into the air, the player expects the character to return to the ground under the force of gravity. The only time this might not occur is in a microgravity environment like space. Likewise, if the player rolls a ball down a hill, he expects the ball to gain momentum, accelerating down the slope. If the slope curves upward at the bottom, like a ramp, then the player expects the ball to shoot into the air. All of these things are behaviors we take for granted in the real world and they are behaviors we've come to expect in computer games. But since the computer has no real understanding of the world and its behaviors, it needs to be told by programmers about the laws of physics, which are specific rules about motion and rigid bodies. Therefore, game developers have come to realize the importance of physics, and for this reason there are a number of libraries available to calculate physical reactions for you. One of these libraries is called ODE (Open Dynamics Engine). Like most of the other libraries that call themselves "open," ODE is open source and cross platform. It features a whole series of functions for the programmer to compute the positions and orientations of game objects when influenced by forces like gravity, and more specifically push and pull. ODE itself is a wide ranging topic and therefore is beyond the scope of this book.

Where to get it: http://www.ode.org/

14.5.2 Nullsoft Scriptable Install System

One of the most overlooked aspects of games includes their distribution. For example, once a game is made, what should happen next? How does the game get onto a user's computer? On a console, gamers just put the CD in the drive and the game begins, but on the PC things are not quite so easy. Instead, the game typically needs to be installed the first time a CD is inserted or the first time a game is downloaded. Once installed, it can then be launched like any other standard application. To create the installation programs, developers sometimes use expensive software designed for the purpose, but there are also free alternatives available. One such library to create installation programs is the Nullsoft Scriptable Install System (NSIS). This is designed to make the process of packaging and distributing products simpler. Using this tool, developers can package their products, create install applications for them, and upload them to the Internet or burn them on CD, DVDs, or other media. Like many other libraries, NSIS is open source and freely available for commercial and non-commercial projects. Chapter 20 discusses NSIS in more detail.

Where to get it: http://www.nsis.sourceforge.net/Main_Page




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

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