Dragon Island is a side scrolling platform game based on Super Mario World by Nintendo. The objective of this project is to create an exciting action game which is enjoyable to play. The players aim is to try and set a high score by getting to the end of each level before the time runs out while avoiding or destroying enemies and collecting power-ups.
The history of this project is that it started as a final year project for my Computer Science degree at Kingston University. I first developed a prototype using sprites from the New Super Mario Bros. game for the Nintendo DS. I then went on to build a fully functional game using Java SE which runs as an embedded webpage applet, standalone JAR and then mobile versions for Android, GP2X and the Sony PSP.
The source code is all written in the Java and C++ languages.
If anyone is interested in continuing work on this open source game then I will be happy to merge the changes and republish to Google Play as an update. It is available on the app store here.
Some of the new features I would like to add are:
- Improved touch screen controls
- Testing on different devices
- Improved physics
- Improved graphics engine and sprite handling
- More levels and a second world select screen
- Level editor working on mobile devices
- Adding more royalty free sprites and backgrounds
- Different power up items and in-app purchases
- Mini subgames and secret areas
- Fixing keyboard controls on Apple Mac computers
Please see the issue list for detailed descriptions.
The keyboard controls for the Java SE version of the game in the release are as follows:
Arrow keys = Move player
Ctrl / Q = Run or Fireball
Space / W = Jump
Enter = Select Menu Item or Pause
There is also a debug menu which can be accessed from the Title Screen -> Settings -> Debug. This can be used to enable cheat settings to control various aspects of the game and display collision rectangles and debug information.
Here are some screenshots of the game running:
You can view a demo video of the game here.
Below are the instructions on how to setup and run the various projects.
The DragonIsland-Android-Studio project is the most up to date version of the game which has been published to Google Play.
Download the required software here:
- Install Android Studio
- Open the DragonIsland-Android-Studio project
- Select Tools -> SDK Manager -> SDK Platforms tab and ensure Android API 34 is installed
- Select Tools -> SDK Manager -> SDK Tools tab and ensure Android SDK Build-Tools 34 is installed
- If there are still build errors try selecting File -> Invalidate Caches...
If you get an error stating SDK Location not found this is because the local.properties file is not found as it should not be checked into version control and should be generated automatically by Android Studio. If this happens create a new text file in the root of the project folder called local.properties and add the following specifying the location of your Android SDK folder:
sdk.dir=C\:\\Users\\User\\AppData\\Local\\Android\\Sdk
You should now be able to press the run button and launch the application on a connected device.
If you want to test the application using a virtual device:
- Select Tools -> Device Manager
- Click Create Device
- Choose a device. I recommend Nexus S
- Download a system image
- Give the device a name and click Finish
You should now be able to press the run button and launch the application on a AVD.
The following Java projects were built using Eclipse.
- Prototype-Demo
- DragonIsland-Java
- DragonIsland-Applet
Download the required software here:
Here are the instructions to install the Java SDK and setup Eclipse:
- Run the jdk-7u80-windows-x64.exe file to install the SDK
- Extract the adt-bundle-windows-x86_64-20140702.zip to C:\Program Files\Eclipse
To import the projects in Eclipse follow these instructions:
- Open Eclipse
- Select File -> Import...
- Choose the import source -> General -> Existing Projects into Workspace
- Select the directory of the project you want to open in the source code folder
- Select Finish
You should now be able to choose the project in the Package Explorer and select Run to start the application.
The DragonIsland-Java project includes an editor to create new levels.
- From the main game menu select Editor
- Select Load Level -> Main Game and Level 1.1.1 to open an example level map
- The editor includes instructions on how to edit or create a level
- Press the enter key and select options to edit level settings such as background, tileset and dimensions
The Android version of the project is more difficult to setup. You will need to download the Android SDK. Follow the instructions below:
- Run exclipse.exe as an Administrator
- Open Window -> Android SDK Manager
- Make sure to uncheck any existing API libraries
- Check the option next to the Android 4.2.2 (API 17) SDK and expand the node to see packages
- Deselect all System Images except for ARM EABI v7a System Image
- Click Install packages...
Import the project DragonIsland-Android using the same instructions above.
I would suggest that you change the source code package presentation to hierarchical. Select the project in the Package Explorer open the "View Menu" with Ctrl + F10 then Package Presentation -> Hierarchical
The next thing to do is create an AVD (Android Virtual Device).
- Select Window -> Android Virtual Device Manager
- Click Create...
- Give the device a name
- Choose a device. I recommend Nexus S
- Select the Target Android Version Android 4.2.2 - API Level 17
- Select CPU/ABI as ARM (armebi-v7a)
Interestingly this build of the game can also be run as a Java SE application.
- Select Run -> Run As... -> Java Application
- Project -> Properties -> Run/Debug Settings
- In the Run/Debug Settings select the Main launch configuration and click Edit...
- Open the "Classpath" tab and remove Android Lib from "Bootstrap Entries"
- Apply everything and Run the class again
Download the required software here:
- Extract gp2xsdk_windows.zip to C:\Program Files\GP2XSDK
- Open devcpp.exe to run Dev-C++
- Select Tools -> Compiler Options and add -lSDL_gfx to the linker command line to include SDL
- Select File -> Open Project or File... and the DragonIsland-GP2X source code folder and then DragonIsland.dev
- Select Execute -> Run or Ctrl+F10
Download the required software here:
Precompiled PSP Toolchain for Cygwin or alternatively Mirror
OldSchool Library PSP or alternatively Mirror
You may have to right click on the mirror links and select Save link as... to download the files.
- Extract cygwin_20081114_precompiled.rar to C:\cygwin\
- Run C:\cygwin\launcher.exe as an Administrator
- Extract OSLib_210.rar to C:\cygwin\home\user\
- Run the commands:
cd "C:/cygwin/home/user/OSLib 2.10/Install"
./Install_cygwin.bat
- Copy the DragonIsland-PSP folder included in the repository to C:\cygwin\home\user\
- Enter the following command to build the game:
cd C:/cygwin/home/user/DragonIsland-PSP
make kxploit
Here is a picture of the game with the level editor running on the PSP hardware:
I have to mention a special thanks to my Kingston university lecturers who oversaw the project and helped teach me Java and C++. For the PSP build I have to mention the PSPDEV team who built the unofficial toolchain and Brunni for the OSLib graphics library. An extra special thanks goes out to the artist No-Body-The-Dragon who provided many of the graphics for the game.