Page 3 of 4

Re: Porting to Android via Java

Posted: Fri Dec 17, 2010 10:46 pm
by Dominus
Ha, dungeon hunter is nothing, modern phone games can look like this: http://itunes.apple.com/de/app/infinity ... 28400?mt=8
Infinity Blade looks stunning but lacks in story and is very short...

Re: Porting to Android via Java

Posted: Fri Dec 17, 2010 10:55 pm
by Malignant Manor
Dungeon hunter looks like a 3d PC game from 1999 or so ago. The small size makes the game look better than if stretched out on a monitor.

Re: Porting to Android via Java

Posted: Fri Dec 17, 2010 11:47 pm
by Wizardry Dragon
And likewise I dont think the Exult/Ultima 7 graphics do too bad on handhelds either :-)
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: Porting to Android via Java

Posted: Sat Dec 18, 2010 8:37 am
by drcode
On my emulator, the text of books and scrolls looks pretty bad, but the rest of the graphics look ok, though clearly like a PC game from about 20 years ago.:-)

Re: Porting to Android via Java

Posted: Sat Dec 18, 2010 8:43 am
by Wizardry Dragon
You know though, when you think about it, U7's graphics have aged pretty gracefully for a video game of that age.
-----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: Porting to Android via Java

Posted: Sun Dec 19, 2010 12:21 am
by drcode
I just put up a new snapshot with the walking method suggested by Wizardry. You drag from the Avatar's position to get him moving. I like it, as it's very close to the original.

Don't be surprised if there are bugs...:-) In particular, I notice that sometimes the Avatar starts walking in the opposite direction after hitting an obstacle.

Re: Porting to Android via Java

Posted: Sun Dec 19, 2010 10:51 pm
by Ed
the new snapshot immediately crashes on my phone, in place upgrading the version that was on there previously, same /sdcard/Games/exult/blackgate folders/files. has anything changed re: where the files should be?

Re: Porting to Android via Java

Posted: Mon Dec 20, 2010 11:06 am
by Dominus
Added a new section on our download page for the Android snapshot and changelog. Since the Android port is not tied to our regular changelog, this looks better :)
(you might need to refresh the downloads page)

Re: Porting to Android via Java

Posted: Mon Dec 20, 2010 5:12 pm
by drcode
Whoops. You probably need 'exult_bg.flx' in the 'exult' folder now.

Re: Porting to Android via Java

Posted: Mon Dec 20, 2010 6:16 pm
by Ed
raaaaats ill have to grab it when i get home haha

Re: Porting to Android via Java

Posted: Mon Dec 20, 2010 7:41 pm
by Ed
yup that did it, up and running again now. everything seems to still be going great, the movement works a-ok with one question: is it possible to make the area-which-counts-as-the-avatar a bit larger? as it is you have to be pretty precise to grab him to make him move, without hitting near him and not moving him, if that makes sense. i.e. a mouse cursor is easy to click him with but a fingertip is a bit less accurate. otherwise, going great

and i had way too much fun dragging the mayor around fyi i formally request this as a feature in the final build =)

Re: Porting to Android via Java

Posted: Mon Dec 20, 2010 8:41 pm
by drcode
Yea, I was wondering about using the touch interface with your finger, since the objects in U7 are so small. Maybe when you touch the screen, but aren't on an object, we should show a cross-hairs pointer. When you let up, we could remember the location (or maybe the object that it's on). Then if the next click is within a couple pixels, that's what we'd activate.

The latest snapshot should give you a 'too heavy' message when you try to drag the mayor.

Re: Porting to Android via Java

Posted: Mon Dec 20, 2010 11:38 pm
by Wizardry Dragon
The easiest way to give a larger target area for touch aiming is to make it the bounding box for the shape, but that may result in difficulties trying to select things very close to a NPC or the avatar. A better solution would be to increase the selextion area by x pixels, though that would be more difficult to program.
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: Porting to Android via Java

Posted: Tue Dec 21, 2010 8:57 am
by NewAndroid
Hi,

I'm new to Android but I would love to test Ultima 7 on my mobile phone.
Can anyone maybe give me some instructions on how to "install" Ultima 7 and the android-Exult on my phone?

Re: Porting to Android via Java

Posted: Wed Dec 22, 2010 7:59 pm
by 486DX2/66 Dragon
Woot woot woot!!!!!! Fantastic effort! Congratulations!!

Guess what we will be playing when Sony PSP Phone/Android gets on the market. :D

Re: Porting to Android via Java

Posted: Wed Dec 22, 2010 10:52 pm
by drcode
Thanks! My biggest worry now is speed, especially in the emulator. My computer is a few years old, but shouldn't be all that shabby (Pentium D 2-core at, I think 2.8Ghz). I just added support for eggs, so now Iolo joins right away, and walking around with him is pretty slow. Or maybe the egg-detection is slowing things down. I'm worried that when I add pathfinding and NPC schedules, it will become impossible to use.

I'll work a bit on performance (blindly, since profiling didn't work the last time I tried), plus the user interface.

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 1:51 am
by Ray
Running the Nexus One, unlocked, rooted, etc, so I'll take a look at this soon, and give feedback on performance.

Control Ideas:
-----------------
It is safe to assume that Android devices have a touch screen and either a ball-mouse or a d-pad that is clickable.

This would make a safe fallback of clicking the d-pad/mouse-ball to bring up inventory, tap to move, double-tap for double-click.

Optionally, mouse-wheel/d-pad to move when inventory is not displayed.

Additionally, since most (all?) phones out right now are essentially "widescreen" format, it would be safe to drop a couple on-screen buttons into the left-and right margins (combat mode toggle, perhaps?) without covering any of the playable area.

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 8:02 am
by NewAndroid
I copied Ultima 7 onto the sdcard to the directory Games/exult/blackgate

I then installed the exult app from the downloads-section on this website but when I run it I get the error-message "Process .com exult.android was unexpectedly closed."

What am I doing wrong?

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 8:14 am
by Malignant Manor
You need exult.flx in the Exult folder. You could probably just take the one from Exult's data directory of whatever OS you normally use.

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 8:23 am
by NewAndroid
Thanks! It works! :)
Great work! Can't wait to play the full game ;)

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 1:11 pm
by Ed
to Ray: not that its a huge number, but some devices are actually coming out with no trackpad/trackball. not just low end devices either but some of the big upcoming ones, like the Incredible HD. i dont know why, it seems kinda baffling to try to change the form factor now but who knows. sadly the only input method thats guaranteed to be on every device is the touchscreen, and even then youre not always guaranteed multitouch on every device or software version

the 'joys' of android development =)

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 2:29 pm
by Wizardry Dragon
Android platforms suffer from having very different input schemes. It may be beneficial to have a single-touch interface by default, and then the option to use additional other interfaces (dpad/trackpad/multitouch) to augment it. A single-touch touchscreen is really the only constant I think, so that would be the best "foundation"
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 4:42 pm
by drcode
Yes, for now I'm just going to assume that a touchscreen is present. For moving the Avatar, how about if dragging on the ground also starts him moving? Maybe with a double-click, holding down the second time.

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 6:06 pm
by monotremata
I was gonna mention the input methods the other day and completely forgot to reply hehe..
But yeah Wizardry is right, best bet by default would be a single touch interface..

Lower end phones like my Backflip dont have things like trackballs or even a multi-touch display.. (Although we did somehow get a physical keyboard).. Out of the whole Motorola Cliq/Backflip family, only the CliqXT got MT capability in its 2.1 upgrade.

Leave the options in though I say!
Some phones have custom roms that enable things like multi-touch (the Backflip does although its still up in the air whether multi-touch is safe on the display and hardware) but the 'common man' might not be so technically inclined to root and mod his/her phone..

Re: Porting to Android via Java

Posted: Thu Dec 23, 2010 8:07 pm
by Ed
drcode, the doubleclick-hold anywhere to move you just mentioned sounds like a good spot to try. that avoids having to precision click the avatar at least when youre trying to move. still going to have to precision click a lot of other things but at this resolution shouldnt be tooooo much of a problem hopefully (scummvm on android had to deal with similar things and it works pretty alright most of the time)

Re: Porting to Android via Java

Posted: Fri Dec 24, 2010 5:49 am
by sgordon777
>> You need exult.flx in the Exult folder. You could probably
>> just take the one from Exult's data directory of whatever OS you normally use.


Can you please tell where is the data director under Android?

Thanks

Re: Porting to Android via Java

Posted: Fri Dec 24, 2010 6:07 am
by sgordon777
Forget it, I had an old exult.flx.

Nice work.

Re: Porting to Android via Java

Posted: Fri Dec 24, 2010 8:31 pm
by drcode
Thanks. The next snapshot will print errors instead of just crashing.:-)

Re: Porting to Android via Java

Posted: Tue Dec 28, 2010 8:28 pm
by drcode
The current snapshot has the opening scene working. Made me realize that the next thing to work on is save/restore.

Re: Porting to Android via Java

Posted: Wed Dec 29, 2010 1:07 am
by Ed
running splendidly, even the little forge of virtue earthquake business

is there an inventory/picking things up implemented yet? tried to pick up the key, can move it around but cant seem to 'get' it. if thats not in yet then disregard that as a bug haha

Re: Porting to Android via Java

Posted: Thu Dec 30, 2010 3:16 am
by drcode
You can't drop it directly on something, but you should be able to drag it into a bag or the inventory screen. That's one of the (many) things I've overlooked.

Funny, but the earthquake doesn't show in my emulator. Only a few pixels at the edge of the screen move.

Re: Porting to Android via Java

Posted: Thu Dec 30, 2010 12:53 pm
by Ed
you know since I mentioned it I went back and tried it again. this time it didnt do the earthquake at all. i mean it still 'happened,' everyone still danced around, but no vibration effect on the screen, not even at the edges.

I'm not overclocked this time though so I wonder if its a refresh rate/performance issue

Re: Porting to Android via Java

Posted: Thu Dec 30, 2010 12:58 pm
by Ed
just tried it again and got the couple pixels around the edges version that you mentioned, weird

also, and i guess this is more a further down the road option, but without a graceful exit from the app, if you leave and come back in it comes back in a weird state of confusion (Iolo starts his opening schtick even tho you're already there, etc). just thought id mention haha

Re: Porting to Android via Java

Posted: Thu Dec 30, 2010 5:59 pm
by drcode
The earthquake needs to be rewritten, but I haven't gotten around to it yet (low priority). It's a thread/race condition. What I'm learning about Android programming is that you can't have the main thread stall doing something that takes more than a second or two. So the screen painting, usecode interpreter, and save/restore run in separate threads.

The next snapshot will have the save/restore screen implemented. Got to see if I can detect when there's no keyboard so I can give default names.

Now I wonder how it would have been to port Exult in C++ using JNI like someone suggested above. Would it just be a single thread taking over the machine?

Re: Porting to Android via Java

Posted: Thu Dec 30, 2010 8:09 pm
by Ed
from what ive read i think yeah it just bruteforces everything thru a single thread which probably isnt great for performance? i cant imagine itd work well for something like this once scheduling etc is implemented

but i will openly admit my java background is...well i dont know if 'terrible' is the right word but its certainly not good haha

Re: Porting to Android via Java

Posted: Fri Dec 31, 2010 1:46 am
by drcode
New snapshot: Main feature is save/restore. Press 's' to bring up the screen.

Re: Porting to Android via Java

Posted: Fri Dec 31, 2010 1:54 am
by drcode
Oops, 3 things:

1. If it crashes right away, try removing the contents of the 'gamedat' directory and try again.
2. The opening scene is turned off in this version.
3. It doesn't restore games from the main Exult yet, but I hope it eventually will.

Re: Porting to Android via Java

Posted: Sat Jan 01, 2011 1:01 am
by drcode
Another: First scene starts again. And music works if you put the .ogg music files in /sdcard/Games/exult/music

Re: Porting to Android via Java

Posted: Sat Jan 01, 2011 9:21 pm
by Andre
I have an generic chinese 2.1 android phone.

The December 28th release works on my phone, but the January 1st "force closes".

What could be the reason?

Re: Porting to Android via Java

Posted: Sat Jan 01, 2011 11:27 pm
by Malignant Manor
Maybe music is forced at the moment. Try adding the ogg files to the path DrCode lists. If that doesn't work, try disabling audio.

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 12:52 am
by drcode
Try removing everything from the 'gamedat' directory.

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 1:19 am
by Andre
It still Force closes even after i deleted all the content of gamedat folder.

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 1:23 am
by Andre
Sorry... I run the older version after I deleted the gamedat dir and it created all the files again. I deleted it and now it works (with music =D )

Thank you, and keep up the good work!

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 2:24 am
by Wizardry Dragon
Its too bad the requirement of App Store availability means an iPhone port is probably a no-go.
-----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 3:29 am
by Dominus
Let's leave the iphone out of this thread... ;)
But yes, iphone on the App store is not a very promising outlook. Same as Scummvm, a version that requires a jailbreak would be welcome ;)
Though personally I'd not use it on an iphone... On an ipad, though, sure would love it....

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 3:36 am
by Wizardry Dragon
If it was on an iPad, I may actually buy one, because it would be pretty awesome. Especially if it supported TFL :P

Actually, speaking on that matter, there wont be/isnt any special accomodations I need to consider for having TFL work on these other platforms such as android, is there?
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 9:12 am
by Dominus
The Android port is a special case, as it is a rewrite and thus will have to have support for mods, patches, new games reimplemented. And later changes to the main branch need to be manually ported back into Android. So there are a lot of possibilities for it to break at times.
An iOS port wouldn't need that much rewrite. For iOS you only need to port current SVN to SDL 1.3 (which could be done through a compatibility header) and to make an xcode project file for it. Then you could probably already make it compile and run on iOS. You wouldn't be able to use it though, since the touch interface needs to be coded in as well ;)

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 4:48 pm
by Darren___
So are you translating ALL of exult into android/java?

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 6:01 pm
by Malignant Manor
I'm guessing not the Exult Studio parts.

Re: Porting to Android via Java

Posted: Sun Jan 02, 2011 8:39 pm
by drcode
Definitely not ExultStudio.:-) But I'd like to get all the rest working, but skipping support for some things. LIke the music might require the .ogg files, where normal Exult supports lots of different options.

And yes, rewriting might be a dumb thing to do, since changes to the mainline will have to brought in by hand.