Create Your First Project
Start adding your projects to your portfolio. Click on "Manage Projects" to get started
Fall 2023 - Introduction to Scripting - Text-Based Python Game
Project Type
Text-Based Python Game: Navigating a Room-Based Adventure
Date
Fall 2023
🕹️ Text-Based Python Game: Navigating a Room-Based Adventure
Course: Introduction to Scripting (IT-140)
Tools Used: Python (PyCharm IDE), Dictionaries, Control Flow, Loops, Unit Testing
Project Overview
This project challenged me to design and code a simplified, interactive text-based adventure game in Python — a pivotal moment in my programming journey that deepened my understanding of logic, structure, and user interaction.
The game simulates a player navigating through various rooms using directional commands (e.g., "Go North," "Go East"). The simplified version focused on enabling movement between predefined rooms using a dictionary structure, if-elif-else statements, and a game loop that allowed the player to continue navigating until issuing an "exit" command. Unit tests confirmed that correct and incorrect directional inputs were handled gracefully, with clear output messages.
Phase One: Milestone - Moving Between Rooms
I began by coding a foundational structure that allowed movement between a few connected rooms using Python dictionaries. This phase taught me how to:
Map relationships between rooms using a nested dictionary
Handle valid vs. invalid movement inputs
Provide real-time feedback to the user (e.g., hitting a wall, invalid direction)
Exit the game with a clean message
✅ All unit tests were passed successfully, validating input handling and gameplay logic.
Phase Two: Full Game Development
In the final project phase, I expanded the game to include:
Multiple rooms, each containing a unique item
Inventory collection mechanics (e.g., “Get Iron Axe”)
Victory and defeat logic, determined by whether the player collects all items before entering the villain’s room
A gameplay loop that maintained the player’s status and allowed repeated command input
I incorporated clean, well-documented code using industry-standard best practices — including inline comments, modular function design, and clear user prompts.
What I Learned:
How to plan game logic using flowcharts and pseudocode
The fundamentals of control flow, loops, and input validation in Python
How to simulate interaction and track player status using functions and lists
The importance of structuring code for readability, modularity, and testing
Reflection:
This project bridged creativity with logic. It gave me a hands-on understanding of how to build interactive programs from the ground up — not just through writing code, but through thinking systematically and anticipating user behavior. It strengthened my foundational programming skills and helped build the confidence to tackle more complex scripting and automation tasks in future projects.











