Quickstart Guide
This guide will help you set up the development environment, build Una Aventura Inesperada from source, and run it on an emulator or real Nintendo DS hardware.Prerequisites
Before you begin, ensure you have the following:DevkitPro ARM Toolchain
The DevkitPro ARM toolchain is required to compile Nintendo DS homebrew applications.Supported Platforms:
- Windows (via MSYS2)
- macOS (via Homebrew or pacman)
- Linux (via pacman)
DevkitPro provides pre-built packages for all major operating systems. Visit devkitpro.org for platform-specific installation instructions.
System Requirements
- Disk Space: ~500 MB for DevkitPro + toolchain
- RAM: 2 GB minimum
- OS: Windows 7+, macOS 10.13+, or Linux (kernel 3.2+)
Optional: NDS Emulator
For testing without hardware:
- DeSmuME: Recommended for accuracy
- melonDS: Modern alternative with improved features
- NO$GBA: Lightweight debugger option
Installation
Installing DevkitPro ARM
Follow the instructions for your operating system:Verify Installation
Confirm DevkitPro ARM is correctly installed:Building the Game
Clone or Download Source Code
Obtain the Una Aventura Inesperada source code:Or extract from an archive if you downloaded a ZIP file.
Navigate to Source Directory
Navigate to the source directory:You should see:
main.c- Main game logicteselas.h- Tile and level definitions- Various
.hfiles for graphics assets Makefile(if present)
Compile the Game
If a Makefile exists:If no Makefile is present, compile manually:
The build process should complete without errors. If you encounter issues, verify that all environment variables are set correctly.
Running on Emulator
Test your build using an NDS emulator:- DeSmuME
- melonDS
- NO$GBA
DeSmuME (Recommended)
Installation:- Arrow Keys: D-Pad movement
- Z/X/A/S: A/B/X/Y buttons
- Q/W: L/R triggers
- Mouse: Touchscreen (click and drag)
- Enter: Start button
Running on Real Hardware
Prepare Flash Cartridge
- Insert a microSD card into your computer
- Format as FAT32 if needed
- Copy
una-aventura-inesperada.ndsto the root or games folder
Install on Nintendo DS
- Safely eject the microSD from your computer
- Insert microSD into your flash cartridge
- Insert flash cartridge into Nintendo DS
- Power on the DS
First Playthrough Tips
Understanding the Controls
D-Pad Movement:- The player character moves in 2×2 tile blocks
- Each direction moves exactly 2 tiles
- Movement is grid-locked (no diagonal movement)
Movement System
- Tap menu buttons to navigate
- Select quiz answers by tapping on the bottom screen
- Use the restart button if you get stuck
Game Mechanics
Box Pushing
Box Pushing
- Push boxes by walking into them
- Boxes move 2 tiles in the push direction
- Boxes cannot be pushed into walls or other boxes
- Use boxes to block enemies or create paths
Box Movement Logic
Enemy Encounters
Enemy Encounters
- Enemies occupy 2×2 tiles like the player
- Push enemies to move them or eliminate them
- If an enemy has nowhere to go, it is eliminated
- Eliminating an enemy costs 1 stamina (you don’t move)
Stamina Management
Stamina Management
- Each level has a specific movement limit
- Watch the green stamina bar on the bottom screen
- Plan your route carefully to avoid running out
- Restarting the level refills stamina completely
- Level 1: 18 moves
- Level 2: 19 moves
- Level 3: 23 moves
- Level 4: 21 moves
- Level 5: 24 moves
Quiz Questions
Quiz Questions
- Answer questions correctly to advance
- Wrong answers restart the current level
- Each level has 1-3 questions
- Touch the correct answer button quickly
Level 1 Walkthrough
Here’s a basic strategy for completing the first level:Initial Assessment
- Starting position: Bottom-left area
- Movement budget: 18 moves
- Obstacles: 2 enemies, 3 boxes
- Goal: Reach the NPC at the top-right
Enemy Handling
Push the first enemy up and right to eliminate it against the wall:
- Move right (1 move)
- Move up (1 move)
- Push enemy up (1 move)
Navigate Boxes
Clear a path by pushing boxes:
- Push middle box right (1 move + movement)
- Navigate around remaining boxes
Troubleshooting
Build Issues
'arm-none-eabi-gcc' not found
'arm-none-eabi-gcc' not found
Problem: DevkitPro ARM is not in PATHSolution:
'nds.h' not found
'nds.h' not found
Problem: libnds is not installed or not foundSolution:
Linking errors
Linking errors
Problem: Missing library filesSolution:
ndstool: command not found
ndstool: command not found
Problem: NDS tools not installedSolution:
Runtime Issues
White screens on emulator
White screens on emulator
Problem: Graphics not loadingPossible causes:
- Corrupted ROM build
- Missing graphics assets in compilation
- Emulator compatibility issue
- Rebuild the ROM:
make clean && make - Try a different emulator
- Verify all
.hasset files are present
Touchscreen not responding
Touchscreen not responding
Problem: Can’t interact with menusSolution:
- DeSmuME: Ensure mouse emulation is enabled (View > Touch Screen)
- melonDS: Click directly on bottom screen area
- Real DS: Recalibrate touchscreen in DS system settings
Game freezes during level transition
Game freezes during level transition
Problem: Hangs when answering questionsPossible cause: Timer interrupt issuesSolution:
- Use accurate emulator settings (DeSmuME: Config > Emulation Settings > Use dynamic recompiler)
- Rebuild ROM with optimizations:
-O2flag
Stamina bar not updating
Stamina bar not updating
Problem: Visual glitch with HUDCause: Framebuffer not refreshingSolution:
- Check that
ActualizarBarraMovimientos()is called after each move - Verify VRAM is properly initialized:
Flash Cart Issues
ROM not appearing in menu
ROM not appearing in menu
Game crashes on real hardware
Game crashes on real hardware
Problem: Works in emulator but not on DSPossible causes:
- Flash cart firmware needs update
- ROM header issues
- Timing differences between emulator and hardware
- Update flash cart firmware
- Rebuild with hardware-specific optimizations
- Test on emulator with accurate settings first
Next Steps
Now that you have the game running:Game Mechanics
Learn advanced strategies and game mechanics
Level Solutions
View optimal solutions for each puzzle level
Modding Guide
Create custom levels and modify graphics
Source Code Deep Dive
Understand the technical implementation
If you encounter issues not covered in this guide, check the DevkitPro documentation at devkitpro.org or the libnds API reference.