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
|
|
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 
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 
[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 
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: Thu, 29 December 2022 15:23] by Moderator Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #273180]
|
Thu, 10 February 2011 13:47 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #273249]
|
Thu, 10 February 2011 23:40 
|
|
mgl |
  |
Messages:255
Registered:December 2007 Location: France |
|
|
Omni_graphicalInstallation 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_graphicalWhat 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 Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #273402]
|
Sat, 12 February 2011 01:12 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #273508]
|
Mon, 14 February 2011 00:48 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #273742]
|
Thu, 17 February 2011 00:55 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #289973]
|
Sun, 28 August 2011 14:47 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #290372]
|
Tue, 06 September 2011 01:35 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #290376]
|
Tue, 06 September 2011 13:28 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #290446]
|
Thu, 08 September 2011 03:25 
|
|
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 
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 
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
Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #290877]
|
Tue, 20 September 2011 14:06 
|
|
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
Report message to a moderator
|
Civilian
|
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #290882]
|
Tue, 20 September 2011 17:26 
|
|
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.
Report message to a moderator
|
Civilian
|
|
|
Re: Stracciatella Android Port ALPHA Release[message #290963]
|
Thu, 22 September 2011 01:44 
|
|
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 Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Goto Forum:
Current Time: Fri Mar 21 19:28:40 GMT+2 2025
Total time taken to generate the page: 0.01637 seconds
|