Native Android Port

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

KenC, are you still watching this? If you put your clean patch on our tracker we should be able to integrate it into SVN...
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
KenC

Re: Native Android Port

Post by KenC »

Sorry - real life (a toddler) invaded and I haven't been back to this in a long time. I'll see if I can scrape together some time to update the patches against the current codebase and get it into the tracker.

Ken
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

Yeah, a toddler can suck up time ;)

It'd be great if you could add it so it doesn't get lost in the forum, maybe you can add the compiled binary to the tracker as well.

Thanks
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Big T

Re: Native Android Port

Post by Big T »

Hi,

I have been following Exult for probably close to 10 years and I love what you guys are doing.

I very recently tried the android version that you have on the downloads page. I installed the package to my Galaxy s3 and the app would crash/kill/something after about 5 seconds. My knowledge of android dev is novice at best and I think it would be fun to see Exult run on my phone. Is there anything I can begin to do to help this effort?

Thanks

(Edit by Dominus:removed double post)
Noritaka

physical key issue fix

Post by Noritaka »

hey if anyone interested i got a fix concerning binding left click to a physical key problem.

1.you'll need to download Gamekeyboard on GooglePlay (Paid app)
2.Activate and Remap the hard key you wanna use to d-pad center
3.in exult in mouse advanced option tick enable right click with trackball center

et voila !
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

Has anyone compiled a newer version for Android?
Pegbyter
Posts: 114
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Pegbyter »

Not to my knowledge, I have it running on my Android tablet too and have been waiting for a newer version for some time.
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

Well, I took a stab at it.

First, I compiled exactly what Ken originally created, only I took Ken's patches and applied them to the 1.5.0-svn snapshot.
I didn't change anything else.

This appears to work exactly as Ken's original version. I have about 10 minutes tops into testing.
https://dl.dropbox.com/u/58804871/Exult ... 130330.apk


My second attempt uses the newest commandergenius with the updated options. Otherwise, its the same as above.
Again, I have only about 10 minutes of testing. I really like the options this gives with the SDL.
https://dl.dropbox.com/u/58804871/Exult ... 130330.apk

NOTE: I didn't change any code other then applying Ken's patches to the latest 1.5.0 snapshot. (and yes, some of it had to be manually applied)

If you do try these, remember this is a newer version of Exult so the rest of the files must be re-downloaded for both of these apk files.
I just did the following:
adb install -r Exult-1.5.0-new-20130330.apk

(cd to your install directory - Mine is "/storage/sdcard0/app-data")
mv net.sourceforge.exult net.sourceforge.exult.old
mkdir net.sourceforge.exult
cd net.sourceforge.exult.old
cp -r serpentisle ../net.sourceforge.exult/
cp -r blackgate ../net.sourceforge.exult/

Later, once you know you won't go back, you can then remove net.sourforge.exult.old


The new apk is using android target of android-17, the min is still android-4
The orig apk is from Ken's original of android-8

These both still uses the same android-ndk-r4-crystax.
I think I'll try updating to a newer ndk later - maybe next week and see what happens.

Also, since I don't know SDL really at all, I guessed at some of the choices. If someone knows SDL and would like to help, I'll post the AndroidAppSettings.cfg and maybe they could fill out the correct options.

if someone could edit this file and make a copy available, I'd appreciate it :)
https://dl.dropbox.com/u/58804871/Andro ... ttings.cfg

Lastly, as a disclaimer, I'm a novice at best at this, especially coding, so use at your own risk!

Mark
Pegbyter
Posts: 114
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Pegbyter »

I'll give your update a shot and playtest it... Give me a couple of days... I did find though that the touchscreen makes the mouse pointer difficult at best to use. I was wondering if something could be implemented for that, such as tapping on the avatar for the inventory screen to appear, etc.. Replace the mouse pointer with taps and double taps to perform functions instead... (i have a keyboard dock) so I have the option of using arrow keys for movement (another idea to implement)

That would make it much more playable.. Is it even feasible?

Peg.
Pegbyter
Posts: 114
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Pegbyter »

Oh and of course, tap and drag to arm/disarm equip party members and grab items from your surroundings.. Tap on people to talk to them, attack them in combat mode; etc.. You get the idea..

Peg.
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

If I'm understanding correctly, what you are describing is possible with the new SDL options.

Play around with the SDL mouse emulation->Advanced Features
try with all of these unchecked.

Next set mouse emulation->left mouse click->tap and hold (checked)

I actually am playing now with mouse emulation->right mouse->touch screen with second finger (checked) (not sure If I'll keep it or not yet :))

Anyway, lots of possible options.

Hopefully there's a combination that works for you.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

Mark, thanks for stepping up (even though I'm not an android user).
Can you add a new patch against current svn after you applied the manual edits?
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
CEG

Re: Native Android Port

Post by CEG »

For people that aren't finding a control scheme they like, after playing around with different control configurations, I came up with a pretty good set up. Works good for me anyway.

I set it up to control Avatar movement using it's on-screen joystick feature. It's just so much easier to move around that way than the original follow the cursor method (in the absence of an actual physical mouse that is).

Then I set up the mouse controls to act just like touch controls. You do that by setting left click to "Normal", then un-checking "Relative mouse movement". That way you can just double tap right on the avatar to bring up the paperdoll and double tap on the back pack to open... etc. To move stuff, you just touch right on them and drag and drop (probably wont work well on a phone though, when it comes to tiny items).

There's really no need to set up the right mouse button since I use the joystick to move, and the gumps all close when you hit the back button.

Finally I took advantage of the on-screen customizable buttons and set up one for combat, pause combat, map, target, inventory, food, and spellbook. I rarely ever have to call up the keyboard. You can re-size them and place them anywhere on the screen (same with the joystick). I just made them pretty small and have them lining the right boarder of the screen. I'm about 12 hours into BG and it works pretty smoothly.
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

DominusMobile1 Absolutely!
Unfortunately, I don't know how.

If its something you can explain to me easily, then let me know.

Otherwise, I can take a copy of my exult and make it available for download.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

Ok,
if you are grabbing SVN of Exult via svn then just change directory in terminal or command prompt to the folder where you have the Exult source code and do

Code: Select all

svn diff > nativeandroidnew.diff
and a textfile named nativeandroidnew.diff will be in that folder.

If you grabbed the SVN from our download page, then it is probably the easiest if you zip the whole folder up and put it onlyine. I should be able to do the diff then.

Thanks
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

Dominus! Thanks for all you do for this. It is really appreciated.


the nativeandroidnew.diff only appears to have changes from current files. It doesn't look like any new files, such as Makefile.Android, or some android specific code in the android directory is included.
Maybe thats all you wanted?
https://dl.dropbox.com/u/58804871/nativeandroidnew.diff

Just in case, here is a copy of my exult folder with all changes with the newest svn.
https://dl.dropbox.com/u/58804871/exult.tar

It has the Makefile.Android, a README.Android I quickly created and all the other code additions that Ken has made.

Thanks again Dominus, let me know if there is anything else you would like from me.
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

Dominus,

Here is a patch that includes all the changes including the new files and such.
https://dl.dropbox.com/u/58804871/exult ... -all.patch

Mark
Steve Beeby

Re: Native Android Port

Post by Steve Beeby »

I think I've found an issue with 4.2 devices (multi-user support). It revolves around the location of user files (JB MR1 added unique directories for each user).

I'm new to the SourceForge game, but I think I'd like to spend some time helping with this project. Does anyone know of a good way to quick start myself here?
Steve Beeby

Re: Native Android Port

Post by Steve Beeby »

Nevermind about the bug... just getting a feel for it. I am curious about helping out still, though. :)
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

@Mark: yeah, sorry, I didn't think of additional files :)
You'd need to add them to SVN and then make a diff, but you figured it out on your own. Great and thanks for the new diff. I didn't look at the patch before but it doesn't look like too much needs changing to our code. At the end of the patch some signed stuff and before that some SDL.h includes which might not be needed anyway. I'll see if I can convince the higher powers to include the patch maybe...

@Steve, so far the native android patch has not been included in SVN so all there is in regards to development of it is the patch itself and this thread :)
So if you want to get going, grab SVN (and best through SVN and not the source tarball - so you can make patches easier) and code away. If problems arise or you are not sure how to handle stuff (input for example) best ask here in this thread or make a new one with "native android port" in its subject.

@Mark & Steve: best port Exult to SDL 2.0 to make use of all the new android specific features of the upcoming new SDL (mostly kidding - porting is necessary sooner or later but not that easy) :)
Anyway, thanks for showing interest and doing something with this patch.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
msbalfe
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by msbalfe »

Dominus,

Yes, I was thinking the same thing. There are likely some code changes that are no longer necessary.

Steve,
I don't have a 4.2, just 4.1. Hopefully it is working for you.
I really haven't had a problem with the recent build. I especially like that the 2 finger gestures work.
I'll also post an update in a few days from the latest SVN and also with a more reasonable SDL splash screen timeout.

The latest commander-genius has support for SDL 1.3. As I understand it, thats SDL 2.0 with SDL 1.2 compatibility.
If thats the case, then once Exult supports 2.0, an android version should be easy.

Mark
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

The latest commander-genius has support for SDL 1.3. As I understand it, thats SDL 2.0 with SDL 1.2 compatibility.
If thats the case, then once Exult supports 2.0, an android version should be easy.
Yes, when the SDL guys decided to name SDL 1.3 to SDL2 they dropped the compatibility layer for running SDL 1.2 apps (like Exult) SDL 1.3/2.0.
We did have the compatibility layer added somewhat but that move from the SDL guys invalidated that again :(
So to support latest SDL 2 and all its features one would need to fully port Exult :)

SDL 2. is supposed to be released in May (http://forums.libsdl.org/viewtopic.php? ... 6efca81e51)

Edit: one other thing to make the patch "cleaner" could be adding the android stuff to configure.in so the autotools can do their magic, but then we do have extra makefiles for other ports as well :)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

Sorry, I had to freeze this thread as it attracted spambots a LOT!
Please open a new thread if you want to continue to discuss this.

Damn spammers :(
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Native Android Port

Post by Dominus »

Since dropbox changed public files sharing rules old links do not work anymore.
I've uploaded the last patch (I only have the latest) to our patch tracker at https://sourceforge.net/p/exult/patches/108/.
Be advised the patch is likely not going to apply without manual help as Exult's source has changed since then, especially indentation which will screw up the patch utility.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Locked