VCMI for Android

Get and upload the logs from ā€œcacheā€ directory on your SD card next to where you put ā€œDataā€ folder.
Theyā€™ll tell why itā€™s crashing in case VCMI itself managed to start.

Sounds like SDL incorrectly chooses pixel format. I didnā€™t see any calls to methods described in that bug report in vcmi. Possibly sdl receives some unhandled pixel format from the system here github.com/Fayth/vcmi-android/b ā€¦ java#L1426 (and then it defaults to rgb565). There should be an entry in logcat logs with ā€œpixel format xxxā€ if you want to check it.
(edit ~ actually, thereā€™s one direct pixelformat manipulation in video handler, but I think if that was a problem, it would affect only the videos, not the whole game)

Yay, so itā€™s not only working for me. :wink:

Hm, the language should be based on your data filesā€¦ Itā€™s not in english for me (unless I add WoG).

I probably should have added saving launcher logs to a file, because currently launcher logs can only be retrieved through adb (or shell).

Black screen issue sounds more like some vcmi/SDL initialization problem, but itā€™s hard to say anything without any details. There might be some useful info in client log (in vcmi-data/cache, as SXX noted).

I might try to setup some emulators tomorrow to try to reproduce some problems (I wonder if thereā€™s a way to use cyanogen emulator :wink: ).

If I understand correctly - in android version thereā€™s possibility to enable/disable mods in launcher?

log client empty. 0 byte.
launcher: pixs.ru/showimage/Screenshot_880 ā€¦ 185150.png
and if I click on ā€œmodā€, ā€œcodepageā€, ā€œchange game resolutionā€ - I see ā€œŠ’ ŠæрŠøŠ»Š¾Š¶ŠµŠ½ŠøŠø VCMI ŠæрŠ¾ŠøŠ·Š¾ŃˆŠ»Š° Š¾ŃˆŠøŠ±ŠŗŠ°ā€ Itā€™s mean ā€œIn VCMI application error occurredā€ and launcher close.

OK I guess I hurried a bit too much with all that data.
Unfortunatelly the game crashes in two moments:

  1. Loading saved game.
  2. After battle results.
    These two things makes it unfinishable at this point (unless we pray that allied CPU kills enemy CPU and we will in the meantime drink tea on the grass).
    Thatā€™s for Huawei P9. It creates two vcmi log files so I can clean them, try to load game - which will crash it - and then upload the log if that helps in anything.

On Samsung Galaxy S2+ it reaches the launcher screen but trying to launch the game itself goes something like uh ā€œUnfortunatelly, application VCMI was halted.ā€(?) It creates one log file which I can upload as well if that helps anything.
Well not sure if I can apply here version for 5.0+, I will try the 4.4+ as well and see if that changes anything before more BBQ.

On Samsung Galasy S1 not yet tested, Iā€™m copying files as we speak.

I will check that but still Iā€™m not mad itā€™s in english, I wonā€™t be making war about it :stuck_out_tongue: (maybe even better, because we donā€™t risk that polish-exclusive-letters will do some OMGWTFBBQ situation :D)

BTW is it somehow possible to force VCMI to read from External microSD card instead of Internal Memory? Just asking~ :3

EDIT #1
Samsung Galaxy S1 with VCMI for 4.4+ doesnā€™t go but I think I know why. Cyanogenmod version is 10.2 which equals for 4.3.x so unless I can somehow put 4.4.x version here, this phone is out of question at the moment.

Samsung Galaxy S2+ with VCMI for 4.4+ gives the same result, launcher goes fine, launching VCMI itself, nope.

EDIT #2
Hmm~ I guess I will check the data files as well just in case that maybe I did some mistake in one way or another.

Both of these work correctly for me, so it may help if you can get the logs.

Special characters should work correctly in the current version. :wink:

I donā€™t hardcode the path to anything, but ask system to give me an ā€œexternal storage directoryā€. I think I could force it to use a secondary external storage, but this would probably complicate thingsā€¦ honestly, if I was about to do something more complicated, I would just allow user choose the folder that he wants to useā€¦ but that might be something for later.

I managed to reproduce the problem with black screen on game start (on 5.0 emulator). There was a deadlock in CLogger and the game basically froze on the second log line.
Iā€™ll try to build and upload updated packagesā€¦ possibly later today. With fixed blackscreen, possible launcher crash and saving logs to file in the launcher (so I can actually know what goes wrong in the launcher ;)).

Edit~

Not yet (you can see the detected mods, but this doesnā€™t really work anyway, because currently it only shows mods from config/settings.json, so itā€™s displayed correctly only after you already run the game).

At your service :3
Added it in the attachment log files from the Huawei P9 and Samsung Galaxy S2+.

VCMI nailed Heroes 3 ā€œHDā€ edition, concluded :3
Victory for VCMI!

There is no rush, I was just wondering, for now itā€™s possible for me to reserve enough space on any of those phones without problems.

Yay~! \o/
Oh yeah, I have asked friend to test it as well on Sony Xperia T3 and the result was crash on launcher aka didnā€™t see launcher, just crash.

Also I have checked the data and itā€™s ā€œtoo bigā€, turns out I have accidentally copied some HotA data files, so maybe they made some crash?
I will re-copy files from clean installation, this time probably polish edition~

Kiiro over and out

VCMI_Client_log.txt (10.6 KB)
vcmi_logs.tar (214 KB)

Log in cache is empty
Here logcats for resolution selection crash and black screen

http://rgho.st/6gTFbFjnF

OKAY~!
With the change of data files properly from clean install it goes polish language with special characters being displayed properly so far, which is all good :slight_smile:

Iā€™m yet to check save/load and battles so I will change the post in approaching few minutes~

The screenshot may be a bit blurry because of 800x600 or somethingā€¦I guess?

EDIT #1
Interestingā€¦
The loading game still failsā€¦but not exactlyā€¦
When I a bit quickly tapped the ā€œmiddleā€ button which returns to menu (but doesnā€™t close the application) I thinked ā€œwait, maybe I gave him not enough timeā€. So I press the right button that shows the applications list and resumed the VCMI. Thatā€™s where surprise comes in. The game loaded, I just canā€™t do a thingā€¦but not exactly. If I press on the map blindly and do whole minimize-maximize again, the game will update that info, even tough I still canā€™t do anything in real-time.
All of this was tested on Huawei P9 since the other phones are out of question at the moment.


Added updated version.
github.com/Fayth/vcmi-android/r ā€¦ -debug.apk
github.com/Fayth/vcmi-android/r ā€¦ -debug.apk

  • black screen on game start should be fixed,
  • slightly better error handling in launcher (saving launcher logs + crashes in /cache/VCMI_launcher.log; also hopefully less crashes),
  • added ability to enable/disable the mods and submods

Iā€™m not entirely sure why this crash happened (looks like a problem in android support libs), but I think I mightā€™ve fixed it in todayā€™s version.

@Kiiro
S2 log ā€“ Iā€™m not sure how exactly resource loading works in vcmi, but it looks like it couldnā€™t find some files during init (multiple entries with ā€œFile is not a valid JSON file! At line 1, position 0 error: File is emptyā€).
P9 log ā€“ hard to say what happens, because there are no errors in the logsā€¦ the last line in the client log is ā€œEntering virtual void VCAI::loadGameā€ so I suspect there was some deserialization crash in AI. Was this save created in android version or copied from pc?

Probably. If you have full hd phone then everything is upscaled almost 2x.

Actually, I managed to do this few times (during normal game start, not loading). I have no idea why this happens, but Iā€™d say this is SDL problem. The game gets ā€œstuckā€ on loading screen ā€“ it looks like the whole game initialization succeeded, but the screen doesnā€™t refresh anymore (nothing in logs). Minimizing the game ā€œhelpsā€, because it forces SDL to recreate the screen, but it still doesnā€™t refresh.

Could this happen due to fullscreen enable / disable code being super hacky?
Other than that I donā€™t know much of our SDL code.

I download link2, tried install but ā€œapplication dont instalā€, after I download apk link 1, and game instal. Ok, I run game! Nice. start map and in options i shoose speed max, after i srart move hero game freeze. and sound was us hero move infinity.

Ok, close game, try start other map - canā€™t start.

go to load game and try load save ā€œgolem aplentyā€ game not respond.

try start other map - dont work.


and else, when I go ā€œnew gameā€ buttok ā€œbackā€ dont work for me.


delete config - game run.

ok start arrogance kill unit, win battle and game close

*** and if I visit tavern game close too
VCMI_Server_log.txt (201 KB)
VCMI_Client_log.txt (346 KB)

Hmm well isnā€™t that funny.
New version API 21 doesnā€™t start at all, however API 16 goes fine, but again loading game is that suspected-to-be-SDL-fault quasi-hanging. Starting new game now does the same, quasi-hang which can be step-by-step moved by method of minimize-maximize application.
Thatā€™s for Huawei P9

As for S2+ API 16 - cuz API 21 Iā€™m honestly not sure if itā€™s viable here to try - starts launcher fine, by launching the game itself goes crash with that ā€œUnfortunatelly the application VCMI was halted.ā€ or sometimes complete crash of the launcher.

I have checked the data files, they are 100% certain to be just RoE, AB, SoD and nothing else.

EDIT #1
Ah yes Iā€™ve almost forgot:

  • The save was created by VCMI on the Android, no copying saves from PC involved.
  • I can see the graphics just fine when itā€™s in game, just the screenshot went a bit blurry, but I guess itā€™s not priority for the moment(?) :stuck_out_tongue:

vcmi-api21-20161127-debug.apk - Does not installing. Android 5.0.1

I didnā€™t really have time recently, so only a quick update this timeā€¦

@ Broken api21 package: okaaay, itā€™s broken and this was a problem on my side (actually, thatā€™s due to some broken/undocumented feature of the build system). Hopefully this package is better.

@ Hang during map start/load: I managed to track this one down. It was occurring due to some weird interaction between jni->java communication and SDL events (I think that SDL hook to java was getting broken when client called jni method to start the server; after that, SDL_PollEvents froze the main SDL loop).

(additionally some better logging in launcher)

github.com/Fayth/vcmi-android/r ā€¦ -debug.apk
github.com/Fayth/vcmi-android/r ā€¦ -debug.apk

I havenā€™t checked other problems yetā€¦ I probably wonā€™t be able to do anything for the next few+ days.

Yay new build to test!
I will check it up in a minute and see if something new is happening or not.
Also Iā€™d like to clarify something, I made a mistake with Android version on my S2+ itā€™s not 5.5 but 5.1 sorry for the trouble. Also Iā€™m working on updating it to 6.0 because why not, I hope it will still be viable testing thingie.
I will install new build for now on P9 and check the typical stuffā€¦aaand write back asap.

EDIT #1
Interesting O_O
Installed API 21 edition on Huawei P9, tried loading the game andā€¦it loaded O_O
I know I know, one load may be lucky for device or whatnot (of course I believe in the leading coder that itā€™s not random luck but true skill of fixing! :3).
The remaining thing to check is the fightā€¦now to find something to fight.

EDIT #2
Good news! After the battle it didnā€™t crash either!
Good job mister, itā€™s working better and better :slight_smile:
The intro is still laggy when trying to skip but meh with it, itā€™s just intro.
The walking on the map is choppy as hell but it works at least so Iā€™m not complaining.
The one thing I want to ask is how to do ā€œright-clickā€ here? I want to check sometimes stuff like ā€œwhat does that magical spoon do?ā€ and I canā€™t find any way for it.
Thatā€™s for Huawei P9 (EMUI Android 6.0 as a reminder).
I will now proceed with Samsung Galaxy S2+ (RR Android 5.1 as a reminder) and see if something is happening.

EDIT #3
Okay Samsung Galaxy S2+ (still 5.1) now runs VCMI both API 16 and API 21 to the point of launcher but launching the game itself still fails for some reason, I will check if there are any logs later.
I have managed to third week or so on Huawei P9 without serious problems, it looks like this:

  • Moving on the world map is a bit choppy, but besides that, no problems found.
  • Clicking certain point is sometimes tricky but still MUCH better and easier than ā€œofficial HD editionā€ (pfffttt)
  • The battle is another story, it goes smoothly, too smothly, when letā€™s say Djins casts a spell on ally, I need to either remember by the sound what spell it is or check the battle log what has been cast. Overally I think all spells are being ā€œexecutedā€ faster than I can say ā€œMagic Missile!ā€. A little problematic but I can manage for now.
  • Ranged attacks in battle done well, Ubisoft canā€™t into this, pfeheh (altough Iā€™m yet to check Magogs or whatever the name in english).
  • The right click is impossible to do, sometimes itā€™s key to be able to do it so I would like to mention it officially as wanted :stuck_out_tongue:
  • Save/Load no problems for now.
  • Text boxes done well, I will add one as a proof later :slight_smile:
  • More info to come if I find something

I installed api 21 after api16 they run, but have same problems for me . after battle game just close. Quick on or off dont care.
(And 1 time battle just not started)
Still unplayeble(

I think its good idea if will possible send logs after crash or freeze. In auto mode.

I think that we should share ours Gamesā€™s Data files. Because we all are talking about different version of game.
Iā€™m using 3in1 Game in English.

I~ think I have ā€œGold Editionā€ in PL language, the version Iā€™m not sure, no patches have been applied on top of what said ā€œGold Editionā€ is.

Itā€™s better to purchase GoG version of Heroes3 Complete and this version should be basic.
gog.com/game/heroes_of_migh ā€¦ te_edition
Promotions of this title are set regullary!