Page 4 of 4

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 9:30 pm
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.

Re: Porting to Android via Java

Posted: Mon Jan 03, 2011 4:38 am
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)

Re: Porting to Android via Java

Posted: Mon Jan 03, 2011 11:33 pm
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 :( ))

Re: Porting to Android via Java

Posted: Tue Jan 04, 2011 1:33 am
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.

Re: Porting to Android via Java

Posted: Tue Jan 04, 2011 5:45 am
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.

Re: Porting to Android via Java

Posted: Tue Jan 04, 2011 6:31 am
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).

Re: Porting to Android via Java

Posted: Tue Jan 04, 2011 9:41 am
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