Porting to Android via Java

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: Porting to Android via Java

Post by Dominus »

on the music, the FMOPL emulator might be the least CPU demanding music option if you can port that. I dimly remember that being the way for the PoketPC port.
--
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!
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Re: Porting to Android via Java

Post by Malignant Manor »

DrCode, you might want to start a new thread with all the needed info in the first post. This thread already has more than 150 posts.

For iOS you only need to port current SVN to SDL 1.3 (which could be done through a compatibility header)
There's more that needs to be done. There's some things defined in functions that had to have special definitions.

I have an for Win32 (probably works in other OSs without ES support) that compiles, but it fails when it tries to render. It seemed to crash at SDL_SetVideoMode (in window or fullscreen). Fullscreen only detected support for 16 bit.

Edit: The 8-bit video check in Image_window::static_init() was wrong. I have no idea why 32 bit isn't showing up.

Edit 2: SDL_VideoModeOK returns the actual res it can display which was 24

Edit 3: Screw it since it would cost $500 for a license to distribute it with the dlls on all Embedded platforms. ($100 dollars for only Iphone rights)
Darren___

Re: Porting to Android via Java

Post by Darren___ »

It certainly makes for a quicker proof of concept -- nothing dumb about that.
I think you'll be fine, so long as you separate the android-specific interface code as much as possible at this early stage, and then later if you want, you can conveniently wrap around updated 'native' exult cpp code (which both android and iOS will accept compilation for).

This may also require simultaneously separating some interface-specific stuff from exult, depending on how you want to go about that. I've never looked at exult code before so I don't know how platform-agnostic or SDL-independent the majority of the codebase is ...But maybe I will some time. Right now I'm knee-deep in xu4.

(PS, come visit our new xu4 spam-free bulletin board (suddenly I realize that this PS is spam :( ))
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Re: Porting to Android via Java

Post by Malignant Manor »

on the music, the FMOPL emulator might be the least CPU demanding music option if you can port that. I dimly remember that being the way for the PoketPC port.
Hopefully Android phone makers are including oga (ogg) hardware acceleration unlike their main competition, Apple.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Porting to Android via Java

Post by drcode »

I don't know about performance on actual phones, but playing ogg files works fine on the emulator (probably because it's not truly emulated, but going straight to the sound system on the host computer). Right now, I'm doing what's simplest, and am pretty happy at how simple the audio code is in this version compared to classic Exult (which supports many different platforms and formats).

The next big step is to implement pathfinding and NPC schedules.
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Re: Porting to Android via Java

Post by Malignant Manor »

The next big step is to implement pathfinding and NPC schedules.
Do you plan on just converting the trunk code?

One major bug the trunk has is that the first time it changes the hour, the npcs will stop what they are doing and go to the next schedule (even if it is the same schedule and location). There's also an awkward pause that they do when changing.

Edit: Exult wasn't saving schedule locations properly so it returns 0. I've got a fix the first hour change in the trunk. I'm going to add the missing z coordinate in some unused spot (Exult Studio can set z locations for schedules).
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Porting to Android via Java

Post by Dominus »

This thread got a bit to long for browsing, so I started a new one at
http://exult.info/forum/viewtopic.php?p=346769#p346769
--
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