Lord of the Strings - a CLI RPG
A turn-based RPG using 'rock paper scissors' mechanics. Venture into a dangerous land, retrieve a relic, and survive encounters with hostile inhabitants. Programmed by Udenna Nebeolisa & Nestor Venegas.
About This Project
A turn-based RPG using 'rock paper scissors' mechanics. Venture into a dangerous land, retrieve a relic, and survive encounters with hostile inhabitants. Programmed by Udenna Nebeolisa & Nestor Venegas.
KEY HIGHLIGHTS
- Modern web application built with Next.js
- Full-stack development with API integration
- User-centric design and experience
- Scalable architecture and performance
CORE FEATURES
- Personalized recommendations
- Secure authentication system
- Real-time data integration
- Responsive design
PROJECT STATS
TECH STACK
System Architecture
Scalable & Performance-Focused
Frontend Architecture
Built with modern React patterns using Next.js 14+ for optimal performance and SEO. Implemented component-based architecture with reusable UI patterns.
Backend Infrastructure
Leveraged serverless architecture with API routes and database integration. Implemented efficient data caching and real-time capabilities.
Key Technical Decisions
Engineering Choices & Rationale
Database Strategy
Chose PostgreSQL with Supabase for real-time capabilities, ACID compliance, and built-in authentication. Optimized queries with proper indexing.
Performance Optimization
Implemented ISR, image optimization, and efficient caching strategies. Achieved 95+ Lighthouse scores across all metrics.
Code Quality
TypeScript for type safety, ESLint/Prettier for consistency, and comprehensive error handling with user-friendly fallbacks.
Agile Development Methodology
User-Centered & Iterative Approach
User Research
Conducted user interviews and competitive analysis to identify pain points and opportunities.
Iterative Development
Built MVP first, then enhanced features based on user feedback and performance metrics.
Data-Driven Decisions
Used analytics and user behavior data to guide feature prioritization and improvements.
Discovery & Planning
Defined project scope, technical requirements, and user stories. Created wireframes and established development timeline with clear milestones.
Core Development
Built the foundational features with focus on clean code architecture, performance optimization, and scalable patterns.
Testing & Optimization
Comprehensive testing across devices and browsers, performance optimization, and accessibility improvements for production readiness.
Deployment & Monitoring
Production deployment with CI/CD pipeline, monitoring setup, and post-launch performance tracking and user feedback collection.
DETAILS
LINKS
TECH STACK
TAGS
Lord of the Strings - a CLI RPG
Programmed by Udenna Nebeolisa & Nestor Venegas
Demo: Watch the Demo
Description
Lord of the Strings is a turn-based RPG using “rock paper scissors” mechanics. Your mission is to beat all enemies and clear all stages without your health reaching 0. The story unfolds in a land of object orientation where your character is tasked with venturing into a dangerous land to retrieve a relic. Beware of the hostile inhabitants you encounter on your journey.
Gameplay
The gameplay is straightforward:
- Navigate through different selections with the up and down arrow keys.
- Press Enter to select an option.
- During dialogue sequences, choose to read or skip and press Enter to proceed.
Features
Fully Functioning Main Menu
- Start the game.
- Access "How to Play" for gameplay instructions.
- View "Credits."
- Close the application.
Fully Functioning Combat Mechanics
- Players and enemies have health that can deplete.
- Displays player health.
- Ends combat when either the player or enemy has died.
- "Rock, paper, scissors" combat mechanics.
- Players can choose one of three attacks.
- Enemy attacks are randomly generated.
- Attacks are compared, and damage is dealt accordingly.
Structured Storyline
- Introduction to set the stage.
- The full game has 3 levels, each with its own titles & sets of dialogue to propel the story.
- Game over ending and story completion ending.
Key Challenges & Solutions
Creating Engaging CLI User Experience
Challenge: Making a text-based interface feel intuitive and engaging without graphics, while ensuring it works across different terminal environments. Solution: Implemented arrow key navigation with clear visual feedback using ASCII art and consistent formatting. Added color coding for different game states and created a responsive menu system that adapts to terminal width.
Object-Oriented Game Architecture
Challenge: Designing a clean, maintainable code structure for a game with multiple characters, combat mechanics, and story progression - all while learning OOP principles. Solution: Created separate classes for Player, Enemy, Game, and Combat systems. Used inheritance for different enemy types and implemented a state machine pattern for game flow management. This made adding new levels and enemies straightforward.
Balancing Rock-Paper-Scissors Combat
Challenge: Making the simple rock-paper-scissors mechanic feel strategic and engaging throughout multiple levels without becoming repetitive. Solution: Added enemy AI patterns that players could learn and exploit, implemented different damage multipliers for each enemy type, and created a health system that made each choice meaningful. Added visual feedback to make combat outcomes clear and satisfying.
Collaborative Development Workflow
Challenge: Two developers working on the same Ruby codebase, coordinating feature development and ensuring code consistency. Solution: Established clear module ownership (one focused on game logic, other on UI/UX), used descriptive commit messages, and implemented regular code reviews. Created shared coding standards for Ruby style and documentation.
How to Play
Clone this repository to your local machine, navigate to the project directory, and run the main Ruby file to start the game.
ruby main.rb