All Projects Beginner Coming Soon

Text Adventure Game

Create a branching text adventure from scratch in modern C++ using only the standard library. You model rooms and their exits, parse simple typed commands, move the player through a map, and manage a small inventory. A story-driven way to practise structs, containers, and program state.

~2.5 hours

Support Free C++ Education

Help us keep this platform free for everyone! Your support enables us to create more high-quality lessons, exercises, and interactive content.

Become a Patron

What You'll Build

A playable text adventure where you type commands such as go north or take key to explore connected rooms, collect items into an inventory, and reach a winning room.

Learning Objectives

  • Model rooms with a struct holding descriptions and exits
  • Connect rooms into a map using std::vector or std::unordered_map
  • Parse typed commands into a verb and a target with std::string operations
  • Track the player location and a std::vector inventory as game state
  • Branch behaviour on commands with conditionals and a command loop
  • Detect win conditions such as reaching a goal room with a required item

Coming Soon

This project is in development. Register your interest and we'll email you the moment it goes live.

No spam. Unsubscribe anytime.

Coming Soon

This project is in development. Register your interest and we'll email you the moment it goes live.

No spam. Unsubscribe anytime.