Capy Code Quest is an interactive educational game designed to introduce players to the fundamentals of programming logic and algorithms. The player must guide a capybara through a grid-based puzzle to collect apples and reach its home using a sequence of logical commands.
This project was developed as a Final Project for the Technical English course in the TADS (Tecnologia em Análise e Desenvolvimento de Sistemas) undergraduate program.
- Algorithmic Thinking: Learn basic programming concepts like sequential execution and loops (
repeatForward). - Progressive Difficulty: 10 unique levels introducing new mechanics gradually.
- Puzzle Mechanics: Obstacles (rocks), interactive switches, and lockable gates.
- Multilingual Support (i18n): Playable in English (EN), Spanish (ES), and Portuguese (PT), with dynamic UI updates.
- Persistent Progress: Uses
sessionStorageto save completed levels locally without needing a database. - Responsive UI: A cozy, pastel-themed interface built with CSS Grid and Flexbox.
This project was built entirely "from scratch" without relying on external game engines or heavy frameworks, focusing on core web technologies:
- HTML5: Semantic structure and layout.
- CSS3: Custom styling, CSS Grid for the game board, Flexbox for UI components, and playful UI/UX design.
- Vanilla JavaScript (ES6+): * Game loop execution (
setInterval).- DOM Manipulation and event handling.
- State management (Capy position, orientation, inventory).
- Multilingual dictionary logic.
The goal of each level is to collect all apples and reach the goal house. You must "write a program" by clicking the command buttons, and then press RUN to execute them in order.
moveForward: Moves the capybara one cell in the direction it is facing.turnLeft/turnRight: Rotates the capybara 90 degrees.repeatForward 2x/3x: Introduces the concept of loops to save lines of code.
- 🍎 Apples: Collectibles required to clear the level.
- 🪨 Rocks: Obstacles. Hitting them crashes the program.
- 🔘 Switches: Step on them to open gates.
- 🚪 Gates: Block the path until the corresponding switch is activated.
- 🏠 House (Goal): The final destination!
Although this project is built with Vanilla HTML/JS, modern web browsers restrict certain script executions when opening files directly from the hard drive (file:/// protocol) due to CORS security policies.
To run the game properly, you need to serve it through a local web server:
- Clone this repository:
git clone [https://github.com/your-username/capy-code-quest.git](https://github.com/your-username/capy-code-quest.git)
- Open the project folder in your code editor.
- Start a Local Server:
- VS Code: Install the Live Server extension and click "Go Live" at the bottom right.
- XAMPP/WAMP: Place the folder inside your
htdocsorwwwdirectory and access viahttp://localhost/capy-code-quest.
The game will open in your browser, and the capybara will be ready for your commands!
Original concept and core development by Rocío Gomez. Curated and maintained as part of the educational portfolio.

