Chapter 6
Text Adventure
The C++ programming language is a tool which will serve you well while trying to build video games. It provides low-level access to processors which allows you to write efficient code for a wide variety of computer processors.
This chapter gives a very brief overview of an old-school text adventure written in C++. The code provided is available online at the book’s web page at www.apress.com/9781484208151. The code is intended to be an example of various C++ techniques rather than example of how commercial C++ code should be written.
An Overview of Text Adventure
A very simple text adventure game that you can now expand into a full game if you wish is supplied to accompany this book. Listing 6-1 shows the Game class ...
Get C++ Game Development Primer now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.