Group Members
- Executive Summary
- Introduction
- Project Description
- Methodology
- Project Implementation
- Results
- Testing and Validation
- Conclusion
- File Structure
CapTale is a modular, object-oriented 2D world-style game developed in C++ using the Raylib library. It consists of multiple interconnected mini-games called "cities," each offering a different gameplay experience. The project focuses on applying Object-Oriented Programming (OOP) concepts such as encapsulation, inheritance, and modularity to manage complexity and promote code reuse.
- Successfully applied OOP principles: encapsulation, inheritance, abstraction, modular design.
- Implemented token and energy systems to simulate in-game resource management.
- Developed a working game featuring seven diverse cities.
Many beginner-level games lack maintainability and modularity. CapTale addresses this issue by applying structured OOP design, where each city is encapsulated as a class. This reinforces core programming principles while building a playable game.
- Build an interactive 2D game in C++ using Raylib.
- Apply OOP concepts to structure and modularize code.
- Implement diverse, city-based gameplay.
- Integrate resource systems (tokens and energy).
- Include pause functionality and a customizable player character.
Inclusions:
- Customizable "Cap" character with 8-directional movement.
- Seven cities:
- Pong City (3 difficulty levels: Karachi, New York, Rome)
- Shooter City (spaceship shooting game)
- Car City (coin collecting and obstacle avoidance)
- Energy City (refill energy via fruit-catching game)
- Earning City (math questions to earn tokens)
- ATM City (deposit/withdraw tokens)
- Custom City (character customization)
- Pause feature (Pong City)
- Resource management: energy and tokens
Exclusions:
- Multiplayer support
- Advanced AI/animations
- Mobile/web ports
- Language: C++
- Library: Raylib
- Editor: Visual Studio Code
- Assets: Canva Pro (for character/background design)
The development followed an agile, iterative approach. Each city and core system was built and tested incrementally to ensure smooth integration and bug-free gameplay.
- Ismail Silat : Shooter City, Earning City, Energy City, ATM logic, Lobby mechanics, UI messaging, Character save/load
- Ali Kashif : Game structure, Pong City, ATM City, Custom City, fruit logic, pause mechanics, Info section
- Hammad Abdul Rahim : Car City, token system logic, UI design and screen layouts
- Object-oriented class architecture
- Each city encapsulated in its own class
- Cap class for player movement and customization
- Main loop manages transitions between cities
- Modular city-based navigation
- Cap character customization
- Pong game with AI and levels
- Shooter, car, and quiz mini-games
- Pause functionality (in Pong City)
- Token/energy tracking systems
- Quiz-based token earning
- ATM transaction interface
- Seamless city transitions
- Input conflicts in pause and city switching
- Code merging while developing in parallel
- Learning curve with Raylib (input, drawing, sound)
- Fully functional, playable game
- Seven modular city games
- Token and energy systems integrated
- Strong application of OOP principles
- Manual testing at each development stage
- Debugging and optimization for each city
- Edge cases like no energy/tokens handled with appropriate UI messages
CapTale effectively applied C++ OOP principles in a playable 2D world. Its modular structure enabled collaboration and parallel development. Each city maintained independence while contributing to a unified gameplay experience.
The project was a meaningful learning experience, especially in design, coordination, and integrating logic across modules. It boosted our programming confidence and teamwork skills.



















