A JavaFX port of the classic DoJa mobile game DraponQuest, featuring authentic Final Fantasy-style chiptune audio and modern enhancements.
DraponQuest now supports both English and Japanese for all major game text, menus, and messages.
- Toggle Language: Press the
Lkey at any time in-game to instantly switch between English and Japanese. All UI, menus, and script text will update immediately. - Supported Text:
- Title, menus, battle messages, UI, and script/instructions
- More text will be localized as the game evolves
- How it works:
- All user-facing text is managed by
LocalizationManager.java. - The current language is switched at runtime and all text is updated live.
- All user-facing text is managed by
- To add or update translations, edit
src/main/java/com/draponquest/LocalizationManager.java. - Add new keys or update existing ones in both the English and Japanese maps.
- Use
LocalizationManager.getText("key")in code to fetch the correct string for the current language.
- NES-style Message System: Retro typewriter reveal with ultra-fast speed (10 chars/tick) and multi-page support.
- Sequential Battle Logic: Precise turn-based combat where monster actions and results are gated by message dismissal.
- Improved Battle UI: Raised HP bars and on-screen command prompts for better visibility.
- Enhanced Level-Up: Integrated attribute-increase messages into the unified dialogue box.
- Save/load system
- Arrow keys: Move
- ENTER: Open command menu / select
- ESC: Exit battle or menu
- L: Toggle language (English/Japanese)
- F5: Save
- F9: Load
- ...
For more details, see the code and comments in LocalizationManager.java and DraponQuestFX.java.
A modern JavaFX port of the classic DoJa mobile game DraponQuest. This project preserves the original game logic while adapting it to run on modern desktop platforms using JavaFX.
DraponQuest is a classic RPG-style mobile game originally developed for the DoJa platform. This JavaFX version brings the nostalgic gaming experience to modern desktop systems while maintaining the original gameplay mechanics, graphics, and story elements.
- Classic RPG Gameplay: Explore maps, interact with NPCs, and engage in battles
- Pixel-Accurate 128x128 Alefgard Map: A high-fidelity reconstruction of the NES Dragon Quest 1 world. Every coastline, island, and landmark (Tantegel, Rimuldar, Kol, etc.) is placed at its authentic pixel coordinates on a massive 128x128 grid.
- Enhanced Cave System: Explorable 16x16 cave mazes with "wide-path" designs (2-tile wide corridors) for smoother navigation and authentic dungeon exploration.
- Retro Graphics: Preserved original GIF sprites and tile graphics
- Command System: Traditional menu-based interaction system
- Save/Load System: Save your progress and continue later
- Modern Controls: Keyboard-based navigation adapted for desktop
- Cross-Platform: Runs on Windows, macOS, and Linux
- English Test Script & Comments: All in-game test dialogue and code comments are now in English, improving readability and maintainability.
- Javadoc Documentation: All main Java files are fully documented
- Debug Logging: Console output for all major game logic (for developers)
- Improved Movement: Player starts in a walkable area; movement logic fixed
- Battle System: HP persists between battles, ESC only exits after battle is over
- Random Encounters: 3% chance of monster encounter when moving
- Multiple Monsters: Encounter various monsters with unique stats and appearances. (Monster parameters have been adjusted to be weaker for a more forgiving experience.)
- Balanced Combat: Reduced monster attack values for fair gameplay
- Battle Win Counter: Track and display the number of battles won
- NES-style Message System: A unified dialogue box with retro typewriter reveal and multi-page support. Includes special markers for page breaks (
@), pauses (H), and end-of-message (E). - Ultra-Fast Narrative: Text reveals at lightning speed (10 characters per tick), maintaining the retro aesthetic while ensuring modern responsiveness.
- Sequential Battle Logic: Turn-based combat events are sequentially ordered using callbacks, ensuring player actions, monster attacks, and victory/defeat messages are never skipped.
- Enhanced Level-Up: Property increases (Level, HP, Attack, Defense) are clearly displayed in sequential message pages upon victory.
- Minimap System: A real-time 128x128 pixel minimap in the top-right corner. It provides a global world view on the field and automatically switches to a detailed local view in towns. (Automatically hidden during battles and in caves for a clean experience.)
- Java 17 or higher
- JavaFX SDK 21.0.2 (download from OpenJFX)
- Maven 3.6+ (optional, for Maven builds)
-
Clone the repository
git clone https://github.com/yourusername/draponquest.git cd draponquest -
Download JavaFX SDK
- Visit OpenJFX Downloads
- Download JavaFX SDK 21.0.2 for your platform
- Extract to a location like
C:\javafx-sdk-21.0.2
-
Set JavaFX Path
- Update the
JAVAFX_PATHvariable in the batch files to point to your JavaFX installation - Or set the
JAVAFX_HOMEenvironment variable
- Update the
# Build and run in one command
build-and-run.bat
# Or compile and run separately
compile.bat
run.bat# Compile the project
javac --module-path "C:\javafx-sdk-21.0.2\lib" --add-modules javafx.controls,javafx.fxml,javafx.graphics -d target/classes src/main/java/com/draponquest/*.java
# Run the game
java --module-path "C:\javafx-sdk-21.0.2\lib" --add-modules javafx.controls,javafx.fxml,javafx.graphics -cp target/classes com.draponquest.DraponQuestFX# Clean and compile
mvn clean compile
# Run with Maven
mvn javafx:run| Arrow Keys / WASD | Move player / Navigate menus | | A | Attack in battle / Dismiss message | | Enter / Space | Select / Confirm / Dismiss message | | D | Defend in battle | | R | Run (try to escape) | | F5 | Save game | | F9 | Load game | | ESC | Cancel / Back / Exit status or shop | | U | Toggle background music on/off | | S | Toggle sound effects on/off | | [ | Decrease volume | | ] | Increase volume | | L | Toggle language (English/Japanese) | | M | Toggle minimap on/off |
- Movement Mode: Use arrow keys to explore the map
- Command Mode: Navigate through action menus (Talk, Check, Magic, Item, Status)
- Battle Mode: Engage in turn-based combat (ESC only exits after battle is over)
- Event Mode: Interact with story events and NPCs
draponquest/
├── src/
│ ├── draponQuestMain.java # Legacy DoJa main application (comments translated)
│ ├── eventMapData.java # Legacy DoJa event map data (empty)
│ ├── fieldMapData.java # Legacy DoJa field map data (comments translated)
│ ├── scriptData.java # Legacy DoJa script data (comments translated)
│ └── main/
│ ├── java/com/draponquest/
│ │ ├── AudioManager.java # Manages game audio (Javadoc documented)
│ │ ├── BattleManager.java # Manages battle logic (Javadoc documented)
│ │ ├── DraponQuestFX.java # Main JavaFX game application (Javadoc documented)
│ │ ├── GameInputHandler.java # Handles user input (Javadoc documented)
│ │ ├── Inventory.java # Manages player inventory (Javadoc documented)
│ │ ├── Item.java # Represents game items (Javadoc documented)
│ │ ├── LocalizationManager.java# Handles multi-language support (Javadoc documented)
│ │ ├── Monster.java # Represents game monsters (Javadoc documented)
│ │ ├── Shop.java # Manages shop interactions (Javadoc documented)
│ │ └── fieldMapData.java # Provides main game map data and logic (Javadoc documented)
│ │ └── scriptData.java # Provides main game script data and logic (Javadoc documented)
│ └── resources/
│ ├── images/ # Game graphics (GIF sprites)
│ └── sounds/ # Game audio files (WAV)
├── target/ # Compiled classes and resources (ignored by Git)
├── bin/ # Original DoJa compiled files
├── pom.xml # Maven configuration
├── compile.bat # Windows compilation script
├── run.bat # Windows run script
├── build-and-run.bat # Combined build and run
└── clean.bat # Clean build artifacts
├── soundgen/ # All sound generation scripts (Python)
│ ├── generate_ff_victory.py
│ ├── generate_ff_battle.py
│ ├── generate_battle_music.py
│ ├── generate_ff_exact.py
│ ├── generate_ff_authentic.py
│ ├── generate_ff_sounds.py
│ └── generate_missing_sounds.py
-
Clone and setup
git clone https://github.com/yourusername/draponquest.git cd draponquest -
Install dependencies
- Ensure Java 17+ is installed
- Download and extract JavaFX SDK
- Update batch files with correct JavaFX path
-
Compile
compile.bat
-
Run
run.bat
- DraponQuestFX: Main application class with JavaFX integration
- GameLoop: Animation timer for game updates and rendering
- GameInputHandler: Keyboard event processing
- fieldMapData: Map rendering and collision detection
- scriptData: Dialogue system and event handling
- AudioManager: Sound effects and background music management
- ✅ Pixel-Accurate 128x128 Alefgard Map: An exact 1:1 clone of the original NES map, 4x larger than previous versions, featuring precise continent shaping and accurate landmark positioning.
- ✅ Cave Maze Overhaul: Redesigned cave interiors with structured mazes and wide 2-tile corridors to prevent movement issues in tight spaces.
- ✅ Player movement and collision detection (starts in walkable area)
- ✅ Command menu system
- ✅ Dialogue and script system (English test script)
- ✅ Save/load functionality
- ✅ Battle and event screen overlays
- ✅ Input handling for desktop controls
- ✅ HP persists between battles, resets only on game over
- ✅ ESC only exits battle after win/lose
- ✅ Javadoc documentation for all main files
- ✅ All code comments translated to English for improved readability
- ✅ Debug logging for all major logic (see console output)
- ✅ Random monster encounters (3% chance on movement)
- ✅ Multiple monster types with unique stats and appearances
- ✅ Monster class with individual HP and attack ranges
- ✅ Balanced combat with reduced monster attack values (monsters are weaker)
- ✅ Battle rewards displayed: Gain XP and Gold after each victory, displayed prominently.
- ✅ Modern battle UI with centered, spaced elements
- ✅ Complete audio system with authentic Final Fantasy-style sound effects and background music
- ✅ Audio controls (M/T keys for toggle, [ ] for volume)
- ✅ Real-time audio status display on main screen
- ✅ All authentic Final Fantasy-style sound files generated and integrated with exact FF notes and melodies using precise frequencies (B4: 493.88 Hz, G4: 392.00 Hz, A4: 440.00 Hz, C5: 523.25 Hz, A#4: 466.16 Hz, D#5: 622.25 Hz, D5: 587.33 Hz, G#4: 415.30 Hz, F5: 698.46 Hz)
- ✅ Complete audio integration: All generated sound files (
victory_music.wav,game_over.wav,title.wav) are now properly loaded and played at the correct game events - ✅ Minimap System: Dynamic minimap that toggles with 'M', featuring global/local switching and automatic hiding in battles and caves.
The game uses the original GIF sprites and tile graphics:
me1.gif- Player character spritemonster1.gif- First monster sprite (Tung Tung Tung Sahur)monster2.gif- Second monster sprite (Tralalero Tralala)monster3.gif- Third monster sprite (Bombardiro Crocodilo)sea.gif- Water tilessnd.gif- Sand tilesstp.gif- Steppe/grass tileswd.gif- Forest/wood tiles
All graphics are preserved from the original DoJa version for authentic retro gaming experience.
DraponQuest features a comprehensive audio system with both sound effects and background music. All audio files are procedurally generated 8-bit style sounds that perfectly match the retro aesthetic of the game:
All sound effects are procedurally generated 8-bit style audio files:
- Movement (
move.wav): Quick ascending arpeggios (like FF menu navigation) - Battle Start (
battle_start.wav): Dramatic chord progressions (like FF battle transitions) - Attack (
attack.wav): Sharp impact with harmonics and descending sweeps - Defend (
defend.wav): Soft block with resonance frequencies - Escape (
escape.wav): Whoosh sound when successfully escaping battle - Victory (
victory.wav): Iconic FF victory fanfare with exact notes - Defeat (
defeat.wav): Descending minor scale (melancholic FF-style) - Menu Select (
menu_select.wav): Click sound for menu navigation - Save (
save.wav): Chime for save operations - Load (
load.wav): Different chime for load operations - Game Over (
game_over.wav): Dramatic descending sequence (like FF game over) - Title (
title.wav): Rich chord progressions with melody layers - Victory Music (
victory_music.wav): Extended fanfare with memorable themes
All background music tracks are procedurally generated chiptune-style loops:
- Field Music (
bgm_field.wav): Simple ambient loop while exploring the map - Battle Music (
bgm_battle.wav): More intense loop during combat - Music tracks loop indefinitely and can be toggled on/off
The audio system features authentic Final Fantasy-style sound design with exact notes and frequencies from classic FF games:
- Iconic Victory Fanfare: Classic "b b b b, g a b a b, C a# C a# a#" melody with precise notes
- Exact FF Notes: Uses precise frequencies like B4 (493.88 Hz), G4 (392.00 Hz), A4 (440.00 Hz), C5 (523.25 Hz), A#4 (466.16 Hz), D#5 (622.25 Hz), D5 (587.33 Hz), G#4 (415.30 Hz), F5 (698.46 Hz)
- SNES Sound Chip Emulation: Square, triangle, and saw waves with authentic harmonics
- Rich Harmonics: Multiple harmonic layers for depth (2nd, 3rd, 4th harmonics)
- Authentic Note Patterns: Exact same melodies and chord progressions as classic FF games
- Dramatic Sound Effects: Impactful sound design like FF games with precise timing
- U Key: Toggle background music on/off
- S Key: Toggle sound effects on/off
- [ Key: Decrease volume (both music and sound)
- ] Key: Increase volume (both music and sound)
- M Key: Toggle minimap on/off (Hidden in battles and caves)
The main game screen shows real-time audio status in the top-right corner:
- Music ON/OFF indicator (green/red) - Shows if background music is enabled
- Sound ON/OFF indicator (green/red) - Shows if sound effects are enabled
- Current volume percentage (yellow) - Shows current volume level (0-100%)
All audio files are stored in src/main/resources/sounds/:
- Sound effects:
move.wav,battle_start.wav,attack.wav,defend.wav,escape.wav,victory.wav,defeat.wav,menu_select.wav,save.wav,load.wav,game_over.wav - Background music:
bgm_field.wav,bgm_battle.wav,title.wav,victory_music.wav
✅ All generated sound files are now properly loaded and played in the game! The AudioManager has been updated to ensure that:
SOUND_GAME_OVERplaysgame_over.wavwhen the player is defeatedMUSIC_TITLEplaystitle.wavon the title screenMUSIC_VICTORYplaysvictory_music.wavafter winning battles- All other sound effects and music tracks are correctly mapped and functional
If any of these files are missing, you can regenerate them using the provided Python scripts:
# Generate basic 8-bit style sounds
python soundgen/generate_missing_sounds.py
# Generate authentic Final Fantasy-style sounds with exact notes
python soundgen/generate_ff_exact.pyThe generate_ff_exact.py script creates audio with exact frequencies and notes from classic Final Fantasy games, including the precise notes used in the iconic victory fanfare: "b b b b, g a b a b, C a# C a# a#, D# D# D D# D D, C a# g# a# g, C a# C a# a#, D# D# D D# D D, C a# C D# F".
To regenerate all sound and music files, use the provided batch file:
cd soundgen
generate_all_sounds.batThis will run all sound generation scripts and automatically move the generated .wav files to the resource directory (src/main/resources/sounds/).
Note:
After running the batch file, no .wav files will remain in the soundgen/ folder—all generated files are moved to the correct location for the game to use them.
The game features a turn-based battle system with the following mechanics:
- 3% chance of encountering a monster when moving on the map
- Encounters occur after movement, not during
- Tung Tung Tung Sahur: 8 HP, attacks for 1-2 damage
- Tralalero Tralala: 12 HP, attacks for 1-3 damage
- Bombardiro Crocodilo: 18 HP, attacks for 2-4 damage
- Each monster has unique appearance and stats
- Sequential Logic: Each action (Player Attack -> Monster Attack -> Victory) is gated by a message. You must dismiss the message (A/Space/Enter) to proceed to the next turn.
- Player HP: Persists between battles, only resets on game over
- Turn-based combat: Player and monster take turns
- Actions: Attack (deals 3-6 damage), Defend (reduces incoming damage by 50%), Run (try to escape)
- Victory: Defeat the monster to gain XP and Gold. If you level up, a detailed summary will be displayed.
- Defeat: Game over screen with your total score and restart option
- Score increases by 1 every time you move one block
- Score is displayed under HP on the main screen
- Battles Won counter shows your combat victories in real-time
- Game Over screen shows your total score and final battle count
- A: Attack (and dismiss message)
- D: Defend
- R: Run (try to escape)
- ESC: Only exits after battle is complete (win or lose)
Update the JavaFX path in the batch files:
set JAVAFX_PATH=C:\javafx-sdk-21.0.2Key game constants in DraponQuestFX.java:
DISP_WIDTH = 512- Display widthDISP_HEIGHT = 512- Display heightWAIT_MSEC = 100- Game loop timingfieldMapEndHeight = 16- Initial player Y position (walkable)fieldMapEndWidth = 16- Initial player X position (walkable)
-
Player cannot move at start
- Make sure you pressed ENTER on the title screen to start the game
- Player now starts in a walkable area; if you still cannot move, check for debug output in the console
- If you see "Move blocked: not walkable or out of bounds", you may be surrounded by sea tiles (should not happen with default settings)
-
"JavaFX runtime components are missing"
- Ensure JavaFX SDK is downloaded and path is correct
- Update
JAVAFX_PATHin batch files
-
"Cannot find main class"
- Run
clean.batthencompile.bat - Check that all source files are present
- Run
-
Graphics not loading
- Verify image files exist in
src/main/resources/images/
- Verify image files exist in
-
Debugging
- All major game logic prints debug output to the console (movement, battle, state changes, audio events)
- Audio system provides detailed logging of sound effects and music playback
- Use this output to trace and diagnose issues
-
PowerShell cannot find run.bat
- In PowerShell, you must run batch files with
./run.bator.\run.batinstead of justrun.bat. - Example:
.\run.bat - This is a PowerShell security feature.
- In PowerShell, you must run batch files with
Enjoy classic RPG gameplay with modern JavaFX enhancements and a complete retro audio experience!
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Enhanced battle system with more actions (magic, items)
- Inventory management
- More sophisticated save system
- Additional monster types and encounters
- Level progression and character stats
- More game content and story elements
- Additional background music tracks for different areas
- Sound effect variations for different monster types
This project is licensed under the MIT License - see the LICENSE file for details.
- Original Author: Yakkun (DoJa version)
- JavaFX Migration: Modern development team
- OpenJFX: For the excellent JavaFX framework
- DoJa Platform: Original mobile gaming platform
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Search existing Issues
- Create a new issue with detailed information
Enjoy your journey in DraponQuest! 🐉⚔️
The in-game script at the bottom of the screen explains:
- How to move and open the command menu
- That each move increases your score by 1
- How to survive, fight, defend, and run
- That your total score is shown if you are defeated
- How to save/load your game
- U Key: Toggle background music on/off
- S Key: Toggle sound effects on/off
- [ Key: Decrease volume
- ] Key: Increase volume
- M Key: Toggle minimap on/off
- Minimap is automatically hidden during battles and in caves.
- Audio status is displayed in the top-right corner of the game screen