Programming Linux Games - Building Multimedia Applications with SDL, OpenAL, and Other APIs
Synopsis
Programming Linux Games discusses the most important
Linux multimedia toolkits and teaches the basics of game
programming, all in the context of real-world examples. The
author starts with an overview of Linux gaming and then
introduces the use of essential tools in the Linux
development environment. Detailed discussions cover such
topics as graphics, sound, and input programming; audio
programming to get the most out of the major audio APIs;
how to develop a powerful game engine and write a game in
Tcl; the X Window System and its performance; networked
gaming; and Linux game licensing issues.
Table of Contents
- Foreword ..... I
- Preface ..... III
- Who This Book Is For ..... IV
- Online Resources ..... IV
- Acknowledgments ..... V
- 1: The Anatomy of a Game
..... 1
-
- A Quick Survey of Game Genres ..... 2
- Simulation Games ..... 2
- First-Person Shooters ..... 4
- Real-time Strategy Games ..... 6
- Turn-Based Strategy Games ..... 7
- Role-Playing Games ..... 7
- Puzzle Games ..... 9
- Multiuser Dungeons ..... 10
- A Quick Look Under the Hood ..... 11
- The Input Subsystem ..... 12
- The Display Subsystem ..... 12
- The Audio Subsystem ..... 13
- The Network Subsystem ..... 14
- The Update Subsystem ..... 14
- The Game Loop ..... 15
- 2: Linux Development Tools
..... 17
-
- Programming Editors ..... 17
- vi ..... 18
- Emacs ..... 19
- NEdit ..... 20
- Compiling Programs Under Linux ..... 20
- Using the Make Utility ..... 24
- Creating Makefiles ..... 24
- Error Handling ..... 28
- Working with Libraries ..... 29
- Static Libraries ..... 29
- Shared Libraries ..... 29
- Linux Linker Quirks ..... 32
- Debugging Linux Applications ..... 33
- Compiling for Debugging ..... 33
- gdb ..... 34
- ddd ..... 41
- Bug Tracking ..... 42
- Project Management with CVS ..... 42
- A Brief Tutorial on CVS ..... 43
- Other Useful Tools ..... 49
- Rapid Text Searching with grep ..... 49
- Updating Source with diff and patch ..... 50
- 3: Linux Gaming APIs .....
53
-
- Graphics APIs ..... 55
- SVGALib ..... 55
- GGI ..... 56
- SDL ..... 56
- C1anLib ..... 57
- OpenGL ..... 57
- Plib ..... 57
- Glide ..... 58
- Xlib ..... 58
- Graphical User Interface Toolkits ..... 59
- GTK+ ..... 59
- Tk ..... 59
- Fltk ..... 60
- Qt ..... 60
- SDL GUI Support ..... 60
- Audio APIs ..... 61
- OSS ..... 61
- ALSA ..... 62
- ESD ..... 62
- OpenAL ..... 63
- Scripting Libraries ..... 63
- Tcl ..... 63
- Guile and MzScheme ..... 63
- Python and Perl ..... 64
- Networking APIs ..... 64
- BSD Sockets ..... 65
- OpenPlay ..... 65
- IPX and SPX ..... 65
- File Handling ..... 66
- libpng and libjpeg ..... 66
- libaudiofile and libsndfile ..... 67
- Ogg Vorbis ..... 67
- The SDL MPEG Library, SMPEG ..... 68
- zlib ..... 68
- 4: Mastering SDL .....
69
-
- Computer Graphics Hardware ..... 70
- The Framebuffer ..... 71
- The SDL Video API ..... 72
- Setting Up the Display ..... 74
- Direct Surface Drawing ..... 77
- Drawing with Blits ..... 83
- Colorkeys and Transparency ..... 87
- Loading Other Image Formats ..... 92
- Alpha Blending ..... 92
- Achieving Smooth Animation with SDL ..... 97
- Input and Event Processing ..... 107
- Processing Mouse Events ..... 108
- Processing Keyboard Events ..... 112
- Processing Joystick Events ..... 116
- Multithreading with SDL ..... 120
- SDL Audio Programming ..... 125
- Representing Sound with PCM ..... 125
- Feeding a Sound Card ..... 128
- An Example of SDL Audio Playback ..... 129
- Integrating OpenGL with SDL ..... 140
- Penguin Warrior ..... 144
- Creating Graphics ..... 146
- Implementing a Parallaxing Scroller in SDL .....
147
- A Simple Particle System ..... 153
- Game Timing ..... 158
- 5: Linux Audio Programming
..... 161
-
- Competing APIs ..... 162
- Introducing Multi-Play ..... 163
- Loading Sound Files ..... 164
- Using libsndfile ..... 164
- Other Options ..... 170
- Using OSS ..... 170
- Reality Check ..... 175
- Achieving Higher Performance with Direct DMA Buffer
Access ..... 178
- Playing Sound with ALSA ..... 187
- Sharing the Sound Card with ESD ..... 195
- Building Multi-Play ..... 200
- Environmental Audio with OpenAL ..... 206
- OpenAL Basics ..... 207
- Adding Environmental Audio to Penguin Warrior .....
213
- Implementing Game Music with Ogg Vorbis ..... 222
- Working with Vorbis Files ..... 223
- Adding Music to Penguin Warrior ..... 227
- 6: Game Scripting Under Linux
..... 237
-
- A Crash Course in Tel ..... 238
- Built-in Tel Commands ..... 241
- Interfacing Tel with C ..... 245
- Linking Against Tel ..... 246
- Executing Scripts ..... 246
- Understanding Commands and Objects ..... 250
- A Simple Scripting Engine ..... 252
- Designing a Game Script ..... 258
- Applying Scripting to the Real World ..... 265
- Single Versus Multiple Contexts ..... 266
- Can We Trust the Script? ..... 267
- Script Performance ..... 267
- Who's Writing the Script? ..... 268
- 7: Networked Gaming with
Linux ..... 271
-
- 'Tis a Big Net, Quoth the Raven ..... 272
- Internet Protocols ..... 272
- Addresses and Ports ..... 273
- Name Resolution ..... 274
- Socket Programming 101 ..... 275
- Sockets ..... 275
- Connecting TCP Sockets ..... 276
- Receiving TCP Connections ..... 285
- Working with UDP Sockets ..... 292
- Multiplayer Penguin Warrior ..... 300
- Network Gaming Models ..... 301
- Penguin Warrior's Networking System ..... 302
- Network Game Performance ..... 311
- Security Issues ..... 312
- 8: Gaming with the Linux
Console ..... 315
-
- Pros and Cons of the Linux Framebuffer ..... 316
- Setting Up a Framebuffer Device ..... 318
- A First Foray into Framebuffer Programming .....
318
- Setting Framebuffer Video Modes ..... 326
- How Video Scanning Works ..... 327
- The Mode Database ..... 330
- An Example ..... 330
- Use the Source, Luke! ..... 337
- Console Input Handling ..... 337
- Keyboard Input from a Terminal ..... 338
- Mouse Input with GPM ..... 348
- 9: Finishing Penguin Warrior
..... 355
-
- Adding Weapons ..... 355
- Drawing Phasers ..... 356
- Detecting Phaser Hits ..... 362
- Imposing a Sane Rate of Fire ..... 364
- Creating Status Displays ..... 364
- In Retrospect ..... 375
- 10: To Every Man a Linux
Distribution ..... 379
-
- Source or Binary? ..... 380
- Local Configuration ..... 381
- Linux Isn't Alone: Supporting FreeBSD ..... 383
- Packaging Systems ..... 384
- Graphical Installation Goodness: Loki's Setup Program
..... 387
- Understanding the Linux Filesystem Standard .....
393
- Glossary of Terms ..... 399
- Bibliography ..... 405
Commander ce livre au
prix de
41,89
€
39,8
€
Classé sous : Programming, Linux, Audio, Game, Sdl
Livres en rapport
|
Derniers Blogs
GESTION D'EXCEPTION AVEC LES TASKSGESTION D'EXCEPTION AVEC LES TASKS par richardc
Nous avons vu dans un précédent article comment utiliser Task pour effectuer des opérations dans un autre thread.
Malheureusement, comme tout le monde n'est pas parfait, il se peut que cette exécution se passe mal et qu'une exception se produise.
La...
Cliquez pour lire la suite de l'article par richardc DéMARRONS AVEC LES TASKSDéMARRONS AVEC LES TASKS par richardc
Que vous le vouliez ou non, le développement multi-tâche est maintenant une obligation pour toute nouvelle application. Il est donc vital d'en comprendre les mécanismes et de s'y mettre le plus tôt possible.
En attendant le .NET Framework 4.5 avec le...
Cliquez pour lire la suite de l'article par richardc SLIDE & DéMO TECHDAYS 2012 - FAST & FURIOUS XAML APPSSLIDE & DéMO TECHDAYS 2012 - FAST & FURIOUS XAML APPS par Vko
Retrouvez les slides et les démo de ma session Fast & Furious XAML Apps. A ceux qui se posent la question : "est-ce que le code de la DataGrid est disponible?", je vous répondrais "pas encore". Je vais mettre en place un projet codeplex pour part...
Cliquez pour lire la suite de l'article par Vko XNA IS DEAD!XNA IS DEAD! par richardc
Depuis la semaine dernière (et grâce aux TechDays 2012), je me penche activement sur la nouvelle version de Windows, aka Windows 8. Vous me direz, il était temps puisque la première preview date de Septembre dernier.
OK. Remarquez, on n'en est qu'aux...
Cliquez pour lire la suite de l'article par richardc TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 !TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 ! par ROMELARD Fabrice
Speakers: Fabrice Meillon et Stanislas Quastana Cette session est basée entièrement sur celle donnée lors de la BUILD cet hiver. Il n'y a pas d'ajout d'information en rapport avec cet évènement passé. Windows 8 Server sera intégralem...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|