A modular Java console-based text adventure game built with a strong focus on
โจ clean architecture, โจ readability, and โจ iterative refactoring.
This project explores how ambiguous ideas (story + gameplay) can be translated into
structured, maintainable systems through code.
โ
Modular architecture with clear separation of concerns
โ
Extensible branching logic for easy feature expansion
โ
Centralized state management (player progress, inventory, decisions)
โ
Built through multiple refactor cycles to improve maintainability
โ
Console-based but designed with scalability in mind
- โ Java (console application)
- ๐งฑ Object-Oriented Programming (OOP)
- ๐งฉ Enums & Classes for game state and logic
- ๐ฟ Git & GitHub for version control
This project was built to practice and demonstrate:
- โ๏ธ Writing clean, readable Java code
- ๐ง Breaking down ambiguous requirements into structured logic
- ๐ Improving design through iterative refactoring
- ๐๏ธ Designing systems that are easy to extend without rewriting core logic
The codebase is organized around a few core responsibilities:
- Controls the game lifecycle
- Manages scene transitions and player progression
- Each scene encapsulates:
- narrative text
- player choices
- the next game state
- Designed so new scenes can be added independently
- Centralized input validation and prompts
- Keeps scene logic clean and focused
- Player state
- Inventory and items
- Decision flags that influence outcomes
โก๏ธ This separation made it possible to:
- add new story branches with minimal changes
- refactor interaction logic once and improve the entire game experience
- โ Java 11+ (or 17+, depending on setup)
- ๐ป Any IDE (IntelliJ recommended)
git clone https://github.com/NYClifewithNyx/abandonedAsylum.git cd abandonedAsylum
-
In IntelliJ:
- Open the project
- Locate the main entry class
- Click Run
-
Or via terminal (example): javac -d out src/**/*.java java -cp out Main
๐ง If your entry class name or package differs, update the command accordingly.
- ๐ Read narrative prompts in the console
- ๐ข Make choices using keyboard input
- ๐ง Decisions affect:
- story progression
- available items
- future outcomes
๐งฉ Add more scenes and branching paths
๐พ Save / Load game state
๐ก๏ธ More robust input validation
๐งช Basic unit tests for state transitions
This project reflects my approach to engineering:
- ๐ Start with a working MVP
- ๐ Improve structure through refactoring
- ๐งผ Keep code readable and maintainable
- ๐ฑ Design systems that grow gracefully over time
This project is shared for learning and demonstration purposes.