VCMI for Android

I dooon’t think so. Personally I’ve never used any custom ROMs. I can ask around but I don’t think I can find something.

This is normal. It’ll usually be storage/emulated for devices without sdcard and something like /mnt/sdcard for the rest. This should be a root folder that is accessible though mtp. As far as I remember, Android does have some problem with syncing the data automatically, maybe that’s why it wasn’t visible… I can try to check later if there’s something to force syncing.

Hm, that’s a message from the actual game, right? So launcher detected that the files were added correctly. Are you able to access logs from logcat (through something like “adb logcat -f output.txt”)? There should be a line “Accessing data root: /storage/emulated/0/vcmi-data” – that’s the path that gets passed to VCMIDirs. Is it correct?

Yeah obviously VCMI was able to write cache. Ok it’s working now. Looks like I just mess and put my “Data” inside “Data” somehow.

It’s working now except screen is all red. E.g in taskbar (running app list) it’s looks fine and it’s also show proper colors for a second when I’m lock screen, but when it’s open in full screen colors are broken.

This is CyanogenMod 13 on Xiaomi Redmi Note 3.

PS: So it’s looks pretty much like this bug.

So far so good~
The game loads, starts, all is fine. The game goes in english language but I’m not mad, I believe I can understand english enough to play fluently :stuck_out_tongue:
For now I had only RoE + AB + SoD files nearby so I tested that a bit.
I will try to test WoG soon because why not, the intro in WoG is worth of trying :3
I have launched it on Huawei P9 with Android 6.0 onboard, I will try with Samsung S2+ with Android 5.5 (Resurrection Remix) soon, I have to clean some space first.
In theory I can try with Samsung Galaxy S1 with uh… There is CyanogenMod installed but I forgot exact numbers, I’m pretty sure it has Android from 4 branch but I’m yet to check, I simply forgot, forgive me :stuck_out_tongue:

To set up the name one has to do it the classic way (unless I don’t know about something):

  1. Multiplayer mode
  2. Backspace a lot, enter the name (it may be in blind mode because keyboard will slide in just like that)
  3. After typing the name, press “back” whatever your phone has either <- or <| or whatnot, ONCE
  4. Press Host button, the game will probably crash but fear not, the name will be memorised for next time you launch the game.
  5. Enjoy your player name replaced with proper name :slight_smile:

Back to the game! (This time Tower castle because golems~!)

More devices testing soon/later.

Black screen on my SGS4, Android v5 stock.
Any other selection differ than “Start VCMI” in launcher lead to crash of vcmi (Unfortunately VCMI, has stopped).
HMMIII data taken from my PC, where VCMI works with it.

Hello. First time tried install vcmi for android. My shitty china device show me black screen. I waiting few minutes but nothing not happing. Some tech info about pixs.ru/showimage/Screenshot_725 … 181784.png

  1. May be fault what i have russian version heroes?
  2. Or may be need install apk for android4?
    Idk.

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.