Skip to content

A collection of exercises and examples from the book Beginning C++ Through Game Programming, Third Edition by Michael Dawson

License

Notifications You must be signed in to change notification settings

flempriere/CppThroughGameProgramming

Repository files navigation

Beginning C++ Through Game Programming

This repository contains code fragments, notes and exercises from the book Beginning C++ Through Game Programming, Third Edition by Michael Dawson.

I started this repository as a way to mix up working through some more challenging algorithms textbooks while learning some (albeit outdated) C++.

Structure

This repository has been broken down by Chapter. Each Chapter contains a markdown file following the following structure,

Each Chapters markdown file is broken down into

  1. Examples - Links and descriptions of code fragments provided by the books
  2. Exercises
    1. Discussion Questions and Answers - Contains the discussion question, and an answer. Some of these are personal opinion and taste and you should consider your own reponse too
    2. Code Examples - Contains a description of the exercise, a link to a code implementation and an explanation of the solution
  3. Notes - Short abbreviated notes from the main body of the chapter
  4. Summary - Summary dot points provided at the end of a chapter
  5. Questions and Answers - Provided Questions and Answers from the chapter

In addition, the book often contains asides according to a series of classifications. To make these stand out in the notes like the book, we have used github-flavoured markdown alerts. Since the translation is not one to one with the terminally of the book we use the rough translation,

  • Hint - Good ideas that will help you become a better programmer

Warning

A hint that warns about potential poor practice

or,

Tip

A hint that encourages potential good practice

or,

Important

A hint that falls into neither category

  • Trap - These point out areas where its easy to make a mistake

Caution

Traps use the caution label

  • Trick - These suggest techniques that will make your life as a game programmer easier

Tip

Tricks, similar to helpful hints use the tip action

  • Real World - These are facts about the real world of game programming

Note

Comments about the Real World game programming industry use the note action

Content

  1. Chapter 1 - Types Variables and Standard I/O: Lost Fortune
  2. Chapter 2 - Truth, Branching and the Game Loop: Guess My Number
  3. Chapter 3 - For Loops, Strings and Arrays: Word Jumble
  4. Chapter 4 - The Standard Template Library: Hangman
  5. Chapter 5 - Functions: Mad Lib
  6. Chapter 6 - References: Tic-Tac-Toe
  7. Chapter 7 - Pointers: Tic-Tac-Toe 2.0
  8. Chapter 8 - Classes: Critter Caretaker
  9. Chapter 9 - Advanced Classes and Dynamic Memory: Game Lobby
  10. Chapter 10 - Inheritance and Polymorphism: Blackjack

Code Style

Generally each Chapter is treated by restricting oneself to the parts of the language as presented in the book up to that point. Where we deviate from this we will generally make reference to doing so. This is typically done where changes in the standard have deprecated some behaviour the book relies on (or the occasional typo correction)

About

A collection of exercises and examples from the book Beginning C++ Through Game Programming, Third Edition by Michael Dawson

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages