Programming Linux Games

by
Format: Trade Paper
Pub. Date: 2001-08-01
Publisher(s): No Starch Press
List Price: $41.95

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

Programming Linux Games discusses the most important Linux multimedia toolkits and teaches the basics of game programming in the process, all in the context of real-world examples. An in-depth look at Linux audio programming shows readers how to get the most out of the four important audio APIs: OSS, ALSA, ESD, and OpenAL. Readers learn how to develop a powerful game engine and then write a game in Tcl, an easy-to-learn scripting language. The author discusses the X Window System and it's performing issues and then goes on to document the alternatives to game programming under Linux, including the framebuffer device system and the kernel joystick API. In the networked gaming chapter, readers learn how to apply socket- programming techniques to online gaming and how to add multiplayer support to Penguin Warrior. The final chapter on Linux game licensing issues is written specially by Loki president Scott Draeker. By the end of the book, the reader will understand the state of the Linux gaming world, how to write games for Linux, and how to distribute those games to the Linux gaming community.

Author Biography

Loki Software, Inc. ports best-selling PC games to Linux. Loki supports several Open Source development projects, including OpenAL(tm), a cross-platform 3D-Audio Library, and SDL MPEG Player Library (SMPEG), a general-purpose MPEG video/audio player for Linux.

Table of Contents

Foreword i
Preface iii
Who This Book Is For iv
Online Resources iv
Acknowledgments v
The Anatomy of a Game
1(16)
A Quick Survey of Game Genres
2(9)
Simulation Games
2(2)
First-Person Shooters
4(2)
Real-time Strategy Games
6(1)
Turn-Based Strategy Games
7(1)
Role-Playing Games
7(2)
Puzzle Games
9(1)
Multiuser Dungeons
10(1)
A Quick Look Under the Hood
11(6)
The Input Subsystem
12(1)
The Display Subsystem
12(1)
The Audio Subsystem
13(1)
The Network Subsystem
14(1)
The Update Subsystem
14(1)
The Game Loop
15(2)
Linux Development Tools
17(36)
Programming Editors
17(3)
vi
18(1)
Emacs
19(1)
NEdit
20(1)
Compiling Programs Under Linux
20(4)
Using the Make Utility
24(5)
Creating Makefiles
24(4)
Error Handling
28(1)
Working with Libraries
29(3)
Static Libraries
29(1)
Shared Libraries
29(3)
Linux Linker Quirks
32(1)
Debugging Linux Applications
33(9)
Compiling for Debugging
33(1)
gdb
34(7)
ddd
41(1)
Bug Tracking
42(1)
Project Management with CVS
42(7)
A Brief Tutorial on CVS
43(6)
Other Useful Tools
49(4)
Rapid Text Searching with grep
49(1)
Updating Source with diff and patch
50(3)
Linux Gaming APIs
53(16)
Graphics APIs
55(4)
SVGALib
55(1)
GGI
56(1)
SDL
56(1)
ClanLib
57(1)
OpenGL
57(1)
Plib
57(1)
Glide
58(1)
Xlib
58(1)
Graphical User Interface Toolkits
59(2)
GTK+
59(1)
Tk
59(1)
Fltk
60(1)
Qt
60(1)
SDL GUI Support
60(1)
Audio APIs
61(2)
OSS
61(1)
ALSA
62(1)
ESD
62(1)
OpenAL
63(1)
Scripting Libraries
63(1)
Tcl
63(1)
Guile and MzScheme
63(1)
Python and Perl
64(1)
Networking APIs
64(2)
BSD Sockets
65(1)
OpenPlay
65(1)
IPX and SPX
65(1)
File Handling
66(3)
libpng and libjpeg
66(1)
libaudiofile and libsndfile
67(1)
Ogg Vorbis
67(1)
The SDL MPEG Library, SMPEG
68(1)
zlib
68(1)
Mastering SDL
69(92)
Computer Graphics Hardware
70(1)
The Framebuffer
71(1)
The SDL Video API
72(35)
Setting Up the Display
74(3)
Direct Surface Drawing
77(6)
Drawing with Blits
83(4)
Colorkeys and Transparency
87(5)
Loading Other Image Formats
92(1)
Alpha Blending
92(5)
Achieving Smooth Animation with SDL
97(10)
Input and Event Processing
107(13)
Processing Mouse Events
108(4)
Processing Keyboard Events
112(4)
Processing Joystick Events
116(4)
Multithreading with SDL
120(5)
SDL Audio Programming
125(15)
Representing Sound with PCM
125(3)
Feeding a Sound Card
128(1)
An Example of SDL Audio Playback
129(11)
Integrating OpenGL with SDL
140(4)
Penguin Warrior
144(17)
Creating Graphics
146(1)
Implementing a Parallaxing Scroller in SDL
147(6)
A Simple Particle System
153(5)
Game Timing
158(3)
Linux Audio Programming
161(76)
Competing APIs
162(1)
Introducing Multi-Play
163(1)
Loading Sound Files
164(6)
Using libsndfile
164(6)
Other Options
170(1)
Using OSS
170(17)
Reality Check
175(3)
Achieving Higher Performance with Direct DMA Buffer Access
178(9)
Playing Sound with ALSA
187(8)
Sharing the Sound Card with ESD
195(5)
Building Multi-Play
200(6)
Environmental Audio with OpenAL
206(16)
OpenAL Basics
207(6)
Adding Environmental Audio to Penguin Warrior
213(9)
Implementing Game Music with Ogg Vorbis
222(15)
Working with Vorbis Files
223(4)
Adding Music to Penguin Warrior
227(10)
Game Scripting Under Linux
237(34)
A Crash Course in Tcl
238(7)
Built-in Tcl Commands
241(4)
Interfacing Tcl with C
245(7)
Linking Against Tcl
246(1)
Executing Scripts
246(4)
Understanding Commands and Objects
250(2)
A Simple Scripting Engine
252(6)
Designing a Game Script
258(7)
Applying Scripting to the Real World
265(6)
Single Versus Multiple Contexts
266(1)
Can We Trust the Script?
267(1)
Script Performance
267(1)
Who's Writing the Script?
268(3)
Networked Gaming with Linux
271(44)
'Tis a Big Net, Quoth the Raven
272(3)
Internet Protocols
272(1)
Addresses and Ports
273(1)
Name Resolution
274(1)
Socket Programming 101
275(17)
Sockets
275(1)
Connecting TCP Sockets
276(9)
Receiving TCP Connections
285(7)
Working with UDP Sockets
292(8)
Multiplayer Penguin Warrior
300(11)
Network Gaming Models
301(1)
Penguin Warrior's Networking System
302(9)
Network Game Performance
311(1)
Security Issues
312(3)
Gaming with the Linux Console
315(40)
Pros and Cons of the Linux Framebuffer
316(2)
Setting Up a Framebuffer Device
318(1)
A First Foray into Framebuffer Programming
318(8)
Setting Framebuffer Video Modes
326(11)
How Video Scanning Works
327(3)
The Mode Database
330(1)
An Example
330(7)
Use the Source, Luke!
337(1)
Console Input Handling
337(18)
Keyboard Input from a Terminal
338(10)
Mouse Input with GPM
348(7)
Finishing Penguin Warrior
355(24)
Adding Weapons
355(9)
Drawing Phasers
356(6)
Detecting Phaser Hits
362(2)
Imposing a Sane Rate of Fire
364(1)
Creating Status Displays
364(11)
In Retrospect
375(4)
To Every Man a Linux Distribution
379(20)
Source or Binary?
380(1)
Local Configuration
381(2)
Linux Isn't Alone: Supporting FreeBSD
383(1)
Packaging Systems
384(3)
Graphical Installation Goodness: Loki's Setup Program
387(6)
Understanding the Linux Filesystem Standard
393(6)
Glossary of Terms 399(6)
Bibliography 405

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.