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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access