Creating Games in C: A Step-by-Step Guide


book cover
Creating Games in C++: A Step-by-Step Guide
By David Conger, Ron Little
...............................................
Publisher: New Riders
Pub Date: February 21, 2006
Print ISBN-10: 0-7357-1434-7
Print ISBN-13: 978-0-7357-1434-2
Pages: 464
 



Table of Contents  | Index
overview

Do you love video games? Ever wondered if you could create one of your own, with all the bells and whistles? It's not as complicated as you'd think, and you don't need to be a math whiz or a programming genius to do it. In fact, everything you need to create your first game, "Invasion of the Slugwroths," is included in this book and CD-ROM. Author David Conger starts at square one, introducing the tools of the trade and all the basic concepts for getting started programming with C++, the language that powers most current commercial games. Plus, he's put a wealth of top-notch (and free) tools on the CD-ROM, including the Dev-C++ compiler, linker, and debugger--and his own LlamaWorks2D game engine. Step-by-step instructions and ample illustrations take you through game program structure, integrating sound and music into games, floating-point math, C++ arrays, and much more. Using the sample programs and the source code to run them, you can follow along as you learn. Bio: David Conger has been programming professionally for over 23 years. Along with countless custom business applications, he has written several PC and online games. Conger also worked on graphics firmware for military aircraft, and taught computer science at the university level for four years. Conger has written numerous books on C, C++, and other computer-related topics. He lives in western Washington State and has also published a collection of Indian folk tales.



book cover
Creating Games in C++: A Step-by-Step Guide
By David Conger, Ron Little
...............................................
Publisher: New Riders
Pub Date: February 21, 2006
Print ISBN-10: 0-7357-1434-7
Print ISBN-13: 978-0-7357-1434-2
Pages: 464
 



Table of Contents  | Index

   Copyright
   Acknowledgments
   Introduction
      What's Different About This Book
      What's in This Book?
      System Requirements
      Free Stuff on the CD
      Who Am I?
    Part 1:  The Really Basic Stuff
      Chapter 1.  What it Takes to be a Game Programmer
      Programming Skills
      Computer Graphics Skills
      Game Design Skills
      Art Skills
      Sound and Music Skills
      Summary
      Chapter 2.  Writing C++ Programs
      Introducing the Dev-C++ Compiler
      Programming in C++
      Essential Math Operators
      Loops
      While Loops
      Do-while loops
      Windows Programming
      Game Programming
      Summary
    Part 2:  ObjectOriented Programming in Games
      Chapter 3.  Introducing Object-Oriented Programming
      Software Objects
      Classes
      Logical Operators
      The If-Else Statement
      Namespaces and Scope Resolution
      A Brief Word About Structures
      Summary
      Chapter 4.  Introducing the LlamaWorks2D Game Engine
      A Step-by-Step Overview
      How Does Llamaworks2D Work?
      A Stationary Ball
      A Bouncing Ball
      Getting Good Results
      Summary
      Chapter 5.  Function and Operator Overloading
      What Is Overloading?
      Implementing a Vector Class with Overloading
      Summary
      Chapter 6.  Inheritance: Getting a Lot for a Little
      What Is Inheritance?
      Deriving Classes
      Protected Members
      Overriding Base Class Functions
      Customizing Your Game with Inheritance
      Summary
    Part 3:  The Essentials of Game Development
      Chapter 7.  Program Structure
      Program Structure
      File Structure
      A Game Called Ping
      Summary
      Chapter 8.  Sound Effects and Music
      Sound Effects and Music Are Emotion
      Storing Sound Data
      Sound Effects in LlamaWorks2D
      Noise, Sweet Noise
      Play That Funky Music, Geek Boy
      Summary
    Part 4:  Graduating to Better C++
      Chapter 9.  Floating-Point Math in C++
      Getting into the Guts of Floating-Point Numbers
      Case Study: Floating-Point Numbers and Gamespaces
      Summary
      Chapter 10.  Arrays
      What Are Arrays?
      Declaring and Using Arrays
      Initializing Arrays
      Problems with Array Boundaries
      Summary
      Chapter 11.  Pointers
      Why Are Pointers Important to Games?
      Declaring and Using Pointers
      Pointers and Dynamic Memory Allocation
      Pointers and Inheritance
      Arrays Are Pointers in Disguise
      Summary
      Chapter 12.  File Input and Output
      Games and File I/O
      Types of Files
      Summary
      Chapter 13.  Moving into Real Game Development
      Sprites that Come Alive
      High-Speed Input
      Summary
    Part 5:  The Big Payoff
      Chapter 14.  No Slime Allowed: Invasion of the Slugwroths
      What It Takes to Make a Real Game
      Essential Game Design
      Designing Invasion of the Slugwroths
      Summary
      Chapter 15.  Captain Chloride Gets Going
      Introducing Captain Chloride
      Pulling It Together In The Game Class
      Summary
      Chapter 16.  The World of Captain Chloride
      The New Captain Chloride
      Levels in LlamaWorks2D
      Summary
      Chapter 17.  Captain Chloride Encounters Solid Objects
      Bumping into a Solid Door
      Picking Up a Key
      Making the Door Open and Close
      Summary
      Chapter 18.  That's a Wrap!
      Time for Consolidation
      Enter villains, Stage Left
      Additions to the Game
      Epilogue: Not the End
   Glossary
   Index