Cover image for Linux® game programming
Title:
Linux® game programming
Author:
Collins, Mark (Mark "Nurgle")
Publication Information:
Roseville : Prima Tech, [2001]

©2001
Physical Description:
xxxii, 331 : illustrations ; 23 cm + 1 computer laser optical disc (4 3/4 in.)
General Note:
Includes index.
Language:
English
Title Subject:
ISBN:
9780761532552
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.76.O63 C64757 2001 Book and Software Set Central Closed Stacks
Searching...

On Order

Summary

Summary

This title addresses game development for the Linux community. It covers the game development cycle from artificial intelligence to threads and user interfaces. It is aimed at those who have some programming experience and are familiar with the Linux OS.


Table of Contents

Introductionp. xxxi
Chapter 1 Introduction to Game Developmentp. 1
What Makes a Game?p. 2
Different Game Genresp. 2
What Makes a Successful Game?p. 5
The Game-Development Processp. 6
The Design Documentp. 6
Developmentp. 7
Testingp. 7
Releasing Your Gamep. 8
Chapter 2 Linux Development Toolsp. 11
Development Toolsp. 12
Compilerp. 12
Debugging Toolsp. 15
Development Environmentsp. 18
Librariesp. 20
Simple DirectMedia Layerp. 20
OpenGLp. 21
libXIIp. 21
Other Librariesp. 21
Chapter 3 The Structure of a Gamep. 23
The Parts of a Gamep. 24
A Game Frameworkp. 24
Chapter 4 20 Graphics Under Linuxp. 29
The SDL APIp. 30
Starting Up SDLp. 30
Creating a Windowp. 32
Creating a Surfacep. 33
Drawing a Bitmap Imagep. 35
Drawing Directly to the Screenp. 36
Using Palettesp. 39
Cleaning Upp. 40
The Xlib APIp. 40
Creating a Windowp. 41
Drawing to the Screenp. 43
Double Bufferingp. 47
Installing Color Mapsp. 48
Cleaning Upp. 49
The SVGAlib APIp. 49
Switching to a Graphics Modep. 50
Drawing to the Screenp. 51
Displaying Imagesp. 52
Using Color Palettesp. 56
Cleaning Upp. 57
A Mini-Projectp. 57
Chapter 5 Input with SDLp. 59
Understanding Input Devicesp. 60
Keyboardp. 60
Mousep. 61
Joystickp. 61
Handling Methodsp. 62
Event Queuesp. 62
Pollingp. 62
Using the SDL Event Queuep. 63
The SDL_Event Unionp. 63
Layoutp. 63
Interpreting Event Typesp. 64
Reading from the Event Queuep. 64
Polling with SDLp. 83
Polling the Keyboardp. 83
Polling the Mousep. 84
Configuring the Control Systemp. 84
Chapter 6 30 Graphics for Linux Gamesp. 87
Some History: Mesa and OpenGLp. 88
What Is OpenGL?p. 88
Where Can I Get OpenGL?p. 89
Buffers, Hidden Surface Elimination, and Animationp. 90
Getting Startedp. 91
Compiling and Linking with OpenGLp. 93
Let's Draw Something!p. 93
Drawing Polygons, Lines, and Pointsp. 94
Drawing in 3D: Perspective and Movementp. 96
Texturing and Other "State" Elementsp. 102
Lightingp. 106
Specifying the Lighting Qualities of the Objectp. 106
Establishing the Light Sourcep. 107
Setting Up Surface Normalsp. 108
Texturing the Modelp. 110
Loading the Texture Imagep. 111
MIP Mapping the Imagep. 112
Applying the Texturep. 113
Transparency and the Alpha Componentp. 114
Solving Transparency Problemsp. 115
Foggingp. 115
Chapter 7 Using OpenGL in Gamesp. 117
Understanding Display Listsp. 118
Understanding Vertex Arraysp. 119
Drawing with Triangle Strips and Fansp. 120
Adding Textp. 121
Understanding Matricesp. 122
Working with Plane Equations, Line Equations, and Distances in 3Dp. 124
Using Billboards to Simulate 3Dp. 126
Working with Particlesp. 129
Detecting Collisionsp. 129
Simplify the Shapes You Testp. 130
If the Objects Are Close, Test Againp. 131
Follow Surface Contoursp. 132
The Next Layer: Scene Graph APIsp. 132
Field-of-View Cullingp. 133
State Managementp. 134
Scene Graphsp. 135
Moving the Camerap. 138
Advanced Lightingp. 139
Putting It All Togetherp. 140
Chapter 8 Sound Under Linuxp. 147
OpenALp. 148
A Simple OpenAL Applicationp. 148
Advanced OpenALp. 155
SDL Audiop. 159
Starting an Audio Sessionp. 159
Loading Samplesp. 162
Using the Audio Callback Functionp. 163
Cleaning Upp. 164
Mixing Different Samplesp. 164
CD Audiop. 165
Using the ioctl() Functionp. 165
Opening the Devicep. 166
Getting a Track Listingp. 166
Playing a CDp. 167
Stopping a CDp. 168
Chapter 9 Networkingp. 169
Introduction to Modern Networkingp. 170
Peer-to-Peer Networkingp. 170
Client/Server Networkingp. 171
The TCP/IP Stackp. 171
TCPp. 171
UDPp. 172
Socket Programmingp. 172
Opening a Socketp. 172
Connecting the Socketp. 173
Sending Datap. 175
Receiving Datap. 176
The Complete Mini-Web Browserp. 179
Creating a Serverp. 180
Threads and Networkingp. 182
Clientsp. 183
Serversp. 186
Pingsp. 186
Networking in Gamesp. 187
Dead Reckoningp. 187
Sending Controller Inputsp. 188
Lobbiesp. 188
What Is OpenLobby?p. 188
Using the Lobby Serverp. 189
Finding Gamesp. 191
Chatting in the Lobbyp. 193
Cleaning Upp. 195
Security Issuesp. 196
Buffer Overflowsp. 196
Denial-of-Service Attacksp. 196
Chapter 10 Artificial Intelligencep. 197
Basic Artificial Intelligencep. 198
Route Findingp. 198
Groupingp. 205
Problem Solvingp. 206
Advanced Artificial Intelligencep. 212
Genetic Algorithmsp. 212
Neural Networksp. 219
Chapter 11 OpenSource: Friend or Foe?p. 225
What Is OpenSource?p. 226
Unlimited Redistributionp. 227
Ability to Charge for Expensesp. 227
The Development Modelsp. 227
The Cathedralp. 227
The Bazaarp. 228
Reasons For and Against OpenSourcep. 229
Ten Reasons to Use OpenSourcep. 229
Ten Reasons to Write Closed-Source Softwarep. 232
The Middle Groundp. 234
The Indrema Debatep. 236
Which License to Use?p. 239
Viral Licensesp. 239
Open Licensesp. 240
Custom Licensesp. 240
Liabilityp. 241
Appendix A OpenSource License Agreementsp. 243
GNU General Public Licensep. 244
GNU Lesser General Public Licensep. 250
BSD Licensep. 259
Artistic Licensep. 260
Mozilla Public Licensep. 262
The Apache Software Licensep. 270
MIT Licensep. 271
Appendix B Portingp. 273
Porting Strategyp. 275
Try Not to Fork the Codebasep. 275
Getting Startedp. 276
#ifdef Is Your Friendp. 277
The Harder Stuffp. 277
First Lightp. 278
Compiler Issuesp. 278
Visual C/C++ Improper Scoping in for Loopsp. 279
GCC Code Sizep. 279
Mixing Signed and Unsigned Typesp. 280
Assignment from voidp. 280
GCC Doesn't Complain About Missing Return Valuesp. 280
GCC Doesn't Complain About Use of Uninitialized Variablesp. 281
GCC Is More Strict About Implicit Castingp. 281
Include Filenamesp. 282
Struct Packingp. 282
File System Issuesp. 283
Case Sensitivityp. 283
Drive Letters and Path Separatorsp. 284
Line Terminationp. 285
File Attributes and Home Directoriesp. 286
Assembly Languagep. 286
Operand Orderp. 287
Register Namingp. 287
Opcode Naming and Operand Sizep. 287
Immediate Valuesp. 288
Addressing Modesp. 288
Endianessp. 288
Windows Issuesp. 289
WinMain() and Message Loopsp. 289
Timersp. 290
The Registryp. 291
Hungarian Notationp. 291
Graphics Issuesp. 292
DirectDrawp. 292
DOS Frame Bufferp. 292
Direct3Dp. 293
Sound Issuesp. 295
Networking Issuesp. 295
Winsockp. 295
DirectPlay Is Evilp. 297
Useful Linksp. 297
Footnotesp. 298
Appendix C Referencesp. 299
Web Sitesp. 300
GameDev.Netp. 300
GamaSutrap. 300
Flipcodep. 300
Happy Penguinp. 301
Indrema Developer Networkp. 301
Linux Gamesp. 301
Linux Game Developer Resource Centrep. 301
Booksp. 302
OpenGL Super Bible (The Red Book)p. 302
OpenGL Reference (The Blue Book)p. 302
Graphics Programming Black Bookp. 302
Game Architecture and Designp. 302
TCP/IP Illustrated (Volume 2)p. 303
Linux Device Driversp. 303
Game Development Seriesp. 303
Magazinesp. 304
Game Developer Magazinep. 304
Developp. 304
Edgep. 304
Newspapersp. 305
Computer Trade Weeklyp. 305
MCVp. 305
Computer Weeklyp. 305
Computingp. 305
Newsgroupsp. 306
Mailing Listsp. 306
Appendix D Glossaryp. 307
Appendix E What's on the CD-ROMp. 313
Running the CD-ROM with Windows 95/98/2000/NTp. 314
Running the CD with Linuxp. 314
Indexp. 315

Google Preview