Una Aventura Inesperada
Una Aventura Inesperada (“An Unexpected Adventure”) is a puzzle game developed for the Nintendo DS handheld console using C and the DevkitPro ARM toolchain. The game features grid-based movement mechanics, animated sprites, and an engaging quiz-based progression system.What is Una Aventura Inesperada?
Una Aventura Inesperada is a tile-based puzzle game where players navigate through increasingly challenging levels while managing limited stamina (movement points). Players must push boxes, avoid enemies, and answer quiz questions to progress through the adventure.The game leverages the Nintendo DS’s unique dual-screen interface - the top screen displays the gameplay area with tile-based graphics, while the bottom touchscreen handles menus, dialogs, and interactive elements.
Game Overview
The game combines classic Sokoban-style puzzle mechanics with educational quiz elements:- Grid-based Movement: Navigate a 2×2 tile character through puzzle-filled levels
- Resource Management: Complete each level within a limited number of moves
- Enemy Interactions: Push enemies away or eliminate them strategically
- Box Pushing: Classic puzzle mechanics requiring spatial planning
- Quiz System: Answer questions correctly to progress between levels
- Animated Sprites: Smooth character and enemy animations at 2 frames per sprite
Key Features
Five Progressive Levels
The game includes 5 handcrafted levels with varying difficulty:| Level | Movement Limit | Description |
|---|---|---|
| 1 | 18 moves | Introduction to basic mechanics |
| 2 | 19 moves | Introduces multiple enemies |
| 3 | 23 moves | Complex box-pushing puzzles |
| 4 | 21 moves | Tight spaces and strategic planning |
| 5 | 24 moves | Final challenge combining all mechanics |
source/main.c
Stamina System
Players have a visual stamina bar displayed on the bottom screen that depletes with each move:source/main.c
Interactive Dialog System
At the end of each level, players must answer quiz questions correctly to proceed:- Multiple choice questions with two options
- Touch-based input on the bottom screen
- Correct answers unlock the next level
- Wrong answers restart the current level
- Timer-based delays prevent accidental input
Animated Sprites
The game features smooth 2-frame animations for all characters:- Player Character: 2×2 tile sprite with walking animation
- NPC Characters: Animated companion character
- Enemies: Animated hostile entities (up to 10 simultaneous enemies)
- Frame Rate: Controlled via hardware timers for consistent animation
source/main.c
Dual-Screen Interface
The Nintendo DS’s unique hardware is fully utilized: Top Screen (Main Display):- 32×24 tile grid gameplay area
- Tile-based rendering using 8×8 pixel tiles
- 256-color palette (RGB15 format)
- Real-time sprite animation
- Touch-sensitive menu system
- HUD with stamina bar visualization
- Dialog boxes with interactive buttons
- Main menu and credits screen
Target Platform
Nintendo DS Hardware
The game is built specifically for the Nintendo DS:- CPU: ARM9 (67 MHz) and ARM7 (33 MHz)
- RAM: 4 MB main RAM
- VRAM: 656 KB video RAM
- Screens: Dual 3-inch LCD screens (256×192 pixels each)
- Input: D-Pad, buttons, and resistive touchscreen
Technology Stack
DevkitPro ARM Toolchain
The game is built using the DevkitPro suite:- Compiler: GCC ARM cross-compiler
- Libraries: libnds (Nintendo DS library)
- Build System: Make
- Language: C (C99 standard)
Core Libraries
The game relies on several key libraries:source/main.c
Graphics System
- Tile-based rendering: All graphics use 8×8 pixel tiles
- Palette mode: 256-color indexed palette (8-bit)
- DMA transfers: Hardware-accelerated memory copies for graphics
- Background layers: Utilizes NDS background rendering modes
Graphics Initialization
Interrupt System
The game uses hardware interrupts for responsive gameplay:source/main.c
Project Information
- Author: Juan José Gómez Simón
- Version: 0.8
- Date: December 9, 2020
- Language: Spanish (game text and code comments)
- License: Not specified in source
Next Steps
Quickstart Guide
Set up DevkitPro and build the game from source
Game Mechanics
Learn the detailed game rules and strategies
Level Design
Explore the level layouts and puzzle solutions
Source Code
Dive into the technical implementation details