Cross Platform Game Development

Book description

With the increasing popularity of games that run on all PC platforms—whether Windows, Mac, or Linux—the search is on for game developers who can create cross-platform games. Cross-Platform Game Development explains to both beginners and experts how to use cross-platform tools, provides tutorials on setting up and compiling key gaming libraries, and examines the necessary code and conceptual frameworks to get started on the path to making cross-platform games. With this book discover how to create cross-platform games in C++ using the cross-platform editor Code::Blocks; explore how to make games quickly with a combination of cross-platform and open-source gaming libraries; understand the fundamentals of game programming, including hierarchial scene management, collision detection, and depth sorting; learn how to make both 2D and 3D real-time cross-platform games, complete with sound, graphics, and more.

Table of contents

  1. Title Page
  2. Copyright
  3. Contents at a Glance
  4. Contents (1/2)
  5. Contents (2/2)
  6. Acknowledgments
  7. Introduction
  8. Chapter 1 Cross-Platform Games
    1. 1.1 Platforms
      1. 1.1.1 Microsoft Windows
      2. 1.1.2 Mac OS X
      3. 1.1.3 Linux (1/2)
      4. 1.1.3 Linux (2/2)
        1. 1.1.3.1 Ubuntu
        2. 1.1.3.2 SLAX
        3. 1.1.3.3 Freespire
    2. 1.2 Cross-Platform Games
      1. 1.2.1 The Battle for Wesnoth
      2. 1.2.2 OpenArena
      3. 1.2.3 UFO: Alien Invasion
      4. 1.2.4 Shockwave and Flash Games
    3. 1.3 Preparing to Go Cross-Platform
      1. 1.3.1 Multiple Booting
      2. 1.3.2 Step 1 — Preparing to Multiple Boot
      3. 1.3.3 Step 2 — Installing Windows XP (1/2)
      4. 1.3.3 Step 2 — Installing Windows XP (2/2)
      5. 1.3.4 Step 3 — Installing Windows Vista (1/2)
      6. 1.3.4 Step 3 — Installing Windows Vista (2/2)
      7. 1.3.5 Step 4 — Installing Linux Ubuntu (1/2)
      8. 1.3.5 Step 4 — Installing Linux Ubuntu (2/2)
      9. 1.3.6 Step 5 — Summary of Multiple Boot
    4. 1.4 Virtualization — Simulating Operating Systems
      1. 1.4.1 Using VMWare
      2. 1.4.2 Creating a Virtual Machine for Linux Ubuntu
    5. 1.5 Conclusion
  9. Chapter 2 Linux Ubuntu and Linux Gaming
    1. 2.1 Ubuntu Installation and Troubleshooting
    2. 2.2 Getting to Know Ubuntu
      1. 2.2.1 Ubuntu Login
      2. 2.2.2 Ubuntu Desktop
      3. 2.2.3 System Monitor
      4. 2.2.4 Update Manager
      5. 2.2.5 Screen and Graphics Preferences and Restricted Drivers Manager
      6. 2.2.6 Add/Remove Applications
      7. 2.2.7 Synaptic Package Manager
      8. 2.2.8 Ubuntu Terminal/Console/Shell
      9. 2.2.9 Places | Computer
      10. 2.2.10 Firefox Web Browser
      11. 2.2.11 OpenOffice.org
      12. 2.2.12 Photo Editing
      13. 2.2.13 Installing and Playing a Game on Ubuntu
    3. 2.3 Linux and “Transgaming” Technologies
      1. 2.3.1 Cedega
      2. 2.3.2 CrossOver
      3. 2.3.3 Wine
        1. 2.3.3.1 Installing Wine on Linux Ubuntu
    4. 2.4 Automating Ubuntu with Automatix
      1. 2.4.1 Installing and Using Automatix for Linux Ubuntu
    5. 2.5 The Linux Shell
      1. 2.5.1 Common Shell Commands
      2. 2.5.2 Creating and Compiling a C Program Using the Ubuntu Terminal and BASH Shell Commands
    6. 2.6 Conclusion
  10. Chapter 3 Cross-Platform Development Tools
    1. 3.1 Code::Blocks
    2. 3.2 Downloading and Installing Code::Blocks in Ubuntu
    3. 3.3 Downloading and Installing Code::Blocks in Windows
    4. 3.4 Getting Started with Code::Blocks
      1. 3.4.1 Code::Blocks Projects
    5. 3.5 Cross-Platform “Hello World” Application
    6. 3.6 Graphics and GIMP
      1. 3.6.1 Installing GIMP on Windows or Mac
      2. 3.6.2 Using GIMP (1/2)
      3. 3.6.2 Using GIMP (2/2)
        1. 3.6.2.1 Creating Tileable Textures Using GIMP
        2. 3.6.2.2 Editing Image Transparency Using GIMP
    7. 3.7 Blender 3D
      1. 3.7.1 Installing Blender 3D on Linux Ubuntu
      2. 3.7.2 Installing Blender 3D on Windows/Mac
    8. 3.8 Conclusion
  11. Chapter 4 Game Programming Basics
    1. 4.1 Game Programming — Getting Started
      1. 4.1.1 Genre and Objective
      2. 4.1.2 Time Frame and Budget
      3. 4.1.3 Game Ideas
    2. 4.2 Preparing to Make Games
    3. 4.3 Using the STL: Strings and Lists
      1. 4.3.1 std::string
        1. 4.3.1.1 Configuring Projects to Use STL and std::string with Code::Blocks
        2. 4.3.1.2 Declaring, Creating, and Assigning Strings with std::string
        3. 4.3.1.3 Looping through Characters of a String with std::string
        4. 4.3.1.4 Searching for Characters in a Specified Instance of std::string
        5. 4.3.1.5 Extracting and Inserting Substrings from and to a Specified Instance of std::string
        6. 4.3.1.6 Converting Instances of std::string to Standard char* Pointers
      2. 4.3.2 std::vector
        1. 4.3.2.1 Creating a List with std::vector
        2. 4.3.2.2 Declaring Instances of std::vector
        3. 4.3.2.3 Adding Items to a List Using std::vector
        4. 4.3.2.4 Cycling through Items in a List Using std::vector
        5. 4.3.2.5 Removing Items from a List Using std::vector
    4. 4.4 The Game Loop
    5. 4.5 Conclusion
  12. Chapter 5 SDL Graphics
    1. 5.1 SDL Breakdown
    2. 5.2 Downloading and Configuring SDL
      1. 5.2.1 SDL on Ubuntu
        1. 5.2.1.1 Downloading and Installing SDL on Ubuntu Using Synaptic Package Manager
        2. 5.2.1.2 Downloading SDL Documentation from the Web
        3. 5.2.1.3 Creating an SDL Project Using Code::Blocks in Linux Ubuntu
      2. 5.2.2 SDL on Windows (1/2)
      3. 5.2.2 SDL on Windows (2/2)
        1. 5.2.2.1 Downloading and Installing SDL on Windows
        2. 5.2.2.2 Creating an SDL Project Using Code::Blocks in Windows
    3. 5.3 Getting Started with SDL
      1. 5.3.1 Initializing and Closing SDL
      2. 5.3.2 Creating a Window and Game Loop
      3. 5.3.3 SDL Surfaces
        1. 5.3.3.1 Blitting Surfaces
        2. 5.3.3.2 Optimizing SDL Surfaces
      4. 5.3.4 Additional File Formats (JPEG, PNG, TGA, and Others)
        1. 5.3.4.1 Downloading and Configuring SDL Image Development Libraries for Code::Blocks on Ubuntu
        2. 5.3.4.2 Downloading and Configuring SDL Image Development Libraries for Code::Blocks on Windows
        3. 5.3.4.3 SDL: Further Image Formats
    4. 5.4 Color Keying with Surfaces
    5. 5.5 Conclusion
  13. Chapter 6 Game Audio
    1. 6.1 Recording and Editing Game SFX
    2. 6.2 SFX Software
      1. 6.2.1 Downloading and Installing Audacity on Linux Ubuntu
      2. 6.2.2 Downloading and Installing Audacity on Windows or Mac
    3. 6.3 Recording/Creating and Editing Music
    4. 6.4 Music Creation Software
      1. 6.4.1 Downloading and Installing Schism Tracker on Linux Ubuntu
      2. 6.4.2 Downloading and Installing Schism Tracker on Windows and Mac
    5. 6.5 Programming Audio with SDL_mixer
      1. 6.5.1 Installing and Configuring SDL_mixer on Linux Ubuntu
      2. 6.5.2 Installing and Configuring SDL_mixer on Windows
      3. 6.5.3 Initializing the SDL_mixer Library
    6. 6.6 Sounds and Music with SDL_mixer
      1. 6.6.1 Loading Music
      2. 6.6.2 Playing Music
      3. 6.6.3 Controlling Music
      4. 6.6.4 Playing Samples through Channels in SDL_mixer
      5. 6.6.5 Loading Sounds into SDL_mixer as Samples
      6. 6.6.6 Handling Channels with SDL_mixer
    7. 6.7 Conclusion
  14. Chapter 7 Game Mechanics
    1. 7.1 Getting Started with Game Worlds
    2. 7.2 Creating Derivative Objects
    3. 7.3 Maintaining Game Objects
    4. 7.4 Tile-based Levels
    5. 7.5 Animations and States
    6. 7.6 Movement
      1. 7.6.1 Movement with Vectors
    7. 7.7 Hierarchical Transformations
    8. 7.8 Z-Order and Depth Sorting
    9. 7.9 Conclusion
  15. Chapter 8 Novashell and 2D Games
    1. 8.1 Novashell Overview
    2. 8.2 Downloading Novashell (Windows, Linux, and Mac)
    3. 8.3 Exploring Novashell Games
    4. 8.4 Getting to Know Novashell
      1. 8.4.1 The Game Selection Menu
      2. 8.4.2 The Editor and Player Modes
      3. 8.4.3 Getting Started – Loading, Playing, and Editing a Game
    5. 8.5 Novashell Editor
      1. 8.5.1 Tile Resources
      2. 8.5.2 Entity Resources
    6. 8.6 Novashell Tools
    7. 8.7 Editing Novashell Levels
      1. 8.7.1 Selecting, Copying, Pasting, Moving, and Filling Tiles
      2. 8.7.2 Exploring Maps and Editing Tiles
    8. 8.8 Creating New Games and Maps
    9. 8.9 Importing Art into Novashell
      1. 8.9.1 Importing Files
      2. 8.9.2 Setting a Player Entity
      3. 8.9.3 Creating Smaller Tiles from Larger Tiles
      4. 8.9.4 Setting Collision Information
    10. 8.10 Novashell System Palette
      1. 8.10.1 Audio Tiles
      2. 8.10.2 Color Tiles
      3. 8.10.3 Invisible Wall Tiles
      4. 8.10.4 Warp, Waypoint, and Path Nodes
      5. 8.10.5 Script Tiles
    11. 8.11 Novashell Scripting
      1. 8.11.1 Novashell Console
      2. 8.11.2 Attaching a Script to an Entity
      3. 8.11.3 Visual Profiles
      4. 8.11.4 Moving a Character Using the Keyboard
      5. 8.11.5 Clever Navigation with Pathfinding
    12. 8.12 Conclusion
  16. Chapter 9 Director and Web Games
    1. 9.1 Director
    2. 9.2 Director Games
    3. 9.3 Director and Shockwave Compatibility
    4. 9.4 Getting Started with Director
      1. 9.4.1 Downloading and Installing Director
      2. 9.4.2 Creating an Animated “Hello World” Application in Director (1/2)
      3. 9.4.2 Creating an Animated “Hello World” Application in Director (2/2)
    5. 9.5 Director in More Detail
      1. 9.5.1 Cast Members
      2. 9.5.2 The Stage
      3. 9.5.3 The Score Window’s Timeline
    6. 9.6 Director Scripting with JavaScript
      1. 9.6.1 Frame Scripts
      2. 9.6.2 Global Event Scripts
      3. 9.6.3 Local Event Scripts
    7. 9.7 Practical Scripting
      1. 9.7.1 Programming: Shapes, Lines, and Primitives
      2. 9.7.2 Printing a List of All Sprites On-stage
      3. 9.7.3 Animating Sprites Using Cast Members
      4. 9.7.4 Querying Mouse Events
    8. 9.8 Using the Projector for Web-based and Stand-alone Games
      1. 9.8.1 Building Web Games
      2. 9.8.2 Building Stand-Alone Games (EXE for Windows, OSX for Mac)
    9. 9.9 Conclusion
  17. Chapter 10 3D Games with OGRE 3D
    1. 10.1 OGRE 3D
    2. 10.2 OGRE 3D Games
      1. 10.2.1 Ankh
      2. 10.2.2 Other Games
    3. 10.3 Installing OGRE 3D
      1. 10.3.1 Downloading and Installing OGRE 3D on Ubuntu
      2. 10.3.2 Downloading and Installing OGRE 3D on Windows
    4. 10.4 Getting Started with OGRE 3D
    5. 10.5 Receiving Frame Events
    6. 10.6 Adding Objects to a Scene
    7. 10.7 Adding Lights and Particle Systems
    8. 10.8 Reading User Input with OGRE and OIS
    9. 10.9 Conclusion
  18. Chapter 11 Other Cross-Platform SDKs and Tools
    1. 11.1 Graphics SDKs
      1. 11.1.1 OpenGL
      2. 11.1.2 PTK
      3. 11.1.3 ClanLib
        1. 11.1.3.1 Installing ClanLib
    2. 11.2 Audio SDKs
      1. 11.2.1 FMOD
      2. 11.2.2 BASS
      3. 11.2.3 irrKlang
      4. 11.2.4 Audiere
      5. 11.2.5 OpenAL
    3. 11.3 Physics SDKs
      1. 11.3.1 ODE
      2. 11.3.2 Newton Game Dynamics
      3. 11.3.3 True Axis Physics
      4. 11.3.4 OPAL
      5. 11.3.5 Bullet
      6. 11.3.6 PhysX
    4. 11.4 Network SDKs
      1. 11.4.1 RakNet
      2. 11.4.2 HawkNL
      3. 11.4.3 SDL_net
    5. 11.5 Artificial Intelligence SDKs
      1. 11.5.1 Boost Graph Library
      2. 11.5.2 OpenSteer
      3. 11.5.3 FANN
      4. 11.5.4 Garfixia AI Repository
    6. 11.6 Input SDKs
      1. 11.6.1 LibGII
      2. 11.6.2 OpenInput
    7. 11.7 Scripting SDKs
      1. 11.7.1 Lua
      2. 11.7.2 Python
      3. 11.7.3 Ruby
      4. 11.7.4 Squirrel
      5. 11.7.5 AngelCode
      6. 11.7.6 GameMonkey
    8. 11.8 Game Engines
      1. 11.8.1 Torque
      2. 11.8.2 Irrlicht
      3. 11.8.3 Game Editor
    9. 11.9 GUI SDKs
      1. 11.9.1 OpenGUI
    10. 11.10 Web SDKs
      1. 11.10.1 YaBB
        1. 11.10.1.1 Downloading, Installing, and Creating an Online Forum
    11. 11.11 Distribution SDKs
      1. 11.11.1 NSIS
      2. 11.11.2 Inno Setup
        1. 11.11.2.1 Downloading, Installing, and Creating an Installer in Inno Setup
    12. 11.12 Conclusion
  19. Appendix A: GNU Lesser General Public License (1/2)
  20. Appendix A: GNU Lesser General Public License (2/2)
  21. Appendix B: BSD License
  22. Appendix C: Creative Commons License (1/2)
  23. Appendix C: Creative Commons License (2/2)
  24. Appendix D: zlib/libpng License
  25. Appendix E: The MIT License Template
  26. Appendix F: STL Public Member Methods Reference (1/2)
  27. Appendix F: STL Public Member Methods Reference (2/2)
  28. Appendix G: SDL Key Codes (1/2)
  29. Appendix G: SDL Key Codes (2/2)
  30. Appendix H: Novashell Functions (1/3)
  31. Appendix H: Novashell Functions (2/3)
  32. Appendix H: Novashell Functions (3/3)
  33. Appendix I: Director Events
  34. Appendix J: OGRE OIS Key Codes (1/2)
  35. Appendix J: OGRE OIS Key Codes (2/2)
  36. Index (1/2)
  37. Index (2/2)

Product information

  • Title: Cross Platform Game Development
  • Author(s): Alan Thorn
  • Release date: June 2009
  • Publisher(s): Jones & Bartlett Learning
  • ISBN: 9780763782818