Project 2 — The Text Adventure Engine
You’ve built a math engine. Now you’re going to build a story engine — a branching narrative system where the player makes choices, scenes change, and the world reacts instantly.
This is your first taste of real software architecture: scenes, state, input handling, and reusable structures. And yes — you’ll break it beautifully.
The Text Adventure Engine is a console program that:
- prints a scene description,
- shows two or more choices,
- lets the player type a number,
- jumps to the next scene instantly,
- and loops forever until the story ends.
It’s a choose‑your‑own‑adventure engine — and you can twist every knob.
Copy and paste this prompt into your AI assistant:
Once the AI gives you the code:
Open Visual Studio → Create a new project → Console App.
Replace everything in Program.cs with the AI’s output.
Press F5. Make choices. Watch the story branch.
Now let’s twist the knobs.
These tweaks turn your story engine into something wild.
You’ve just added state — the backbone of real game engines.
Random.Shared.Next() to make certain choices unpredictable.
Now your story has chaos — and replay value.
You’ve created a reactive narrative system — the heart of interactive fiction.
Without studying a textbook, you picked up:
- Classes & objects: Your first custom data structure.
- Lists of scenes: A simple but powerful content system.
- Input handling: Reading and validating user choices.
- State: Tracking what the player has done.
- Branching logic: The foundation of every narrative engine.