Forum index VCMI Project - Heroes 3: WoG recreated
Forum of the project aiming to recreate best turn-based strategy ever!

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

Previous topic :: Next topic
Moved by: Warmonger
2014-02-23, 18:28
VCMI for Android
Author Message
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 316

Posted: 2016-11-24, 04:25   

Fay wrote:
The app should tell you how to setup the data, but roughly it goes like this: start app -> app detects this is a first run and creates <storage>/vcmi-data folder -> you're supposed to put h3 data there (+optionally mods as well) -> restart the app -> app unpacks internal configs (including extra resolutions submod) to internal location -> start game (it'll probably hang for few seconds before getting to main menu, because data-loading thread in CMT is joined to the ui thread -- this should be changed at some point to load data without blocking main thread).

BTW any chance you have any device with Cyanogenmod?

I tried to install it, but looks like even with permissions given it's can't access or create directory. It's says data must be put into "/storage/emulated/0/vcmi-data/Data", but I suppose for whatever reason user under which application running don't have the access there.

Though I'm pretty lame on how Android work so testing all of this over SSH as root. :mrgreen:

UPD: Find out that vcmi-data directory in root of internal memory wasn't visible for file management over MTP for some reason. It's works via with SSH though.

Now stuck at "Error: Heroes III data was not found!" :-(
 
     
Fay 
User defined rank


Joined: 07 Apr 2014
Posts: 36
Posted: 2016-11-24, 08:49   

Quote:
any chance you have any device with Cyanogenmod
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.

Quote:
It's says data must be put into "/storage/emulated/0/vcmi-data/Data" (...)
UPD: Find out that vcmi-data directory in root of internal memory wasn't visible for file management over MTP for some reason
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.

Quote:
Now stuck at "Error: Heroes III data was not found!"
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?
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 316

Posted: 2016-11-24, 15:19   

Fay wrote:
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.
 
     
Kiiro Yakumo 
Daredevil


Joined: 20 Nov 2016
Posts: 10
Location: Rata Sum
Posted: 2016-11-25, 18:00   

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 :P
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 :P

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 :)

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

More devices testing soon/later.
_________________
For any talk-related stuff please contact my PK-632z Golem.
 
     
SkyRE 

Joined: 25 Nov 2016
Posts: 5
Posted: 2016-11-25, 19:09   

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.
 
     
Povelitel 

Joined: 21 Jun 2013
Posts: 293
Posted: 2016-11-25, 20:21   

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 http://pixs.ru/showimage/...23_24181784.png
1. May be fault what i have russian version heroes?
2. Or may be need install apk for android4?
Idk.
_________________
If undertook to do something, do it well!
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 316

Posted: 2016-11-25, 20:54   

SkyRE wrote:
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.

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.
 
     
Fay 
User defined rank


Joined: 07 Apr 2014
Posts: 36
Posted: 2016-11-25, 23:01   

Quote:
It's working now except screen is all red
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 https://github.com/Fayth/vcmi-android/blob/master/project/vcmi-app/src/main/java/org/libsdl/app/SDLActivity.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)

Quote:
The game loads, starts, all is fine
Yay, so it's not only working for me. ;)

Quote:
The game goes in english language
Hm, the language should be based on your data files... It's not in english for me (unless I add WoG).

Quote:
Any other selection differ than "Start VCMI" in launcher lead to crash of vcmi (Unfortunately VCMI, has stopped).
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 ;) ).
 
     
misiokles 

Joined: 12 Nov 2015
Posts: 165
Posted: 2016-11-25, 23:43   

If I understand correctly - in android version there's possibility to enable/disable mods in launcher?
 
     
Povelitel 

Joined: 21 Jun 2013
Posts: 293
Posted: 2016-11-26, 08:43   

misiokles wrote:
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).

log client empty. 0 byte.
launcher: http://pixs.ru/showimage/...91_24185150.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.
_________________
If undertook to do something, do it well!
 
     
Kiiro Yakumo 
Daredevil


Joined: 20 Nov 2016
Posts: 10
Location: Rata Sum
Posted: 2016-11-26, 12:57   

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.

Quote:
Hm, the language should be based on your data files... It's not in english for me (unless I add WoG).

I will check that but still I'm not mad it's in english, I won't be making war about it :P (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.
_________________
For any talk-related stuff please contact my PK-632z Golem.
 
     
Fay 
User defined rank


Joined: 07 Apr 2014
Posts: 36
Posted: 2016-11-26, 14:38   

Quote:
Unfortunatelly the game crashes in two moments:
1) Loading saved game.
2) After battle results.
Both of these work correctly for me, so it may help if you can get the logs.

Quote:
we don't risk that polish-exclusive-letters will do some OMGWTFBBQ situation
Special characters should work correctly in the current version. ;)

Quote:
BTW is it somehow possible to force VCMI to read from External microSD card instead of Internal Memory? Just asking~ :3
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~
Quote:
If I understand correctly - in android version there's possibility to enable/disable mods in launcher?
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).
 
     
Kiiro Yakumo 
Daredevil


Joined: 20 Nov 2016
Posts: 10
Location: Rata Sum
Posted: 2016-11-26, 15:01   

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

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

Quote:
Special characters should work correctly in the current version. ;)/

VCMI nailed Heroes 3 "HD" edition, concluded :3
Victory for VCMI!

Quote:
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.

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.

Quote:
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 ;)).

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
<kshhh>

VCMI_Client_log.txt
Samsung Galaxy S2+ one file because no other files produced.
Download 38 Time(s) 10.64 KB

vcmi_logs.tar
Huawei P9 logs packed in the archive because why not.
Download 32 Time(s) 214 KB

_________________
For any talk-related stuff please contact my PK-632z Golem.
 
     
SkyRE 

Joined: 25 Nov 2016
Posts: 5
Posted: 2016-11-26, 16:24   

Log in cache is empty
Here logcats for resolution selection crash and black screen
Code:
http://rgho.st/6gTFbFjnF
 
     
Kiiro Yakumo 
Daredevil


Joined: 20 Nov 2016
Posts: 10
Location: Rata Sum
Posted: 2016-11-27, 10:27   

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 :)

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.

vcminails.jpg
41 Time(s) 146.77 KB

_________________
For any talk-related stuff please contact my PK-632z Golem.
 
     
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

Hosting provided by DigitalOcean
Page generated in 0.04 second. SQL queries: 15