Alerte : Maintenance en cours. Certains ouvrages sont temporairement indisponibles et reviendront bientôt.

Programming Linux Games

Book Details
Title Programming Linux Games
Author(s) Loki Software, Inc., John R. Hall
Publisher No Starch Press
Year 2001
Edition 1st edition
Language English
Pages 415
ISBN 9781886411494
Genre Computer Programming, Game Development
Size 2 MB
Extension PDF

Summary

Programming Linux Games is a practical, hands-on guide to building games on the Linux platform, published by No Starch Press in 2001. The book was written by Loki Software, a company renowned for porting commercial games to Linux, in collaboration with John R. Hall, a young programmer who wrote the manuscript while interning at the company at age nineteen [citation:6][citation:10]. At a time when Linux gaming was still a nascent and fragmented ecosystem, this volume offered developers a consolidated resource for navigating the platform’s multimedia toolkits and programming interfaces. It remains a historically significant snapshot of the state of Linux game development at the turn of the millennium, capturing both the enthusiasm and the technical challenges of the era.

The book’s technical core revolves around the Simple DirectMedia Layer (SDL), which receives extensive coverage as the primary toolkit for handling graphics, audio, and input across Linux systems. Hall walks readers through setting up an SDL display, drawing and blitting surfaces, handling color keys and alpha blending, processing mouse, keyboard, and joystick events, and managing audio playback using PCM data. A complete sample game, Penguin Warrior, is constructed incrementally throughout the chapters, giving readers a tangible project to follow as new concepts are introduced [citation:1][citation:4]. Beyond SDL, the text surveys a wide range of APIs—SVGALib, OpenGL, OSS, ALSA, ESD, OpenAL, and various scripting and networking libraries—providing enough context for readers to understand the landscape and choose the right tools for their specific needs.

Practical application is emphasized throughout, with chapters dedicated to audio programming, networked gaming, and game scripting. The audio chapter confronts the notorious fragmentation of Linux sound APIs head-on, explaining the differences between OSS, ALSA, and ESD and demonstrating how to work with each. The networking chapter covers socket programming fundamentals, TCP and UDP connections, and the design of multiplayer game architectures, using Penguin Warrior as a testbed for networked play. The scripting chapter introduces Tcl as a means of embedding game logic, showing how to interface the scripting language with C code and design a simple scripting engine—though Hall himself later noted in the book’s conclusions that Tcl was not an ideal choice for the task [citation:7][citation:11].

The book is aimed at programmers who already have a reasonable grasp of C and are comfortable with basic Linux operations such as opening a terminal, copying files, and using a text editor. It does not teach programming from scratch, nor does it assume prior experience with game development specifically. The material is accessible to motivated hobbyists and students, while experienced developers coming from other platforms will find the survey of Linux-specific APIs valuable for orienting themselves in an unfamiliar environment. A review in Linux Journal noted that the book serves as an introductory text and recommended at least a cursory familiarity with the make utility and build processes to get the most out of it [citation:4].

Since its publication, Programming Linux Games has been recognized as a useful entry point for developers curious about the Linux gaming stack of the early 2000s. Reviews have praised its coverage of SDL and its practical orientation, though some have noted that certain code examples, particularly those involving OpenAL, require minor updates to compile on modern systems [citation:15]. The book’s association with Loki Software gives it a degree of authenticity, as the company was directly involved in bringing commercial games to Linux. Tragically, John R. Hall passed away in 2005 at the age of twenty-four, making this volume a testament to his early talent and enthusiasm for Linux and game development [citation:6][citation:14]. For readers interested in the history of Linux gaming or in understanding the foundations upon which modern Linux game development was built, Programming Linux Games remains a valuable and informative resource.

Key Features

  • The book provides extensive, hands-on coverage of SDL, the foundational multimedia library for Linux game development, from basic surface drawing to event handling and audio.
  • A complete sample game, Penguin Warrior, is developed incrementally across the chapters, allowing readers to see how individual techniques combine into a working project.
  • It offers a comprehensive survey of Linux gaming APIs, including graphics libraries like OpenGL and SVGALib, and audio APIs such as OSS, ALSA, ESD, and OpenAL.
  • The audio programming chapter directly addresses the fragmentation of Linux sound systems, explaining the practical differences between competing APIs.
  • Networking concepts are taught through socket programming examples, covering both TCP and UDP, and applied to the multiplayer version of Penguin Warrior.
  • A dedicated chapter introduces game scripting with Tcl, demonstrating how to embed a scripting engine into a C-based game.
  • The book includes a discussion of the X Window System and considerations for game performance within it.
  • Licensing issues specific to Linux games are examined, providing guidance on how to distribute games to the Linux community.
  • It is written by Loki Software, a company with direct commercial experience porting games to Linux, in collaboration with a young programmer who would go on to work in the game industry.
  • The text assumes familiarity with C but does not require prior game programming experience, making it suitable for intermediate programmers.
  • Code examples are provided throughout, with references to important structures and functions included inline for easy consultation while reading.

About Author

Loki Software, Inc. was a company founded in 1998 with the mission of porting popular Windows games to Linux. Based in Tustin, California, Loki became a significant force in the early Linux gaming community, bringing titles such as Quake III Arena, Unreal Tournament, and Civilization: Call to Power to the platform. The company’s work demonstrated that commercial-quality gaming was viable on Linux, and its engineers accumulated deep expertise in the platform’s multimedia APIs. Programming Linux Games emerged from this practical experience, offering readers insights that were grounded in real-world porting and development work rather than purely academic theory. Loki Software ceased operations in 2002, but its legacy endures in the tools and knowledge it contributed to the Linux gaming ecosystem.

John R. Hall (1980–2005) was a programmer and writer who studied computer science at the Georgia Institute of Technology [citation:3][citation:6]. He wrote Programming Linux Games at the remarkably young age of nineteen while interning at Loki Software, an achievement that speaks to his early aptitude and passion for technology. After his time at Loki, Hall worked at Treyarch, a video game developer known for titles such as Spider-Man and Call of Duty. Outside of programming, his interests included flying, gaming, and music. Hall passed away on September 17, 2005, at the age of twenty-four, after a battle with cancer [citation:6][citation:14]. His contribution to this book remains a fitting tribute to his enthusiasm for Linux and game development, and his work continues to be remembered by the community he was part of.

Related Books

  • Linux Game Programming — Mark "Nurgle" Collins
  • Programming Linux Games — Loki Software, John R. Hall
  • The Linux Programming Interface — Michael Kerrisk
  • SDL Game Development — Shaun Mitchell
  • Beginning Linux Programming — Neil Matthew and Richard Stones
  • Game Programming Patterns — Robert Nystrom
  • Programming Linux Games — Loki Software Inc.

Ads

FAQ

Q : Who actually wrote Programming Linux Games?

R : The book is credited to Loki Software, Inc. with John R. Hall. Hall was a nineteen-year-old intern at Loki when he wrote the manuscript, and the book reflects both his individual effort and the collective expertise of the company [citation:6][citation:10]. Loki Software was a significant player in the early Linux gaming scene, and their involvement lent the book practical credibility. The old article’s attribution to “Loki Software, John R. Hall, Loki Software Inc” is essentially correct, though it redundantly lists the company twice.

Q : What is the significance of the Penguin Warrior sample game?

R : Penguin Warrior serves as the book’s continuous case study, a 2D game that is built up piece by piece as new techniques are introduced. Readers first learn to draw graphics and handle input, then add sound, networking, and scripting, seeing how each subsystem integrates into a complete game. This incremental approach is more effective than isolated code snippets because it demonstrates the architecture of a real project and the dependencies between different components. By the end of the book, readers have a functional multiplayer game and a template for their own projects.

Q : How does the book handle the complexity of Linux audio APIs?

R : The audio chapter acknowledges that Linux sound programming is fragmented, with multiple competing APIs—OSS, ALSA, and ESD—each with its own strengths and quirks. Rather than pretending this complexity doesn’t exist, the book explains the practical differences between them and provides working examples for each. It also introduces higher-level libraries like libsndfile for loading sound files and OpenAL for environmental audio, showing how to abstract away some of the platform-specific details. This realistic treatment prepares readers to navigate the actual Linux audio landscape they will encounter [citation:4].

Q : Does the book cover 3D graphics or is it limited to 2D?

R : The primary focus is on 2D graphics using SDL, which is appropriate for the book’s introductory scope and the capabilities of the sample game. However, the book does include a brief overview of using OpenGL with SDL, pointing readers toward resources for 3D programming if they wish to pursue it. The author explicitly notes that for serious 3D work, additional SDL and OpenGL references will be needed. This makes the book a solid starting point for 2D game development without overextending into territory that would require a much larger volume.

Q : Is Programming Linux Games still useful for modern developers?

R : The book is historically valuable and still contains relevant foundational material, but it is not a modern reference. The Linux gaming landscape has changed dramatically since 2001, and some code examples, particularly those involving OpenAL, may require adjustments to compile on current systems [citation:15]. However, the concepts—SDL fundamentals, event loops, audio buffers, socket programming, and game architecture—remain applicable. Developers interested in understanding the roots of Linux game development or in learning SDL from a patient, example-driven perspective will still find value here, provided they supplement it with current documentation.

Q : What programming knowledge do I need before reading this book?

R : The author assumes that readers have a reasonable grasp of the C programming language and are comfortable with basic Linux operations such as navigating the filesystem, using a terminal, and editing text files. Familiarity with the make utility and the compilation process is helpful, though the book covers these topics briefly. No prior game programming experience is required, making the book accessible to intermediate C programmers who are new to games but want to learn in a Linux context. Complete beginners to programming would likely struggle and should seek a more foundational C resource first [citation:4].

Q : Why does the book use Tcl for scripting, and is that still a good choice?

R : Tcl was chosen for the scripting chapter because it is relatively easy to embed in C applications and has a straightforward syntax, making it a reasonable teaching vehicle for the concepts of scripting engines and game logic separation. However, John R. Hall himself acknowledged in the book’s conclusions that Tcl was not an ideal choice for number crunching or managing large data sets, and suggested that a Lisp variant like Scheme might have been better [citation:7][citation:11]. For modern developers, the specific choice of Tcl is less important than the architectural pattern demonstrated: separating game logic from the engine to enable faster iteration and modding.

Q : Who was John R. Hall and what is his legacy?

R : John R. Hall was a programmer who studied computer science at the Georgia Institute of Technology and wrote this book while interning at Loki Software at age nineteen. He later worked at Treyarch, contributing to commercial game development. Hall passed away in September 2005 at the age of twenty-four after a battle with cancer [citation:6][citation:14]. His early achievement in authoring a technical book that remains cited and remembered in the Linux community is a testament to his talent and passion. Programming Linux Games stands as a lasting contribution to the field he was just beginning to shape.

Enregistrer un commentaire

Thanks for comment

Page précédente Accueil Page suivante

Post Share Buttons

Les plus populaires Voir la suite

Biblio-Sciences