Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » Jagged Alliance 2 Android Stracciatella Port RC2 Release - please test
Jagged Alliance 2 Android Stracciatella Port RC2 Release - please test[message #273148] Thu, 10 February 2011 05:07 Go to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Hi there!

I've taken a shot at compiling JA2 Stracciatella for Android, and today I can announce the first success in doing so.
It took quite some work to get the source compatible with google's NDK and it still needs some work, but since I dont know how much time I can put into this, I thought I'd throw out a little alpha release for you to test and try out.

NO WARRANTY

BECAUSE THE PATCH/PROGRAMM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PATCH/PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PATCH/PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PATCH/PROGRAM IS WITH YOU. SHOULD THE
PATCH/PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.



Download:


(04.05.2016) Binary RC2 version APK (new mirror)
copy.com shut down as well angry
http://www.mediafire.com/download/4kqtbun1a82263e/ja2android_rc2.apk
http://www.mediafire.com/download/pylubb2hfh6d049/ja2android_rc2_patch.tar.bz2

(02. June 2014) Binary RC2 version APK (mirror)
Since UbuntuONE is sadly shutting down, here is an alternative download location:
<a href="https://copy.com/Wz1EHFA62HPN]https://copy.com/Wz1EHFA62HPN</a> (2.1 MB)
SourcePatch for RC2 https://copy.com/UOjZjhDpGZlC (0.043 MB)
Don't know if the cloudhoster I now use is good, but better than nothing - anyone able to provide a better hosting please contact me! --omni

(22. Sept 2011) Binary RC2 version APK http://ubuntuone.com/1UG3dutJ7cdsRKemMlGQWe (2.1 MB)
SourcePatch for RC2 http://ubuntuone.com/7ljZwlaNDu2WsC1WUk6vuQ (0.043 MB)

(29. Sept 2011) Binary RC2 ARMv5 multiABI DEBUG build http://ubuntuone.com/09ejI9Jc4xQVj6yVmzfMub (2.4 MB)
(29. Sept 2011) Binary RC2 ARMv6 multiABI DEBUG build http://ubuntuone.com/0WQebOQX2ei2etw60waKmp (2.3 MB)
[spoiler:OLDER VERSIONS]
Binary alpha version APK http://ubuntuone.com/p/cTi/ (7 MB)
Binary BETA1 version APK http://ubuntuone.com/p/1Efi/ (1.7 MB)
(06. Sept. 2011) Binary BETA2 version APK http://ubuntuone.com/p/1GPy/ (1.7 MB
(07. Sept. 2011) Binary BETA3 multi ABI support Version http://ubuntuone.com/p/1GoK/ (1.9 MB)
(08. Sept. 2011) Binary BETA6 version APK http://ubuntuone.com/p/1Gq4/ (1.7 MB)
SourcePatch http://ubuntuone.com/p/cTh/ (0.025 MB) Instructions for building included.

(19. Sept. 2011) Binary RC1 version APK http://ubuntuone.com/6XLtaKbmtHnPKPmELd3JNo (2.1 MB)
RC1 Source Patch: http://ubuntuone.com/37wZoH9jSTe37Dc7OnHDyn (0.039 MB)
[/spoiler]


Hey! Since this port has gotten some attention by people who do not own/havelost the original Jagged Alliance 2 game. PLEASE: purchase a legal copy, its a great game and well worth the price. You can either look for boxed versions in the web, or if you can't find any, go to gog.com. They have a DRM-free version of JA2 for about 10$ (though I can't test if their version is 100% compatible, I can't imagine a reason why it shouldn't). I'm not affiliated with any online vendor, I just want to point out that you can still legally buy this game for a few, well invested, bucks.

<font size="">Installation notes:[/size]
- install apk
- place JA2 Data folder in /sdcard/app-data/com.opensourced.ja2/
you need all files to be lowercase! But the folder should be named 'Data' with capital D[/edit]
- run application
- set up controls in pelyaSDL (you can either use trackpad-mode(laptop) or touchpad-mode(direct) for your mouse cursor)
- play!

What works so far:
- almost everything Smile

[spoiler:KNOWN ISSUES]What is still broken:
- speed. It has something to do with event polling I think and not with the general speed of android. I've seen JA2 fluently on N900 and OpenMoko with slower CPU's
should work as of beta06! Occasional lag is caused by music buffer
- 40% of the texts displayed are broken, because google's gcc defaults to 16Bit for wchar_t, whereas 32Bit should be standard. UPDATE: using CrystaX NDK wchar_t is handled correctly, but there is still an error with font encoding.
- saving. This is related to the textbug, once that is fixed saves should be too
works in beta!
- about 2% of the texts displayed are broken. Please report gameplay issues related to that!
- localised versions broke (de,pl,fr,ru,etc.) while repairing the texts, sorry.
- scrolling in tactical has minor graphic bugs
fixed in RC2
- loading a new music file causes a small 1-4seconds lag. WORKAROUND: disable music by renaming your music.slf file to something like 'music.slf.off' -> no music, but no lags
- merc names are sometimes stripped to first letter only, should reload correctly after switching from
tactical to strategic and back.
- AP not reset correctly after resume. This might occur from time to time - to fix this: save game, load it back and end turn. Your APs should regenerate correctly after that.
- Using the flower service is a bit tricky. If you select a city as delivery location the costs will explode to 30000$ or more. If this occurs then click on one of the checkbox-options to set it back to the normal price. If you click send with the ultra high price, you will have to pay for it (it will even set you balance to a negative value). (If of interest: this is related to actually parsing wide character strings back to integers inside the application. The JA2 sourcecode is the weirdest chimera of code styles I've come across yet.)
- I don't know if it is a Stracciatella problem or related to the android port, but sometimes NPC like civilians or militia are not added correctly to the current tactical screen. They are simply not present. If that happens you have to re-enter the sector again to fix it, saving and loading does not help.
- Bobby Ray's does work, but it does not show the costs when selecting items. Yet costs are displayed when looking at order form. Annoying but not severe.
[/spoiler]

Please report any bugs/issues here! And I would be happy to hear from anyone who manages to finish the game on his device Smile

Oh and: it *should* be playable (apart from the speed issue) on devices with less that 640x480 pixels, because pelyaSDL scales it down. For devices with very small screens an on-screen magnifier is included.

[Updated on: Wed, 04 May 2016 21:28]

Re: Stracciatella Android Port ALPHA Release[message #273155] Thu, 10 February 2011 06:33 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
Nicely done OG!

Unfortunately my only android device is a chipad, I'm not sure how playable it'll be on a tablet.

Any chance you'd consider porting Strac to Angstrom Linux?

I've got a Pandora UMPC that's dying to have JA2 running on it.. hehehe Smile

I'm sure other Pandora users would play it too.
Re: Stracciatella Android Port ALPHA Release[message #273180] Thu, 10 February 2011 13:47 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Compiling for Pandora should be straight forward - if there exists a libSDL-Port. The ARM specific changes are included in my patch.
I dont have a Pandora, so I cant try it.


If you have time, could you try it on your tablet? It would be interesting to know on what devices the port runs. Theoretically even the 80$ Android pads should be able to run JA2, since it only requires a 233Mhz CPU. But further investigation is required here.
(And a fix for the speed issue in general.)
[/edit]

[Updated on: Thu, 10 February 2011 14:43] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273249] Thu, 10 February 2011 23:40 Go to previous messageGo to next message
mgl

 
Messages:255
Registered:December 2007
Location: France
Omni_graphical
Installation notes:
[...]
you need all files to be lowercase! But the folder should be named 'Data' with capital D

"data" should be in lower case too in the original stracciatella.


Omni_graphical
What is still broken:
[...]
- 40% of the texts displayed are broken, because google's gcc defaults to 16Bit for wchar_t, whereas 32Bit should be standard.

There are preprocessor directives about the size of wchar_t in stracciatella, especially in the load/save functions. If I remember well, the code reads/writes 16 bits for a wchar_t if "_WIN32" is defined, and 32 bits otherwise. See the file "Build/SaveLoadGame.cc", or search text like INJ_WCSTR16, EXTR_WCSTR16, INJ_WCSTR32, EXTR_WCSTR32.

[Updated on: Thu, 10 February 2011 23:49] by Moderator


Re: Stracciatella Android Port ALPHA Release[message #273259] Fri, 11 February 2011 00:20 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
mgl

There are preprocessor directives about the size of wchar_t in stracciatella, especially in the load/save functions. If I remember well, the code reads/writes 16 bits for a wchar_t if "_WIN32" is defined, and 32 bits otherwise. See the file "Build/SaveLoadGame.cc", or search text like INJ_WCSTR16, EXTR_WCSTR16, INJ_WCSTR32, EXTR_WCSTR32.


Now thats the kind of information I hoped to get here in this forum Smile
Thanks! I will investigate this and try it out.
Re: Stracciatella Android Port ALPHA Release[message #273267] Fri, 11 February 2011 01:00 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
Omni_graphical
Compiling for Pandora should be straight forward - if there exists a libSDL-Port. The ARM specific changes are included in my patch.
I dont have a Pandora, so I cant try it.


If you have time, could you try it on your tablet? It would be interesting to know on what devices the port runs. Theoretically even the 80$ Android pads should be able to run JA2, since it only requires a 233Mhz CPU. But further investigation is required here.
(And a fix for the speed issue in general.)
[/edit]


Sure, there is libSDL for Pandora, kindly ported by notaz. I can help with testing if you like Smile DJWillis has written an excellent guide on cross-compiling for Pandora here.

OK I will give it a go on my tablet, specs are:

ARM11 (ARMv6)
600 MHz Samsung S3C6410
Android 1.6
128MB RAM

Will report back later cheers Smile

Edit:

The tablet no longer boots! *sighs* See if I can fix this chipad...

[Updated on: Fri, 11 February 2011 09:46] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273324] Fri, 11 February 2011 15:33 Go to previous messageGo to next message
IronArthur

 
Messages:17
Registered:July 2004
Location: EU
I

[Updated on: Fri, 11 February 2011 15:45] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273335] Fri, 11 February 2011 16:43 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Quote:

Edit: i have to put all files under Data folder on lowercase??


Yes, you have to put them in the path /sdcard/app-data/com.opensourced.ja2/Data

like: /sdcard/app-data/com.opensourced.ja2/Data/faces.slf

And I just noticed, that you can name the data folder "Data" or "data" it does not change anything.

Could you please post the output of your logcat here? I included many debug messages in my port, so if an error occurred it should show there.

If you dont know how to get to your logcat, you can for example install the app CatLog from the market. All debug messages are tagged with "==TEST==" and should show up there.

Thanks for trying!

Re: Stracciatella Android Port ALPHA Release[message #273366] Fri, 11 February 2011 21:33 Go to previous messageGo to next message
IronArthur

 
Messages:17
Registered:July 2004
Location: EU
Omni_graphical
Quote:

Edit: i have to put all files under Data folder on lowercase??


Yes, you have to put them in the path /sdcard/app-data/com.opensourced.ja2/Data

like: /sdcard/app-data/com.opensourced.ja2/Data/faces.slf

And I just noticed, that you can name the data folder "Data" or "data" it does not change anything.

Could you please post the output of your logcat here? I included many debug messages in my port, so if an error occurred it should show there.

If you dont know how to get to your logcat, you can for example install the app CatLog from the market. All debug messages are tagged with "==TEST==" and should show up there.

Thanks for trying!



This is my logcat: http://dl.dropbox.com/u/7960027/Ja-android.txt
Maybe is a problem with my phone and libsdl, i get the same results in exult port.

I think i
Re: Stracciatella Android Port ALPHA Release[message #273402] Sat, 12 February 2011 01:12 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
This:

02-11 20:15:40.444 I/==TEST==(2209): RUNTIME ERROR: Failed to start file search, pattern:  
/sdcard/app-data/com.opensourced.ja2/data/tilecache/*.jsd


Seems to be the line which fails. Did you put the tilecache folder on your phone too?
just noticed you have it in the list[/edit]

And, if the other SDLports fail on your phone too, a full logcat would be nice. You can try many ports made by lubomyr here: http://anddev.at.ua
The apps ask for online-permission because they download gamedata from the net.

When there is a problem with pelya's libSDL generally on your phone, we need to track it down and then pelya can fix it in the sources.

[Updated on: Sat, 12 February 2011 01:19] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273425] Sat, 12 February 2011 14:03 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
Hey OG,

I got my tablet up and running again, installed Android SDK and used adb to install JA2 and logcat.

When running JA2 the SDL config wizard works fine, but after that it quits out.

http://pastebin.com/U4R7YgWf
Re: Stracciatella Android Port ALPHA Release[message #273430] Sat, 12 February 2011 18:26 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
quartercast
Hey OG,

I got my tablet up and running again, installed Android SDK and used adb to install JA2 and logcat.

When running JA2 the SDL config wizard works fine, but after that it quits out.

http://pastebin.com/U4R7YgWf


Ahh, it bails out with a SIGILL. This is probably related to the fact that you are running android1.6.
But I might get that fixed by building with multiple ABI bindings.
I'm preparing a fresh build in the next hours, it would be nice if you could try again then.
If you have time you could try some of lubomyr's ports at http://anddev.at.ua/ and see if they work for you - lubomyr should have built them with 1.6 support.
Re: Stracciatella Android Port ALPHA Release[message #273454] Sat, 12 February 2011 22:15 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
No problem I'm happy to do some further testing.

I tried out the breakout clone on the URL you posted, seems to run pretty well for the few seconds I played.

http://pastebin.com/1P2qMZvm
Re: Stracciatella Android Port ALPHA Release[message #273508] Mon, 14 February 2011 00:48 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Status update:

Sorry that I havent supplied a new build yet, it has been a busy weekend.

I've been investigating several things concerning the android port:

1. wchar_t issue
There are many odd features related to the wchar_t in Ja2 and not only affecting the savegames but also some other things inside the game. But I the CrystaX toolchain claims to have wchar_t 32bit compatibility and I will try to build the port with it. (I've been using ndk5b before)

2. speed issue
This is an odd fellow. Pelya's SDL implementation is very picky about surface blitting, it only performs good, when blitting bpp-compatible surfaces together. But this is not always the case in Ja2.
So I changed some blitters to correct SDL surfaces, and got a small speed boost. But still only 2FPS.
I took a look at the surface blitting functions in Ja2 itself, they seem to add compatibility for 8bpp->16bpp blitting. Somewhere in those functions is a directive that slows the game down extremely. I managed to get the main menu to perform good by commenting out the RestoreButtonBackGrounds(); method. So I thought I had tracked the evil blitting method down to its root, but deactivating the BlitBufferToBuffer(); method did not bring a speed increase to the other screens. So I'm tracing every method call down to find out where the evil "slowdown-gremlin" is hiding.
Of course this is quite time consuming and dull, which is the reason why I havent supplied a new build yet.

Please stay tuned, I hope to bring you a new build as soon as possible.

[UPDATE]
So whats the big deal about this wchar issue?

Well, google's ndkr5b has set the size of wchar_t to 16bit. But it does not contain proper wc()-functions to deal with them. All in all, wchar_t is broken currently in ndkr5b.
CrystaX has set the size of wchar_t to 32 - which is fine, but the crystax toolchain does not include any wc()-functions too.
(However the CrystaX toolchain should fix the problem with devices running 2.1 and 1.6 with SDL)

Furthermore:
The speed issue is a little jerky too, it occurs in the uttermost unlikely place around the code, but I think I could narrow it down to the button rendering. The button rendering itself is partly broken because of the wchar_t issue.

So here's what is to be done:
Port Ja2Stracc to not use the standard wchar_t, but a custom implementaion of wchar_t with 32bit size.

This is more of a Sisyphus work than actuall coding, because all methods connected to wchar_t and wc()-functions need to be adapted too.
However: since I'm probably the one who wants to play Ja2 in the subway most, I need to do this. But it might take a few more hours of work. Luckily I could get hold of an old wchar_t substitute implementation by some swedish guy, which I hope will work out fine with Ja2.
Keep your fingers crossed and stay tuned X-)

[Updated on: Mon, 14 February 2011 07:05] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273543] Mon, 14 February 2011 10:04 Go to previous messageGo to next message
IronArthur

 
Messages:17
Registered:July 2004
Location: EU
Thanks for your work Omni, i will be more than happy to play ja2 on my phone Smile

Is there something you want to test on my phone just tell me.

Btw, i

[Updated on: Mon, 14 February 2011 10:04] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273556] Mon, 14 February 2011 13:28 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
Ditto, great work OG. Can't wait to try out JA2 on my tablet Smile

Cheers
Re: Stracciatella Android Port ALPHA Release[message #273725] Wed, 16 February 2011 23:32 Go to previous messageGo to next message
Helios

 
Messages:26
Registered:April 2010

This is a big f** deal... quite a big f* deal.

Omni can I load it without loadscreens.slf speech.slf npc_speech and music ?

Most of my apps are on the sd card now since I've upgraded to 2.2

Re: Stracciatella Android Port ALPHA Release[message #273742] Thu, 17 February 2011 00:55 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Quote:

This is a big f** deal... quite a big f* deal.

And its the hardest port I've ever done.
Still working on getting the w_char functions ported (really time consuming), but I'm on it!


Quote:
Omni can I load it without loadscreens.slf speech.slf npc_speech and music ?

Umm, thats a good question. It would sure be nice, if it would require less space when one does not need sound+music. Although I find the thought amusing to hear Grizzly's voice yell "Fightin' time!" at 07:00 in the subway X-)
If some of the people here who have more knowledge of the deeper workings of the stracciatella code could give a hint, I'd be very grateful. Otherwise I will look into it myself after the w_char issue is solved.

I also plan to provide builds for the other languages (yes, it has the be a designated build for every localisation), but I don't have other datafiles than the English gold version here, so I can't test the German, Russian, French, etc. builds. Especially Russian version will need testing, since the w_char implementation I use is untested for non-latin alphabets.

I'll keep you posted.

[edit]
Aaand, I hope to include the drop-all feature from 1.13. I think the gameplay feels much better when enemy soldiers actually drop what they carry. Additional weapons would be nice too...
Porting 1.13 directly would be even better, but there is no SDL version available and after running a diff over it, compared with ja2stracc, there is even more work to be done.

[Updated on: Thu, 17 February 2011 01:01] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #273860] Fri, 18 February 2011 00:09 Go to previous messageGo to next message
mgl

 
Messages:255
Registered:December 2007
Location: France
Omni_graphical
Helios
Omni can I load it without loadscreens.slf speech.slf npc_speech and music ?

Umm, thats a good question. It would sure be nice, if it would require less space when one does not need sound+music. Although I find the thought amusing to hear Grizzly's voice yell "Fightin' time!" at 07:00 in the subway X-)
If some of the people here who have more knowledge of the deeper workings of the stracciatella code could give a hint, I'd be very grateful.

For the loading screens, the game uses a "switch()" statement to find what picture it should load. I think it goes on with a warning message if the picture file is not found in the slf archive. But I don't remember if the absence of the slf file itself is an error which will make the game exit or not. Start in "Build/Loading_Scren.cc" or try to create an empty "loadscreens.slf" file. I think Mythrell disabled them in its 800x600 mod.

I don't know for the speech, but I think it's an error if the slf file is missing. And I don't know what happens if it's a file of 0 bytes.


Omni_graphical
[edit]
Aaand, I hope to include the drop-all feature from 1.13.

It's a set of "#define" in "Build/Tactical/Inventory_Choosing.cc", with names like "DROP_RATE". One for the enemies and another for the militia. The number of allowed mortars per squad is in this file too.

Re: Stracciatella Android Port ALPHA Release[message #273864] Fri, 18 February 2011 01:52 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Quote:
I don't know for the speech, but I think it's an error if the slf file is missing. And I don't know what happens if it's a file of 0 bytes.

The German Vanilla version of JA2 even crashes when a single speech file inside the .slf container is missing. Thats why the german version does not support hitting Pablo instead of giving him money. Weird.
Maybe I can deactivate the sound methods in sgp/SoundMan.cc but that would kill all sound effects, not just speech. --> Later.

Quote:
It's a set of "#define" in "Build/Tactical/Inventory_Choosing.cc", with names like "DROP_RATE". One for the enemies and another for the militia. The number of allowed mortars per squad is in this file too.

Ahh, thanks! I didn't expect it to be that easy! Smile I hope I can include that in the options somewhere so that I dont have to make two builds.

Re: Stracciatella Android Port ALPHA Release[message #274038] Sun, 20 February 2011 23:45 Go to previous messageGo to next message
mgl

 
Messages:255
Registered:December 2007
Location: France
Omni_graphical
2. speed issue

You can have a major slowdown, even on a PC and especially in the tactical screen if you compile the game with the JA2TESTVERSION and JA2BETAVERSION flags on in the "Makefile" file. In the tactical screen, it happens when a new sector is loaded. The frame rate comes back to normal for me when I go to the strategic screen and then back to tactical.

Re: Stracciatella Android Port ALPHA Release[message #274116] Mon, 21 February 2011 18:36 Go to previous messageGo to next message
Helios

 
Messages:26
Registered:April 2010
Omni you can sefly remove music.slf and the speech slf's and then turn them off in the options screen and you will still have weapon and ambient sounds.

I think most pirated rips are about 200 megs since they cut movies, speech and music
Re: Stracciatella Android Port ALPHA Release[message #274124] Mon, 21 February 2011 20:40 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
mgl
You can have a major slowdown, even on a PC and especially in the tactical screen if you compile the game with the JA2TESTVERSION and JA2BETAVERSION flags on in the "Makefile" file. In the tactical screen, it happens when a new sector is loaded. The frame rate comes back to normal for me when I go to the strategic screen and then back to tactical.

Hmm, thats interesting, but not related to the slowdown on android I believe.

Helios
Omni you can sefly remove music.slf and the speech slf's and then turn them off in the options screen and you will still have weapon and ambient sounds.

I think most pirated rips are about 200 megs since they cut movies, speech and music

Sounds good, so everyone who wants to save some SD card space can simply leave those files out.

Almost done with porting to wchar_t, lets hope it compiles when I'm finished...
Re: Stracciatella Android Port ALPHA Release[message #274384] Thu, 24 February 2011 05:10 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Since this is new information, I'll do a doublepost.

So, what happened:
- I switched from google ndk_r5b to CrystaX_r4, which should increase compatibility with <2.2 devices and made wchar_t a 32bit datatype instead of the wrong 16bit.
- I took an old wchar_t implementation and linked it with JA2 (took days to get it right - yet it was simple after I got the hang of it)
- I could dramatically reduce the apk size to less than 2MB currently, which resutls to 3.4MB size of the installed app (previous version was about 11-18MB)- which is quite cool.

Yet still there are *still* severe problems with speed and some text displays are still broken. :-/
So: Ja2 is still unplayable on android.

If someone wants to try the new version - just for compatibility checks with <2.2 devices - let me know and I'll post the .patch and .apk here.
For all others: I will continue to investigate the cause of the slowdown and try my best to get the game going.
Re: Stracciatella Android Port ALPHA Release[message #274399] Thu, 24 February 2011 09:57 Go to previous messageGo to next message
IronArthur

 
Messages:17
Registered:July 2004
Location: EU
I
Re: Stracciatella Android Port ALPHA Release[message #274423] Thu, 24 February 2011 13:08 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
+1 for new alpha release Smile
Re: Stracciatella Android Port ALPHA Release[message #274694] Mon, 28 February 2011 02:48 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Just a quick spark of life from me.
There was/is a lot going on in my life unrelated to this project, so I haven't found the time to post an update yet. But I'm still on it, still there and hopefully soon back with a fresh release.
Re: Stracciatella Android Port ALPHA Release[message #281882] Thu, 02 June 2011 00:31 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:635
Registered:July 2005
Location: Canada
Nice to see someone porting our beloved ja2 to Android Very Happy

May I make a small suggestion? I think getting the base game to work nicely before adding extra features is important Wink

Then, once it's working, I can help you merge in a stable version of 1.13.

Cheers,

MM


Re: Stracciatella Android Port ALPHA Release[message #282196] Sat, 04 June 2011 16:07 Go to previous messageGo to next message
quartercast

 
Messages:50
Registered:May 2009
Good luck Omni_graphical! JA2 works great as a handheld game, I finished porting it to Pandora and it's the one game I keep coming back to Smile

@ Madd Mugsy
Any tips on merging 1.13?
Re: Stracciatella Android Port ALPHA Release[message #289973] Sun, 28 August 2011 14:47 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Risen from the dead. (I got a mail with a request for the most current build)

Hey there, I dug up the source from the port again and compiled it with a newer crystax-sdk that properly supports wchar_t. There are still issues but the port now runs smoother and most of the texts are working - some are still broken.
Theoretically saving and loading should work now, so apart from broken texts and a speed issue (related to sdl I believe) this version can be considered BETA.
I uploaded it and placed the link in the first post.

Note: I was lazy last night and forgot to remove the allow-internet permission from the applications manifest file, so the new version of the port requests internet privileges. Sorry, will fix that next time.

[UPDATE]

Okay, I dont get it. Something is either wrong with pelya's SDL port or CrystaX. Maybe even bad coding inside of stracciatella that causes problems with undefined behaviour on ARM/Androids (type safety).
Thing is: many texts work flawlessly, some dont. Debugging reveals that these wchar_t strings simply break apart and point to invalid memory regions - somewhere along the pipeline. But that should not happen, and I can't imagine why it does. Not a clue. I've been coding C++ for over 10 years now, but that kind of spooky voodoo is just to much for me to debug.
Also the speed issue is a problem. If I manage to fix the texts, the game is still ridiculously slow in some areas. Blending is obvoisly a problem (the blending code from ja2 is the most awkward technique i've ever seen. They could not have made it any more complicated, could they?)
So there are two problems that prevent us all from enjoying JA2 on our Androids.

I'm out of ideas.
I need help with this.
A hardcore rewrite of text rendering and/or surface blending is too much work for me currently. (Other projects demand attention too - this is just for my personal happiness)

So: if there is someone out there with C++, Android and Ja2Stracc experience, please contact me if you can and want to help.

[Updated on: Wed, 31 August 2011 01:00] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #290372] Tue, 06 September 2011 01:35 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
I uploaded a new beta build (see first post) compiled with Crystax6_r2 and the freshest pelyaSDL from github. Texts are still 40% broken, speed is still juggly, but maybe some devices now work better. Also more loglines pushed to logcat.

Also new: separate video thread option in pelyaSDL to improve speed on some devices , please try!
You also might improve speed by switching to 4:3 mode on some devices.

(EDIT:) removed the stupid internet access permission request. ja2android now only asks for sdcard read/write and vibrate.

[Updated on: Tue, 06 September 2011 01:37] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #290375] Tue, 06 September 2011 11:16 Go to previous messageGo to next message
IronArthur

 
Messages:17
Registered:July 2004
Location: EU
Sorry, i can
Re: Stracciatella Android Port ALPHA Release[message #290376] Tue, 06 September 2011 13:28 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
@IronArthur:

Don't worry, on my 1Ghz HTC Desire it is slow too. Has something to do with blitting, I think.

The ???-Texts are the textbugs I've been chasing for over six months now.

The mouse is set to relative mouse movement, so it works like a notebooks trackpad. This way moving items in the inventory is much easier. On most capacitive-touchdisplays this is better, only resistive-touchdisplays work well with absolute mouse movement when using a stylus.

But the good thing is that it actually starts on your device - I had some issues with beta1 on many devices.

Thanks for testing.

(UPDATE:) I've got feedback from someone with an Acer Liquid who has confirmed that BETA2 works nearly flawless for him (speed ok, texts ok). I'm investigating...

(UPDATE2:) No progress on above issue, but I uploaded a multi ABI build, which might work better on some devices. On my HTC Desire (stock rom 2.2) it crashes, but hey? Maybe on other devices it runs better?

[Updated on: Wed, 07 September 2011 23:56] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #290446] Thu, 08 September 2011 03:25 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
I think its legitimate to use a new post for this update:
I solved the speed issue. It was, like I thought, related to blitting, and I found a solution.
The game is playable now, apart from the text-display issue.

beta06 download is found in the first post

I was able to do the character creation, hire mercs and clear the first sector of omerta.
One crash occured, but an error.sav was created that I was able to load again (renamed to SaveGame02.sav)
Minor lags are caused by the music buffer - irritating because they feel like a crash but after 1-4 seconds the game resumes. Only option around this would be to deactivate music.
Beware: this app greedily eats up battery Wink

And please still note the disclaimer in the first post - you use this app at your own risk. It works on my phone, but I'm not responsible if your phone has problems with it.

Oh and: please test!
And have fun playing Smile

Sourcecode/Patch will be posted soon, but I need a little break first.

PS: my config is set to
- 4:3 Video, no smoothing, no magnifier
- separate video thread
- laptopmode for mouse (relative movement of cursor)
- physical keys for LMB and RMB
Re: Stracciatella Android Port ALPHA Release[message #290817] Mon, 19 September 2011 04:16 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
I uploaded the current Release Candidate. Game is playable now (at least on my phone). Please test Smile
Re: Stracciatella Android Port ALPHA Release[message #290877] Tue, 20 September 2011 14:06 Go to previous messageGo to next message
dgggg
Messages:2
Registered:September 2011
Hi, thx for porting game. All works fine except bit slow rendering. I looked at sources and commented out some lines in sgp/Video.cc, and now animation and mouse movement in game are more smooth. May be this would be interesting. http://pastebin.com/YS15en5r
Re: Stracciatella Android Port ALPHA Release[message #290878] Tue, 20 September 2011 16:04 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
@jaa: Thanks for the patch. On my phone everything works smoothly, so I did not dig deeper in the video rendering. But I will investigate your suggested changes as soon as I get home and then upload the RC2 Smile
And: did you have any trouble compiling, or was my short manual sufficient? Which device do you use? phone/tablet?

[Updated on: Tue, 20 September 2011 16:06] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #290882] Tue, 20 September 2011 17:26 Go to previous messageGo to next message
dgggg
Messages:2
Registered:September 2011
Followed your manual, no problems with compiling. My device is tablet acer a500. In rc1 mouse is choppy and animations bit slow.
Re: Stracciatella Android Port ALPHA Release[message #290963] Thu, 22 September 2011 01:44 Go to previous messageGo to next message
Omnigraphical

 
Messages:87
Registered:February 2011
Released a new RC!

Changes:
- incredible speed improvement due to jaa's cool patch (this is why I LOVE OPEN SOURCE)
- fixed last graphic issues in tactical scrolling (thanks to jaa's patch too!)
- you can now fully deactivate speech and music by renaming the related files. (Or just delete them if you need the space.) This way you can avoid the music-lag-problem.

- on-screen buttons disabled by default except keyboard input. You still might want to configure your input to your needs (laptop-mouse vs. direct-input). If you have problems with direct input, try recalibrating the touchscreen in the configuration menu.
- for unknown reasons I could save a few kilobytes of space in the new RC - I don't know why it worked this time. Pelya's build script has a life of it's own. simply forgot splash screen image... reuploaded new RC2...

Please test and report issues here! If no severe issues are found or patches submitted then I will create a signed stable-release without the debug-logging.

Source-Patch is a little late, but will be uploaded as soon as possible.

[Updated on: Thu, 22 September 2011 02:33] by Moderator

Re: Stracciatella Android Port ALPHA Release[message #290981] Thu, 22 September 2011 09:31 Go to previous messageGo to previous message
IronArthur

 
Messages:17
Registered:July 2004
Location: EU
On my phone Rc2 works really fine (600Mhz 512MB Ram 800x480). I get some strange problems with mouse not moving correctly (direct-input) but maybe is a calibration issue i
Previous Topic: JA2-Stracciatella Continued
Goto Forum:
  


Current Time: Fri Oct 30 20:47:02 EET 2020

Total time taken to generate the page: 0.01122 seconds