O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Black Art of Multiplatform Game Programming

Book Description

Until recently, most independent or hobbyist game programming took place on the Microsoft Windows platform. Mac OS and Linux weren't nearly as popular, and programming on home game consoles was out of the question. Today's game-programming world is more diverse. THE BLACK ART OF MULTIPLATFORM GAME PROGRAMMING is for developers working across a variety of platforms-Windows, Linux, MacOS, Android, etc. Using SDL (Simple DirectMedia Layer), a cross-platform software library, this book features demos and video tutorials for each chapter, and, in addition to multiplatform game programming, covers game engine development, software design, and programming a complete game. Get started in cross-platform development today with THE BLACK ART OF MULTIPLATFORM GAME PROGRAMMING.

Table of Contents

  1. Title Page
  2. Copyright Page
  3. Dedication Page
  4. Acknowledgments
  5. About the Author
  6. Contents
  7. Foreword by André LaMothe
  8. Introduction
  9. Chapter 1 Setting Up Your Workstation
    1. What Is a Video Game?
    2. What You Need to Know to Use This Book
    3. The Tools You Need to Get Started
    4. Revisiting the Companion Files
    5. Setting Up on Windows
    6. Setting Up on Linux (Ubuntu 12.04)
    7. Summary
  10. Chapter 2 Entering the Digital Domain
    1. The Anatomy of a Window
    2. Creating a Window
    3. Going Fullscreen
    4. Drawing an Image
    5. Creating the Game Loop
    6. The SDL Event Subsystem
    7. Moving On to the Demo
    8. Summary
  11. Chapter 3 Tapping Into the World of Graphics
    1. The Basics of Computer Graphics
    2. Drawing Simple Axis-Aligned Rectangles
    3. Drawing a Moving Sprite
    4. Alpha Masking
    5. Animating Images
    6. Summary
  12. Chapter 4 Interacting with the Matrix
    1. The Basics of Input
    2. Summary
  13. Chapter 5 Blasting Music and Sound Effects
    1. The Basics of Audio
    2. Understanding Digital Audio
    3. Using the SDL Mixer System
    4. Using Sound Effects
    5. Playing Music
    6. Summary
  14. Chapter 6 Your First Playable Video Game
    1. Understanding the Game Design
    2. Adding the Program Variables
    3. Understanding the Code Structure
    4. Putting It All Together
    5. Summary
  15. Chapter 7 Rethinking the Paddle Game
    1. Implementing the New Design
    2. Creating Game Data Structures
    3. Creating the Game Variables
    4. Understanding the Program Structure
    5. Creating the Splash Screen
    6. Creating the Game Running State
    7. Pausing the Game
    8. Creating the Game Over State
    9. Wrapping Things Up
    10. Summary
  16. Chapter 8 Designing a Game Engine
    1. Game Engines Explained
    2. Designing a Game Engine
    3. The Graphics Core
    4. The Input Core
    5. The Audio Core
    6. Tying the Main Engine Together
    7. Engine Extensions
    8. Summary
  17. Chapter 9 Crafting Levels with Tile Maps
    1. Tile Maps in Theory
    2. Tile Maps in Practice
    3. Loading a Tile Map from a File
    4. Scrolling Through Tile Maps
    5. Layering Tile Maps
    6. Summary
  18. Chapter 10 Forging Worlds with Scene Management
    1. Crash Course of Scene Management
    2. Designing the Scene Manager
    3. Implementing the Scene-Management Mechanisms
    4. Taking the Scene Manager Out for a Spin
    5. Standardizing and Incorporating Sprites
    6. Tile Map Collision Detection
    7. Tile Map Collision Response
    8. Summary
  19. Chapter 11 Inside the Mass Production Zone with Factories and Scripts…
    1. Unified Object Creation
    2. Using Factories
    3. Using Scripting Systems
    4. Summary
  20. Chapter 12 The Final Frontier
    1. The Design of Conflict Andromeda
    2. Creating the Menu System
    3. Creating the Player
    4. Creating the Level
    5. Creating the Alien Scouts
    6. Creating the Boss
    7. Creating the Bullet System
    8. Creating the Special Effects
    9. Creating the Game's Graphics
    10. Putting It All Together
    11. Balancing Gameplay
    12. Final Thoughts and Musings
    13. Summary
  21. Chapter 13 SDL 2.0 and the Future
    1. What's New in SDL 2.0?
    2. What Was Left Behind?
    3. Installing SDL 2.0
    4. Installing on Windows
    5. Porting Your Code
    6. Introduction to the Mighty Rendering API
    7. Drawing Primitives
    8. Drawing Images
    9. Advanced Image Drawing
    10. Alpha Blending and Color Modulation (Dyeing Images)
    11. Summary
  22. Appendix A Further Reading and Art Resources
  23. Appendix B The Downloadable Files
  24. Appendix C Troubleshooting
  25. Appendix D ASCII Table
  26. Index