Chapter 1: Back Into the Dungeon
- What the First Game Was Missing
- Who This Book Is For
- What We Will Build
Chapter 2: A Backpack at Last
- Start With the First Game
- Give the Player Somewhere to Put Things
- Collect Without Activating
- Show All Nine Slots
- Read the New Commands
- Connect Pickup to Movement
- Only Advance After an Action
- Try It
- Next: Make the Backpack Earn Its Keep
Chapter 3: Use It or Save It
- Start From Your Backpack
- An Effect Needs to Say Whether It Worked
- Give Every Effect the Same Kind of Result
- Use First, Remove After Success
- Put Something Down
- Remember Which Slot Is Selected
- Pick Up What Is Under Your Feet
- Let the Dungeon Read the New Command
- Let an Inventory Action Advance the World
- Follow One Potion Through a Turn
- Try It Before Going Deeper
- Next: Who Is Carrying the Backpack?
Chapter 4: Choose Your Adventurer
- Start With Chapter 3
- Define Three Starting Classes
- Turn a Score Into a Modifier
- Give the Player Scores and Derived Values
- Let Monsters Use the Same Combat Rules
- Roll Against Armor Class
- Update Items to Match the New Attributes
- Keep Leveling Compatible
- Display the Character You Built
- Choose Before Entering the Dungeon
- Try Three Different Starts
- Next: Decide Who You Become
Chapter 5: Earning Your Next Level
- Start With Chapter 4
- Keep Experience Cumulative
- Describe the Choices Once
- Make Constitution Affect HP Growth
- Apply a Stat Increase in One Place
- Show Future Growth Alongside Current Stats
- Preview Before Spending the Point
- Award the Level, Then Ask the Question
- Follow a Warrior Through Two Levels
- Finish the Existing Combat Action
- Try Earning Your Next Level
- Next: Something Worth Equipping
Chapter 6: Weapons, Armor, and Equipment
- Start With Chapter 5
- Give Items Equipment Data
- Define the Gear We Can Find
- Build Items Through One Helper
- Reference Equipped Items From the Player
- Let Dungeon Loot Use the New Templates
- Equip Without Removing the Item
- Remove Gear Without Dropping It
- Show What Equipping Would Change
- Use Consumables, Equip Gear
- Make Whetstones Follow the Weapon
- Drop the Gear and Its Bonus Together
- Extend the Backpack Controls
- Display the Equipped Set
- A Rare Find: Magically Enhanced Equipment
- Try a Replacement, Not Just a Pickup
- Next: A Different Kind of Treasure
Chapter 7: Something Better Than a Healing Potion
- Start With Chapter 6
- Decide What Each Potion Does
- Restore Mana Without Wasting the Bottle
- Reuse the Stat-Increase Rules
- Add the Templates
- Keep a Stat Potion Unusual
- Use the Category Choice When Spawning
- Tell the Player What the Bottle Does
- Try the Bottles Without Waiting for Luck
- Next: Give That Mana a Job
Chapter 8: Learning to Cast
- Start With Chapter 7
- Describe the Spells
- Give the Player a Spellbook
- Learn From a Scroll
- Let a Wizard Grow Into Sleep
- Give Monsters Sleep and Reward State
- Handle Damage in One Place
- Award a Kill Exactly Once
- Trace a Spell Through the Map
- Validate Before Spending Mana
- Cast the Chosen Spell
- Make Sleep Cost Exactly Three Actions
- Choose a Spell From the Book
- Choose a Target and Commit
- Connect Casting to Dungeon Input
- Update the Character and Startup Displays
- Try Casting Before Going Deeper
- Next: A Dungeon Worth Preparing For
Chapter 9: A Little More Magic
- Start With Chapter 8
- Expand the Spell Table
- Teach the New Spells
- Let Intelligence Improve Mana Growth
- Track Temporary Strength Separately
- Let Monsters Be Friendly, Frightened, or Temporary
- Share Movement Between Enemies and Allies
- Wake and Uncharm Through Shared Damage
- Add Critical Hits and Weapon Fumbles
- Find Legal Places for an Ally
- Define Teleport’s Destination Pool
- Find Undead Worth Turning
- Define a Fireball’s Blast
- Confirm Dangerous Magic Before Spending
- Validate Each New Kind of Spell
- Let Wizard Spells Grow With Level
- Resolve the Spell Effects
- Extend the Casting Menus
- Show Buffs and Advance One Shared Phase
- Try the Expanded Spellbook
- Next: Somewhere to Spend the Gold
Chapter 10: The Dungeon Store
- Start With Chapter 9
- Make a Store Tile
- Give the Merchant a Small Business
- Define Offers Without Creating Player Items Yet
- Put the Store Somewhere Reachable
- Complete a Purchase Only When It Can Succeed
- Browse Before Spending
- Return the Store With Its Floor
- Reopen the Shop Without Walking Away
- Enter After the Movement Turn
- Follow Two Purchases Through the Turns
- Try Shopping Before Going Deeper
- Next: A Reason to Go Back Upstairs
Chapter 11: Remembering Previous Levels
- Start With Chapter 10
- Make Stair Travel Deliberate
- Reserve Landings Without Blocking the Player
- Give Room Placement Enough Attempts
- Store a Whole Floor Together
- Generate Each Depth Only Once
- Keep Actors Off the Arrival Tiles
- Remember the Run’s Deepest Point
- Read Enter as a Stair Command
- Select an Active Floor in the Game Loop
- Make a Round Trip
- Next: Give the Dungeon a Face
Chapter 12: Giving Your Dungeon a Face
- Keep the Working Game Beside the New Face
- Let Each Layer Keep Its Job
- Set Up Imports and Layout
- Load the Engine Without Editing Its File
- Build the Application and Its State
- Receive Text and Map State
- Separate Feedback From Repeated Status
- Connect the Adapter to the Engine
- Welcome the Player
- Read Window Events as Game Keys
- Draw Text, Panels, and the Frame
- Render the Same Character Grid in Pixels
- Fill the Legend, Equipment, and Status Panels
- Put Menus Over the Game
- Scale the Canvas to the Window
- Animate a Missile Without Taking Another Turn
- Run and Exit Through One Cleanup Path
- Save a Preview Without Playing a Run
- Try the New Face
- A New Face, the Same Dungeon
Chapter 13: Saving Your Adventurer
- Start With the Existing Engine
- Decide What a Saved Run Means
- Give the Adventure an Owner
- Save Values, Then Rebuild Behavior
- Reconstruct Items From Their Templates
- Preserve Equipment References
- Keep Every Explored Floor
- Check the File Before Using It
- Keep the Random Sequence
- Replace the Save Only After Writing It
- Save at a Stable Point in the Loop
- Make Death Final
- Offer Continue or a New Adventure
- Use Either Interface
- Try Leaving the Dungeon Alive
- The Dungeon Can Wait
Chapter 14: The Next Descent
- Look at What You Built
- Play Before You Add Another Feature
- Choose One Next Project
- Keep a Working Version Close
- Let Someone Else Enter the Dungeon
- Make It Yours
Appendices
- Appendix A: Where to Find the Source Code
- Appendix B: Glossary
- Appendix C: A Closer Look at the Python
- Appendix D: Corrections to the First Game
- Appendix E: Monsters With a Little Uncertainty
- Appendix F: Running the Finished Game and Troubleshooting