Skip to content

Latest commit

 

History

History
205 lines (133 loc) · 9.12 KB

README.md

File metadata and controls

205 lines (133 loc) · 9.12 KB

Dragon Island

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.

Importing an Android Studio Project

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:

Android Studio

  1. Install Android Studio
  2. Open the DragonIsland-Android-Studio project
  3. Select Tools -> SDK Manager -> SDK Platforms tab and ensure Android API 34 is installed
  4. Select Tools -> SDK Manager -> SDK Tools tab and ensure Android SDK Build-Tools 34 is installed
  5. 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:

  1. Select Tools -> Device Manager
  2. Click Create Device
  3. Choose a device. I recommend Nexus S
  4. Download a system image
  5. 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.

Importing an Eclipse Project

The following Java projects were built using Eclipse.

  • Prototype-Demo
  • DragonIsland-Java
  • DragonIsland-Applet

Download the required software here:

Java SE Development Kit 8

Eclipse Juno ADT Bundle

Here are the instructions to install the Java SDK and setup Eclipse:

  1. Run the jdk-7u80-windows-x64.exe file to install the SDK
  2. Extract the adt-bundle-windows-x86_64-20140702.zip to C:\Program Files\Eclipse

To import the projects in Eclipse follow these instructions:

  1. Open Eclipse
  2. Select File -> Import...
  3. Choose the import source -> General -> Existing Projects into Workspace
  4. Select the directory of the project you want to open in the source code folder
  5. 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.

  1. From the main game menu select Editor
  2. Select Load Level -> Main Game and Level 1.1.1 to open an example level map
  3. The editor includes instructions on how to edit or create a level
  4. Press the enter key and select options to edit level settings such as background, tileset and dimensions

Compiling the Eclipse Android Mobile Version

The Android version of the project is more difficult to setup. You will need to download the Android SDK. Follow the instructions below:

  1. Run exclipse.exe as an Administrator
  2. Open Window -> Android SDK Manager
  3. Make sure to uncheck any existing API libraries
  4. Check the option next to the Android 4.2.2 (API 17) SDK and expand the node to see packages
  5. Deselect all System Images except for ARM EABI v7a System Image
  6. 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).

  1. Select Window -> Android Virtual Device Manager
  2. Click Create...
  3. Give the device a name
  4. Choose a device. I recommend Nexus S
  5. Select the Target Android Version Android 4.2.2 - API Level 17
  6. Select CPU/ABI as ARM (armebi-v7a)

Interestingly this build of the game can also be run as a Java SE application.

  1. Select Run -> Run As... -> Java Application
  2. Project -> Properties -> Run/Debug Settings
  3. In the Run/Debug Settings select the Main launch configuration and click Edit...
  4. Open the "Classpath" tab and remove Android Lib from "Bootstrap Entries"
  5. Apply everything and Run the class again

Compiling the GP2X build

Download the required software here:

Dev-C++ for GP2X

  1. Extract gp2xsdk_windows.zip to C:\Program Files\GP2XSDK
  2. Open devcpp.exe to run Dev-C++
  3. Select Tools -> Compiler Options and add -lSDL_gfx to the linker command line to include SDL
  4. Select File -> Open Project or File... and the DragonIsland-GP2X source code folder and then DragonIsland.dev
  5. Select Execute -> Run or Ctrl+F10

Compiling the PSP build

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.

  1. Extract cygwin_20081114_precompiled.rar to C:\cygwin\
  2. Run C:\cygwin\launcher.exe as an Administrator
  3. Extract OSLib_210.rar to C:\cygwin\home\user\
  4. Run the commands:
cd "C:/cygwin/home/user/OSLib 2.10/Install"
./Install_cygwin.bat
  1. Copy the DragonIsland-PSP folder included in the repository to C:\cygwin\home\user\
  2. 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:

Acknowledgements

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.