C++ Game Development Cookbook

Over 90 recipes to get you creating modern, fast, and high-quality games with C++
Preview in Mapt

C++ Game Development Cookbook

Druhin Mukherjee

2 customer reviews
Over 90 recipes to get you creating modern, fast, and high-quality games with C++
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


C++ Game Development Cookbook Book Cover
C++ Game Development Cookbook
$ 35.99
$ 25.20
Procedural Content Generation for C++ Game Development Book Cover
Procedural Content Generation for C++ Game Development
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $40.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781785882722
Paperback346 pages

Book Description

C++ is one of the preferred languages for game development as it supports a variety of coding styles that provides low-level access to the system. C++ is still used as a preferred game programming language by many as it gives game programmers control of the entire architecture, including memory patterns and usage. However, there is little information available on how to harness the advanced features of C++ to build robust games.

This book will teach you techniques to develop logic and game code using C++. The primary goal of this book is to teach you to create high-quality games using C++ game programming scripts and techniques, regardless of the library or game engine you use. It will show you how to make use of the object-oriented capabilities of C++ so you can write well-structured and powerful games of any genre. The book also explores important areas such as physics programming and audio programming, and gives you other useful tips and tricks to improve your code.

By the end of this book, you will be competent in game programming using C++, and will be able to develop your own games in C++.

Table of Contents

Chapter 1: Game Development Basics
Introduction
Installing an IDE on Windows
Choosing the right source control tool
Using call stacks for memory storage
Using recursions cautiously
Using pointers to store memory addresses
Casting between different datatypes
Managing memory more effectively using dynamic allocation
Using bitwise operations for advanced checks and optimization
Chapter 2: Object-Oriented Approach and Design in Games
Introduction
Using classes for data encapsulation and abstraction
Using polymorphism to reuse code
Using copy constructors
Use operator overloading to reuse operators
Use function overloading to reuse functions
Using files for input and output
Creating your first simple game
Templates – when to use them
Chapter 3: Data Structures in Game Development
Introduction
Using more advanced data structures
Using linked lists to store data
Using stacks to store data
Using queues to store data
Using trees to store data
Using graphs to store data
Using STL lists to store data
Using STL maps to store data
Using STL hash tables to store data
Chapter 4: Algorithms for Game Development
Introduction
Using sorting techniques to arrange items
Using searching techniques to look for an item
Finding the complexity of an algorithm
Finding the endian-ness of a device
Using dynamic programming to break down a complex problem
Using greedy algorithms to solve problems
Using divide and conquer algorithms to solve problems
Chapter 5: Event-Driven Programming – Making Your First 2D Game
Introduction
Starting to make a Windows game
Using Windows classes and handles
Creating your first window
Adding keyboard and mouse controls with text output
Using Windows resources with GDI
Using dialogs and controls
Using sprites
Using animated sprites
Chapter 6: Design Patterns for Game Development
Introduction
Using the singleton design pattern
Using the factory method
Using the abstract factory method
Using the observer pattern
Using the flyweight pattern
Using the strategy pattern
Using the command design pattern
Creating an advanced game using design patterns
Chapter 7: Organizing and Backing Up
Introduction
Versions of source control
Installing a versioning client
Selecting a host to save your data
Adding source control – committing and updating your code
Resolving conflicts
Creating a branch
Chapter 8: AI in Game Development
Introduction
Adding artificial intelligence to a game
Using heuristics in a game
Using a Binary Space Partition Tree
Creating a decision making AI
Adding behavioral movements
Using neural network
Using genetic algorithms
Using other waypoint systems
Chapter 9: Physics in Game Development
Introduction
Using physics rules in your game
Making things collide
Installing and integrating Box2D
Making a basic 2D game
Making a 3D game
Creating a particle system
Using ragdoll in your game
Chapter 10: Multithreading in Game Development
Introduction
Concurrency in games – creating a thread
Joining and detaching a thread
Passing arguments to a thread
Avoiding deadlocks
Data race and mutex
Writing a thread-safe class
Chapter 11: Networking in Game Development
Introduction
Understanding the different layers
Selecting the appropriate protocol
Serializing the packets
Using socket programming in games
Sending the data
Receiving the data
Dealing with lag
Using synchronized simulation
Using area of interest filtering
Using local perception filter
Chapter 12: Audio in Game Development
Introduction
Installing FMOD
Adding background music
Adding sound effects
Creating a sound effect manager
Dealing with multiple sound file names
Chapter 13: Tips and Tricks
Introduction
Effectively commenting your code
Using bit fields in a struct
Writing a sound technical design document
Using the const keyword to optimize your code
Using bit shift operators in an enum
Using the new lambda function of C++ 11

What You Will Learn

  • Explore the basics of game development to build great and effective features for your game
  • Develop your first text-based game using the various concepts of object-oriented programming
  • Use algorithms when developing games with various sorting and searching techniques
  • Exploit data structures in a game’s development for data storage
  • Create your first 2D game using GDI library and sprite sheet.
  • Build your first advanced 2D game of space invaders using patterns such as observer, fly-weight, abstract factory, command, state, and more

Authors

Table of Contents

Chapter 1: Game Development Basics
Introduction
Installing an IDE on Windows
Choosing the right source control tool
Using call stacks for memory storage
Using recursions cautiously
Using pointers to store memory addresses
Casting between different datatypes
Managing memory more effectively using dynamic allocation
Using bitwise operations for advanced checks and optimization
Chapter 2: Object-Oriented Approach and Design in Games
Introduction
Using classes for data encapsulation and abstraction
Using polymorphism to reuse code
Using copy constructors
Use operator overloading to reuse operators
Use function overloading to reuse functions
Using files for input and output
Creating your first simple game
Templates – when to use them
Chapter 3: Data Structures in Game Development
Introduction
Using more advanced data structures
Using linked lists to store data
Using stacks to store data
Using queues to store data
Using trees to store data
Using graphs to store data
Using STL lists to store data
Using STL maps to store data
Using STL hash tables to store data
Chapter 4: Algorithms for Game Development
Introduction
Using sorting techniques to arrange items
Using searching techniques to look for an item
Finding the complexity of an algorithm
Finding the endian-ness of a device
Using dynamic programming to break down a complex problem
Using greedy algorithms to solve problems
Using divide and conquer algorithms to solve problems
Chapter 5: Event-Driven Programming – Making Your First 2D Game
Introduction
Starting to make a Windows game
Using Windows classes and handles
Creating your first window
Adding keyboard and mouse controls with text output
Using Windows resources with GDI
Using dialogs and controls
Using sprites
Using animated sprites
Chapter 6: Design Patterns for Game Development
Introduction
Using the singleton design pattern
Using the factory method
Using the abstract factory method
Using the observer pattern
Using the flyweight pattern
Using the strategy pattern
Using the command design pattern
Creating an advanced game using design patterns
Chapter 7: Organizing and Backing Up
Introduction
Versions of source control
Installing a versioning client
Selecting a host to save your data
Adding source control – committing and updating your code
Resolving conflicts
Creating a branch
Chapter 8: AI in Game Development
Introduction
Adding artificial intelligence to a game
Using heuristics in a game
Using a Binary Space Partition Tree
Creating a decision making AI
Adding behavioral movements
Using neural network
Using genetic algorithms
Using other waypoint systems
Chapter 9: Physics in Game Development
Introduction
Using physics rules in your game
Making things collide
Installing and integrating Box2D
Making a basic 2D game
Making a 3D game
Creating a particle system
Using ragdoll in your game
Chapter 10: Multithreading in Game Development
Introduction
Concurrency in games – creating a thread
Joining and detaching a thread
Passing arguments to a thread
Avoiding deadlocks
Data race and mutex
Writing a thread-safe class
Chapter 11: Networking in Game Development
Introduction
Understanding the different layers
Selecting the appropriate protocol
Serializing the packets
Using socket programming in games
Sending the data
Receiving the data
Dealing with lag
Using synchronized simulation
Using area of interest filtering
Using local perception filter
Chapter 12: Audio in Game Development
Introduction
Installing FMOD
Adding background music
Adding sound effects
Creating a sound effect manager
Dealing with multiple sound file names
Chapter 13: Tips and Tricks
Introduction
Effectively commenting your code
Using bit fields in a struct
Writing a sound technical design document
Using the const keyword to optimize your code
Using bit shift operators in an enum
Using the new lambda function of C++ 11

Book Details

ISBN 139781785882722
Paperback346 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Procedural Content Generation for C++ Game Development Book Cover
Procedural Content Generation for C++ Game Development
$ 39.99
$ 28.00
Beginning C++ Game Programming Book Cover
Beginning C++ Game Programming
$ 39.99
$ 28.00
Procedural Content Generation for Unity Game Development Book Cover
Procedural Content Generation for Unity Game Development
$ 39.99
$ 28.00
Mastering C++ Game Development Book Cover
Mastering C++ Game Development
$ 39.99
$ 28.00
Learning C++ by Creating Games with UE4 Book Cover
Learning C++ by Creating Games with UE4
$ 26.99
$ 18.90
Building a Game with Unity and Blender Book Cover
Building a Game with Unity and Blender
$ 35.99
$ 25.20