Git Product home page Git Product logo

devilutionm's Introduction

DevilutionM

Synopsis

This is an ported version of Devilution(see link below) to Android. Here is a youtube install how to video How To Install

important notes:

It doesn't 100% work yet but free free to ask any question and if I know, it will answer it . I have spent a lot of time on this and pretty well know the code flow. Some important things to note for this is that android by default has unsigned chars makes things weird.

Requirements

  • JDK and JRE 8
  • Android SDK and NDK (with Android Build-tools 28.0.3 and Android Platform API 28, though these are configurable)
  • ANDROID_HOME and ANDROID_NDK_HOME environment variables set (I did this in /etc/environment)
  • diablodat.mpq from your Diablo game (GoG version should be fine.)
  • prealpha.mpq from the publicly available resource Diablo Prealpha
  • Download the SDL dependancies

Download the dependencies (SDL2 and SDL2_image SDL2_mixer) as above or manually like below. Then open the ./android folder as an existing project in Android Studio.

Downloading NDK manually

I found that NDK 12B was the last version of NDK to support GCC. This is what so far works for compiling DevilutionX.

Downloading dependencies manually

Download the latest source release from SDL and SDL_image websites:

https://www.libsdl.org/download-2.0.php https://www.libsdl.org/projects/SDL_image/

Unzip it, put the SDL2-x.x.x and SDL2_image-x.x.x folders in external/SDL2 and rename them to SDL2 and SDL2_image so your project folder looks like this:

+ android
+ external
| + SDL2
| | + Android.mk
| | | SDL2
| | | SDL2_image

Compiling the sample program (command line)

You can download the dependencies (SDL2 SDL2_mixer and SDL2_image), compile your program and then install it on a connected device with the following commands:

./get_dependencies
cd android
./gradlew assembleDebug
./gradlew installDebug

On YOUR ANDROID DEVICE do the following:

  • Make a folder Diablo in /sdcard/
  • Rename DIABDAT.MPQ from the DIABLO PREALPHA(LOWERCASE) prealpha.mpq
  • Copy prealpha.mpq to /sdcard/Diablo/
  • Copy the Diabdat.mpq from your GOG CD or Diablo Disk to /sdcard/Diablo/

similar projects

This is an old version of Devilution which compiles using the GCC compiler. Devilution - The Main Project AnDroidDiablo - Project Using Old Code DevilutionX - More Modern Project

Compiling the sample program (Android Studio)

  • Install Android Studio
  • install the Android SDK in a directory E.G /home/YOURUSER/Sdk/
  • Download the last version of the NDK supporting GCC here
  • Install the NDK package and unzip it in the /home/YOURUSER/sdk/
  • Make and Edit the local.properties file in your /PROJECT/android/ and add the following lines.
sdk.dir = /home/YOURUSER/Android/Sdk/
ndk.dir = /home/YOURUSER/Android/Sdk/android-ndk-r12b/

Then... compile and install

cd android
./gradlew assembleDebug
./gradlew installDebug

There, it's done!

Thanks

Most of the code here is inspired by these repositories: This helo world android template. https://github.com/pvallet/hello-sdl2-android/tree/master/android https://github.com/stephen47/android-sdl2-gradle-template (Android + gradle) https://github.com/suikki/simpleSDL/ (Android + CMake) The example libSDL2 program which draws the square on screen was found at https://stackoverflow.com/questions/21890627/drawing-a-rectangle-with-sdl2/21903973#21903973.

The Google NDK example projects were very helpful: https://github.com/googlesamples/android-ndk

Youtube Install Video

https://www.youtube.com/watch?v=9pO07ypkf5Q

devilutionm's People

Contributors

aperturesecurity avatar louisrousseau avatar pvallet avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.