Porting to Android via Java
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Re: Porting to Android via Java
You guys seen the Android SDL port? It's supposed to let you build c/c++ SDL apps pretty quickly:
http://www.anddev.org/sdl_port_for_andr ... t9218.html
I'm poking at it now, but not really sure what I'm doing
http://www.anddev.org/sdl_port_for_andr ... t9218.html
I'm poking at it now, but not really sure what I'm doing
-
- Posts: 246
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
DrCode isnt there an emulator you can run on a PC for dev purposes??
Pretty sure Ive seen this mentioned at some of the android sites I frequent..
Might make things a little easier if youre testing directly on your phone..
Pretty sure Ive seen this mentioned at some of the android sites I frequent..
Might make things a little easier if youre testing directly on your phone..
Morbius Dragon
-==(UDIC)==-
Since 1992!
-==(UDIC)==-
Since 1992!
-
- Site Admin
- Posts: 985
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
DrCode posted earlier that he is only using an emulator. He wants feedback on how fast Exult is on a real device.
My experience with the official emulator was extremely poor speed for navigating the basic menus on a 2.4 ghz P4. I'm not sure how this runs in Wine, but there's a program called YouWave Android designed to run Android apps in Windows that is supposed to be focused on speed. I haven't tried it at all though.
My experience with the official emulator was extremely poor speed for navigating the basic menus on a 2.4 ghz P4. I'm not sure how this runs in Wine, but there's a program called YouWave Android designed to run Android apps in Windows that is supposed to be focused on speed. I haven't tried it at all though.
Re: Porting to Android via Java
I think I read somewhere that the emulator is close to the speed of real devices. I've noticed that it bogs down when receiving simulated events. For example, when I hold the shift key down on my real kbd, the emulator gets a stream of events, and gets really slow, even if I turn off my event handler.
As for doing a native port using SDL, someone could try that, and it might have a better chance of success. I want to get some experience with Java and Android development, plus I've lost contact with Exult's code for a few years; and that's why I'm doing it this way.
As for doing a native port using SDL, someone could try that, and it might have a better chance of success. I want to get some experience with Java and Android development, plus I've lost contact with Exult's code for a few years; and that's why I'm doing it this way.
Re: Porting to Android via Java
Mmm. Look at this. Not sure if it is useful to you:
http://code.google.com/p/libgdx/
http://code.google.com/p/libgdx/
Re: Porting to Android via Java
It's probably a abstraction layer too far.
Re: Porting to Android via Java
ohhhh man imagine my surprise to check back in on this thread after a month of two and see all this activity.
I just got my G1
I just got my G1
Re: Porting to Android via Java
ok dont know why my post submitted itself mid sentence there. ANYWAY.
just got my g1 REPLACED finally, and have a g2 here now, so if you guys need any help testing etc once an APK is thrown together let me know
just got my g1 REPLACED finally, and have a g2 here now, so if you guys need any help testing etc once an APK is thrown together let me know
Re: Porting to Android via Java
I unintentionally checked in the .apk file in our repository, though it hasn't been updated recently. Right now, you can just walk around as the Avatar (and walk through things), and click on items to see what they are. I've started writing the Usecode interpreter, but it will be a week or two before you can do anything useful.
So, yes, I would like to hear how the performance is on a real device. To run it, you'd store the STATIC directory under "/sdcard/Games/exult/blackgate", and it should work from there. But it's not very good at diagnostics yet if anything goes wrong.
So, yes, I would like to hear how the performance is on a real device. To run it, you'd store the STATIC directory under "/sdcard/Games/exult/blackgate", and it should work from there. But it's not very good at diagnostics yet if anything goes wrong.
Re: Porting to Android via Java
Maybe you should remove the apk file, add an ignore on that file (so you don't add it again) and then upload the apk file you'd like feedback on to our snapshot space. You only need to sftp to our sourceforge webspace... We can then either add a direct link on the download page (i can do this once the file is uploaded once) or link to here...
--
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!
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!
Re: Porting to Android via Java
That's what I'll do.
Re: Porting to Android via Java
cool, next time I'm at my home PC i'll copy over my U7 data files to my phone so I'll be ready to give it a whirl when its available
Re: Porting to Android via Java
Another new picture up.
(edit by Dominus, all pictures in the Dropbox gallery as well now http://www.dropbox.com/gallery/7801769/ ... d?h=e27af2)
(edit by Dominus, all pictures in the Dropbox gallery as well now http://www.dropbox.com/gallery/7801769/ ... d?h=e27af2)
-
- Posts: 246
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
I can do the 'low end' Android testing when its ready.
My Backflip only has a 500 something Mhz CPU in it so at least I can see how it will run for the bottom of the barrel folks.
Although Angry Birds runs pretty choppy on here, Im wondering what something as graphically rich as U7 would do...
My Backflip only has a 500 something Mhz CPU in it so at least I can see how it will run for the bottom of the barrel folks.
Although Angry Birds runs pretty choppy on here, Im wondering what something as graphically rich as U7 would do...
Morbius Dragon
-==(UDIC)==-
Since 1992!
-==(UDIC)==-
Since 1992!
Re: Porting to Android via Java
The new androids should be able to run the game pretty well. My galaxy S is a beast. Especially overclocked.
Re: Porting to Android via Java
Finally got this thing running in Eclipse. It runs pretty choppy and keeps crashing on me after a few seconds of map-scrolling, but still very impressive work.
I'm itching to Javafy the code and fix some of those 426 warnings, but its probably best to wait until Dr. Code has finished converting from C.
I'm itching to Javafy the code and fix some of those 426 warnings, but its probably best to wait until Dr. Code has finished converting from C.
Re: Porting to Android via Java
You should be able to walk around (and through things) by holding the shift key and using the left mouse button. I notice that holding the shift key really slows down the emulator, so you can release it while keeping the mouse button down. You can also talk to NPC's now, but that's probably even buggier than scrolling around. I'm going to try to get the opening working where the Avatar appears.
Dom: BTW, how do I upload to the snapshot area?
Dom: BTW, how do I upload to the snapshot area?
Re: Porting to Android via Java
To access the snapshot folder: sftp to web.sourceforge.net
username (your SF accountname AND ,exult): jsf,exult
cd /home/groups/e/ex/exult/htdocs/snapshots
username (your SF accountname AND ,exult): jsf,exult
cd /home/groups/e/ex/exult/htdocs/snapshots
--
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!
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!
Re: Porting to Android via Java
Hmm, I can't walk around. I start off on a black screen off the top left of the map. I can scroll around the map with the arrow keys, making the terrain and objects appear, and click on things, that's pretty much it. Don't see any alive NPCs either. Just a dead monk east of the Empath Abbey cemetery.
Re: Porting to Android via Java
Should start out at the normal place with Iolo and the peasant poised for the opening scene.
Re: Porting to Android via Java
Thanks! It's in the snapshot area as "ExultAndroid.apk".
BTW, I've had little luck profiling. Trying it again tonight, it shows the most time spent reading in the item names and creating about 1300 name strings. Seems unlikely considering all the work that goes on painting and reading in objects (and sorting them).
BTW, I've had little luck profiling. Trying it again tonight, it shows the most time spent reading in the item names and creating about 1300 name strings. Seems unlikely considering all the work that goes on painting and reading in objects (and sorting them).
-
- Site Admin
- Posts: 985
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
added the link to our download page. Also added that this is not tied to the normal changelog.
--
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!
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!
Re: Porting to Android via Java
Strange. I always find myself "avatarless" at the top left (or bottom left) of the map with a black screen, as if some initial repaint isn't happening. Only after scrolling around does the sea start to appear. I tried scrolling to Trinsic to see if the Avatar is there, but Exult always crashes before I can reach it.
I wonder, can it have something to do with the game files? I basically copied the patch, static and gamedat directory and the files from the root ultima directory that seemed important (all the files except TEMP... and SAVE...).
The only thing I changed in the code is change the base dir to "/sdcard/games/Ultima7"
I wonder, can it have something to do with the game files? I basically copied the patch, static and gamedat directory and the files from the root ultima directory that seemed important (all the files except TEMP... and SAVE...).
The only thing I changed in the code is change the base dir to "/sdcard/games/Ultima7"
Re: Porting to Android via Java
Try it without the patch and gamedat directories. It will create gamedat using the initgame file in static. While I've been including code that accesses patch files, I haven't tried it at all, and there are lots of sections that I haven't included yet since I still consider this 'experimental' (or 'educational').
Also, you can see messages from the program in the 'logcat' view in the emulator, although I don't know where you could see them on an actual device.
Also, you can see messages from the program in the 'logcat' view in the emulator, although I don't know where you could see them on an actual device.
Re: Porting to Android via Java
That did the trick, thanks. I'm starting in Trinsic now and can talk to the few NPCs present. I can't walk around with the shift key however.
Re: Porting to Android via Java
You have to put the emulator in raw keyboard mode. There's a startup switch, '-raw-keys', or you can toggle it with ctrl-k.
I may change this, because holding a key down makes the emulator much slower. However, you can release the shift key after the Avatar is moving and continue just dragging with the mouse. Seems like there should be a better way, but I don't have a real phone to experiment with yet.
I may change this, because holding a key down makes the emulator much slower. However, you can release the shift key after the Avatar is moving and continue just dragging with the mouse. Seems like there should be a better way, but I don't have a real phone to experiment with yet.
Re: Porting to Android via Java
Jeff, could you maintain a changelog and when you update the snapshot, could you add this as "androidchangelog" or so?
--
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!
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!
Re: Porting to Android via Java
finally got back around and could try this out..it's crashing immediately after opening on my G2, using the APK that was previously posted. I've got the files sitting in /sdcard/Games/exult/blackgate as mentioned wayyy back, has the location for this changed? after launching it shows the Exult title bar with a blackscreen for about two seconds then force closes
Re: Porting to Android via Java
OH wait, just got it. deleted the GAMEDAT folder and it launches now
Re: Porting to Android via Java
trip report: doesnt run much slower than it's supposed to, far as I can tell (g2 clocked at 1.4ghz). avatar doesnt seem to run faster if you click towards the edge though, not sure if thats implemented. talked to iolo, got him to 'join,' wandered around trinsic without any crashes. nobody moves around and theres no 'interiors' but I'm guessing thats all just not in there yet.
all in all looks like a pretty solid start. holding shift and clicking to walk is odd, maybe not holding shift to walk and holding shift when clicking things to use/talk would be more intuitive/less work?
all in all looks like a pretty solid start. holding shift and clicking to walk is odd, maybe not holding shift to walk and holding shift when clicking things to use/talk would be more intuitive/less work?
Re: Porting to Android via Java
Thanks for the report. And yes, lots not implemented:
1. Schedules - nobody moves
2. Pathfinding
3. Different walking speeds
4. Pretty sure there are bugs in the conversations.
5. Containers.
6. Combat.
7. Eggs.
8. Audio.
9. Dragging things.
10. Save/restore.
But recently (last few days) added:
1. 'Blocking' - can no longer walk through things, but you can walk up stairs.
2. Roofs disappear when you walk inside.
3. Companions will walk around with you (but only if you stay close).
4. Books/scrolls display.
I think I'll take your advice on the mouse use.
1. Schedules - nobody moves
2. Pathfinding
3. Different walking speeds
4. Pretty sure there are bugs in the conversations.
5. Containers.
6. Combat.
7. Eggs.
8. Audio.
9. Dragging things.
10. Save/restore.
But recently (last few days) added:
1. 'Blocking' - can no longer walk through things, but you can walk up stairs.
2. Roofs disappear when you walk inside.
3. Companions will walk around with you (but only if you stay close).
4. Books/scrolls display.
I think I'll take your advice on the mouse use.
Re: Porting to Android via Java
cool, glad to help. the only hangup i could think of with the non-shift click to move would be picking things up and moving them, but i guess a quarter-second 'long touch' on an item to pick it up would do the trick (or holding some other key?)
other than that list i guess also just an icon =D looking forward to future updates (like, super excitedly)
other than that list i guess also just an icon =D looking forward to future updates (like, super excitedly)
Re: Porting to Android via Java
Looks good so far. Runs great on my Droid 2 Global though I do agree with Ed about the walking mechanics (no shift to walk, shift to click on items/talk).
Definitely looking forward to playing it through on my phone
Definitely looking forward to playing it through on my phone
Re: Porting to Android via Java
Neat. After some fiddling with files, I got it to work. I have a very modern android, which unfortunately lacks the key interface. I'm amused how I can use my 'laser scroll wheel' to move my view around the game map and double-click doors and lamps despite the avatar being stuck at the intro area.
Let me know if you're interested in some collaboration on the android api / java side. I'd love this excuse to learn the android API, and I'm pretty smooth with java.
D.
Let me know if you're interested in some collaboration on the android api / java side. I'd love this excuse to learn the android API, and I'm pretty smooth with java.
D.
Re: Porting to Android via Java
There are Androids without keyboards? Uh oh.
The interface is going to be a challenge. For example, sometimes U7 pauses so you can click on something, like when you're using food. But there's no mouse cursor, so I'm thinking about how to let the user know this. Maybe we should show the 'click-on-an-item' cursor on the screen, have it move around with a light touch, and have it activate on a double click.
Perhaps that's also how the Avatar can move. We show one of the arrow buttons; you drag it around; and then double-click or press it harder (if all Androids can detect that) to control the Avatar.
The interface is going to be a challenge. For example, sometimes U7 pauses so you can click on something, like when you're using food. But there's no mouse cursor, so I'm thinking about how to let the user know this. Maybe we should show the 'click-on-an-item' cursor on the screen, have it move around with a light touch, and have it activate on a double click.
Perhaps that's also how the Avatar can move. We show one of the arrow buttons; you drag it around; and then double-click or press it harder (if all Androids can detect that) to control the Avatar.
Re: Porting to Android via Java
Most of the higher end andiods do not have keyboards. I assume that trend will continue.
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
Its easier to produce touchscreen phones than it is to produce ones with keyboards, and with current pricing schemes companies can charge more for touchscreen phones, so I imagine we'll be seeing more rather than less of them. Have an iPhone myself, so I wouldnt mind seeing an iPhone version. You could probably manage an onscreen keyboard for game particulars on an iPad version.
Many "mobile" games have touchscreen arrow controls for NSEW. A tap or double tap could be a click or double click. It would be a little awkward, but it could work. Not sure how to replicate a right click though. Maybe tap-and-hold? That would be awkward though.
---------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
Many "mobile" games have touchscreen arrow controls for NSEW. A tap or double tap could be a click or double click. It would be a little awkward, but it could work. Not sure how to replicate a right click though. Maybe tap-and-hold? That would be awkward though.
---------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Porting to Android via Java
Thanks for the info. I'm still in the dark ages when it comes to phones.
I'm thinking there should always be a cursor drawn on the screen, normally one of the green arrows. To move the Avatar, you drag or hold down the arrow, and his speed depends on the distance to the arrow, just like in the original game. Then if you click or double-click anywhere else, you can activate objects or drag them.
Or maybe clicking on an empty spot toggles the 'move' arrow...
I'm thinking there should always be a cursor drawn on the screen, normally one of the green arrows. To move the Avatar, you drag or hold down the arrow, and his speed depends on the distance to the arrow, just like in the original game. Then if you click or double-click anywhere else, you can activate objects or drag them.
Or maybe clicking on an empty spot toggles the 'move' arrow...
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
You could make it so that if you tap and hold on the avatar, that would enable move mode, and then they would move towards where you dragged your finger, at a speed determined by how far the avatar is from your finger. That would seem the most intuitive movement interface for phones, though it may be difficult to program.
You could also maybe tap on the avatar and tap on a location to enable the pathfinding mode, or tap on the avatar and then an enemy, to enable combat AI to fight them.
--------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
You could also maybe tap on the avatar and tap on a location to enable the pathfinding mode, or tap on the avatar and then an enemy, to enable combat AI to fight them.
--------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 246
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
One thing to keep in mind...
Some lower end Android phones (like mine) dont have multi-touch capability so you are only allowed to tap one point on the screen at a time. Could make it difficult for some...
Makes playing NES and SNES roms a pain in the butt hehe.
Luckily I do have a physical keyboard on mine though..
Some lower end Android phones (like mine) dont have multi-touch capability so you are only allowed to tap one point on the screen at a time. Could make it difficult for some...
Makes playing NES and SNES roms a pain in the butt hehe.
Luckily I do have a physical keyboard on mine though..
Morbius Dragon
-==(UDIC)==-
Since 1992!
-==(UDIC)==-
Since 1992!
Re: Porting to Android via Java
i think (after removing the shift) that the current touch to move works pretty well, if touching closer to the edge of the phone can make you move faster ala the original
as for keyboard v not keyboard, there arent a whole lot of keys necessary to play, other than the moving/clicking. maybe 4 onscreen transparent buttons in the corners or at the bottom or something for keyring, feed, map, and inventory? i realize there are more shortcuts in the game but those are all i can think of that are used regularly, and in the case of stats etc that can all be accessed from the paperdoll after hitting the inventory button
a few buttons onscreen isnt too intrusive, and keyboarded phones can just press their keys i guess! maybe with an option to turn off the onscreen versions if you dont need them in that case (similar to most of the emulators on the market)
as for keyboard v not keyboard, there arent a whole lot of keys necessary to play, other than the moving/clicking. maybe 4 onscreen transparent buttons in the corners or at the bottom or something for keyring, feed, map, and inventory? i realize there are more shortcuts in the game but those are all i can think of that are used regularly, and in the case of stats etc that can all be accessed from the paperdoll after hitting the inventory button
a few buttons onscreen isnt too intrusive, and keyboarded phones can just press their keys i guess! maybe with an option to turn off the onscreen versions if you dont need them in that case (similar to most of the emulators on the market)
Re: Porting to Android via Java
Maybe I'll experiment this weekend. I like Wizardry's idea, because sometimes you want to click on an item to identify it without having the Avatar move towards it.
Re: Porting to Android via Java
I personally dislike the tilting of the phone movement. I can only speak of the iPhone, though...
I think a steering overlay for the thumb would be nice, with it using the arrow keys function and when you keep on a direction you get faster (the overlay should be placeable on each side).
So movement (not counting the double-click-pathfind-to-this-spot) would only be through this and the green arrow (or maybe use the crosshair instead) is for interacting.
An example could be this fromt he Dungeon Hunter game for the iphone. Along with an icon or two for turning on combat for example...
I think a steering overlay for the thumb would be nice, with it using the arrow keys function and when you keep on a direction you get faster (the overlay should be placeable on each side).
So movement (not counting the double-click-pathfind-to-this-spot) would only be through this and the green arrow (or maybe use the crosshair instead) is for interacting.
An example could be this fromt he Dungeon Hunter game for the iphone. Along with an icon or two for turning on combat for example...
--
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!
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!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
Hate how those interfaces take up almost literally half the display area, though. Having the interface as close to the original as possible (which is to say no gui unless you start needing it) is preferable to me. Ultimately up to whoevers programming it though, I suppose
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Porting to Android via Java
yes, needs evaluation on to what works best. People actually testing/using it need to speak up 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!
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!
Re: Porting to Android via Java
Wow! If that's what a modern phone game looks like, isn't Ultima7 going to look fairly dated?:-)
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Porting to Android via Java
Or if we're really masochistic we can program both interfaces and let someone choose
And yes and no - some games are all graphics intensive like that, others are pixel games and tetris clones, so theres a fair diversity out there.
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands,ca
And yes and no - some games are all graphics intensive like that, others are pixel games and tetris clones, so theres a fair diversity out there.
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands,ca
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca