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

Development - VCMI for Android

xyz - 2014-02-21, 22:45
Post subject: VCMI for Android
I've ported VCMI for Android, using pelya's SDL port.

You can download it from google play: https://play.google.com/store/apps/details?id=is.xyz.vcmi

Here's git repo: http://github.com/xyzz/vcmi (check branches)

AlienX - 2014-02-22, 01:17

That's great, many people looked for this for quite a long time :-D . Runs sloooooow but without any problems on my galaxy S (i9000). I hope you will keep an eye on it for longer period of time than pelya did on his port :-) . Actually I think someone should ask pelya to remove his old port from play store, just for visiblity of this one.
Great work once again!

Macron1 - 2014-02-22, 11:55
Post subject: Re: VCMI for Android
xyz wrote:
I've ported VCMI for Android, using pelya's SDL port.

You can download it from google play: https://play.google.com/store/apps/details?id=is.xyz.vcmi

Here's source code patch: https://gist.github.com/anonymous/447f75e2af90d067ee46


New towns, arts and creatures support is also working?
I need to try it then on my Samsung Galaxy S. Or even go and buy more modern model :-)

Ivan - 2014-02-22, 17:47

That's actually working Android port? That would be great.

xyz, I hope that this is *the* latest version? There was quite serious bug with saving AI state that was fixed only few days ago. Anyway would be great if you'll update build as soon as next release is out (scheduled for March, 1)

xyz - 2014-02-22, 19:26

That's 0.94e (r3749), is it affected? I'll update it as soon as the next version is released.

I also don't think it's a good idea to packge the latest SVN version (maybe in a separate "vcmi nightly" package though?), it seems that there was something about savegame format not being compatible between latest revisions(?).

Ivan - 2014-02-22, 19:43

Fix came out after 0.94e, in rev 3762. So there may be some problems with loading saves.

Yes - packaging current svn is not the best idea but that's what our "dev builds" are - builds from latest svn for testers. So there won't be much difference between dev build and current svn stability-wise. Only our "full" releases can be considered to be stable.

As for saves compatibility - usually there is no guarantee that saves from different revisions will work but actual format changes are relatively rare.

KlavKalashj - 2014-02-22, 20:22

Just installed this, seems to work very nicely. Big thanks for this!!
xyz - 2014-02-22, 20:26

Ivan, right, this makes sense. I think I'll follow this and after 0.95 release switch this package to stable version and create a new one ("VCMI for Android Beta") which will follow your dev versions releases.

edit: just tried 0.94 stable and it seems AI works a lot faster there, is that expected behavior?

AlienX - 2014-02-23, 00:13

xyz wrote:

just tried 0.94 stable and it seems AI works a lot faster there, is that expected behavior?

From what I know there was a major progress in AI since 0.94

oceanking7 - 2014-02-23, 03:21

I really appreciate what you're doing ,thanks veryyyyyyyy much
oceanking7 - 2014-02-23, 03:30

two questions

1. can you post the whole code on git?
i konw that your achievement.and i'm not a progranmoer.only wish more people to join the program,make it more palyable.
2.can you post a single apk file for android?
thanks.

FYI:sorry for my english,i'm not good at that

Ivan - 2014-02-23, 10:12

Looked through your patch, some notes:
- disabled shared memory: that's quite direct way to fix problems with missing shared memory. But won't it cause some problems on startup if client will try to connect to not-yet-present server?
- disabled unicode conversion: should be fixed. Because that code is needed for support of localized versions of H3 (like Russian version).

BTW - any chance to make vcmilauncher work on Android? This is Qt5 application used as mod manager and settings editor (for options that can't be changed from in-game UI)
Quote:
I think I'll follow this and after 0.95 release switch this package to stable version and create a new one ("VCMI for Android Beta") which will follow your dev versions releases.

Something like "VCMI daily/weekly/monthly build" would make more sense - our dev builds are more like preparation work before release and Win-only. Archlinux user-provided repo (aur) has vcmi-svn package, Ubuntu has daily builds from svn on launchpad.
Quote:
just tried 0.94 stable and it seems AI works a lot faster there, is that expected behavior?

Likely yes. I can't say much about AI but it definitely got some improvements since 0.95. So less speed actually means better AI

xyz - 2014-02-23, 11:00

Ivan wrote:
- disabled shared memory: that's quite direct way to fix problems with missing shared memory. But won't it cause some problems on startup if client will try to connect to not-yet-present server?

This shouldn't cause issues because client tries to reconnect to server every 2 seconds.

Ivan wrote:
- disabled unicode conversion: should be fixed. Because that code is needed for support of localized versions of H3 (like Russian version).

This is true, I'll try to fix it in the next update (got too lazy for that :( )

Ivan wrote:
BTW - any chance to make vcmilauncher work on Android? This is Qt5 application used as mod manager and settings editor (for options that can't be changed from in-game UI)

Not sure, maybe I'll look into it.

xyz - 2014-02-23, 12:04

On some devices there's a very weird issue with shared libraries and unaligned access (which is strange since unaligned access should kill all ARM devices, shouldn't it?)

Using shared libraries (libvcmi.so, various AIs) makes it segfault at random places (in calls between them I guess?), this is not too hard to solve and just statically linking everything and hacking CGameInterface.cpp's to not use dlopen/dlsym seems to solve this one.

And then there's unaligned access, i.e. at CDefHandler::getSprite,
Code:
    SSpriteDef sd = * reinterpret_cast<const SSpriteDef *>(FDef + BaseOffset);

BaseOffset % 4 != 0
and maybe in some other places?
Doing
Code:
echo 2 > /proc/cpu/alignment

makes it run but that's a really bad solution to this problem.

Ivan - 2014-02-23, 12:37

VCMI should work with unaligned access. AFAIK vcmi runs without issues on Android devices inside Linux chroot.

There is define that enables code for unaligned access:
https://github.com/vcmi/vcmi/blob/master/lib/vcmi_endian.h#L22
This should results in:
1) packed attribute set for structures that may not be aligned
2) enabling of set of unaligned read methods. Which are used in defhandler.
Maybe that check is not triggered on Android?

xyz - 2014-02-23, 13:49

Ivan wrote:
Maybe that check is not triggered on Android?

Yes, you're right, it seems it's not triggered because #if defined(linux) is false (wtf)

rtx - 2014-02-23, 21:42

Wow, the android finally got some love.
But I don't have anything with that system. :P
Still, your nick should be written in some sort of hall of fame. Is there anything like that on this forum?

Galaad - 2014-02-23, 23:36

Hello,
I was so happy to hear the news about VCMI for Android and I installed it following those directives, http://vcmi.xyz.is/installation.html, but when I launch it I only get black screen after some config menu and then back to phone desktop... =(((
(Samsung Galaxy SIII Gt-i9300 on 4.1.2)

Vizit0r - 2014-02-24, 00:31

Galaad wrote:
Hello,
I was so happy to hear the news about VCMI for Android and I installed it following those directives, http://vcmi.xyz.is/installation.html, but when I launch it I only get black screen after some config menu and then back to phone desktop... =(((
(Samsung Galaxy SIII Gt-i9300 on 4.1.2)


i have same problem until switch on wi-fi. If i understodd correctly, SDL need to download something from internet.

Tow - 2014-02-24, 01:07

Great work!

I am very happy particularly to see that the actual patch is quite small.

xyz wrote:
This shouldn't cause issues because client tries to reconnect to server every 2 seconds.

So it is.

Ivan wrote:
BTW - any chance to make vcmilauncher work on Android? This is Qt5 application used as mod manager and settings editor (for options that can't be changed from in-game UI)

Reportedly Qt 5 does support Android so it should be possible.

rtx wrote:
Still, your nick should be written in some sort of hall of fame. Is there anything like that on this forum?

Not quite… Perhaps I could create a group for accomplished contributors and then add some visual sign of membership. But… I'm too lazy. :P
I made the thread sticky and I'll mention it in the next release announcement.

xyz - 2014-02-24, 12:22

Update, 0.94f.

Download: either from google play or direct link http://vcmi.xyz.is/vcmi-0.94f.apk

oceanking7 - 2014-02-25, 01:26

xyz wrote:
Update, 0.94f.

Download: either from google play or direct link http://vcmi.xyz.is/vcmi-0.94f.apk


thanks again.

Clau2iu - 2014-02-25, 14:13

After i click end turn it waits forever....other than that i am pretty amazed
xyz - 2014-02-25, 14:51

Clau2iu wrote:
After i click end turn it waits forever....other than that i am pretty amazed

I'm not sure if that's because of the port, you should try copying the save you're getting this problem with to PC and testing with newest desktop build: http://forum.vcmi.eu/viewtopic.php?t=852

Clau2iu - 2014-02-25, 15:24

I use gog edition on android.This might be the problem?btw thanks for your effort.I really apreciate it.
xyz - 2014-02-25, 15:30

No, it should work fine.
Clau2iu - 2014-02-25, 15:54

Okey i tried other campaigns and it worked very well/
this bug "infinite ai wait " occured when i played this campaign Restoration of erathia -Long live the queen.Thanks for your port.Now i am the most happy person in the world.
Take care of yourself man.btw excuse my english.

xyz - 2014-02-25, 17:59

Sometimes when playing hotseat game without bots, say, only 2 human players, on a map like "A Warm and Familiar Place" I get this right after the game starts:



Any ideas about what to look at?

Warmonger - 2014-02-25, 20:27

This could also be due to recent changes in player order, victory conditions etc. Make sure it does work on PC to begin with.
xyz - 2014-02-26, 14:48

No, I haven't managed to reproduce this on PC.

Anyway, what people complain the most about is AI slowness. It sometimes takes ~15 minutes to make a single turn. Could something be done about it?

Also isn't it odd that VCMI doesn't eat much CPU at all on AI turn? Where's the bottleneck then?

Macron1 - 2014-02-26, 18:18

xyz wrote:
No, I haven't managed to reproduce this on PC.

Anyway, what people complain the most about is AI slowness. It sometimes takes ~15 minutes to make a single turn. Could something be done about it?

Also isn't it odd that VCMI doesn't eat much CPU at all on AI turn? Where's the bottleneck then?


I don't know about AI code yet, but usually there is a value of max map hexes AI evaluates. Maybe dept of move calculating might be lowered.

anon - 2014-02-27, 14:06

any updates?bugs fixed,features and so on?
xyz - 2014-02-27, 15:41

I don't fix any VCMI bugs, neither do I add features, check official VCMI changelogs for that.
If you have issues that are Android-specific please be more precise.

anon - 2014-03-01, 12:00

Who is the dev for android?When the new update is coming?
xyz - 2014-03-01, 15:08

Update is coming as soon as new VCMI is released.
xyz - 2014-03-01, 23:36

New build, 0.95.

http://vcmi.xyz.is/vcmi-0.95.apk

poiana - 2014-03-02, 12:04

Man, i registered just to say thank you ;-)
Clau2iu - 2014-03-02, 14:26

Can you please tell me whats new in 0.95 build.Thanks for your time and effort.Il tell all my buddies to try your android port.
AlienX - 2014-03-02, 14:45

Clau2iu wrote:
Can you please tell me whats new in 0.95 build.Thanks for your time and effort.Il tell all my buddies to try your android port.

Check this:
http://forum.vcmi.eu/viewtopic.php?p=11671

xyz - 2014-03-02, 15:06

Starting with the 0.95 release I'll now be hosting two apps on Google Play:

1) "VCMI for Android", https://play.google.com/store/apps/details?id=is.xyz.vcmi — This one will only contain stable builds (i.e. 0.94, 0.95, 0.96 and so on), development versions (0.94e, 0.94f, etc) will no longer be published
2) "VCMI for Android Nightly", https://play.google.com/store/apps/details?id=is.xyz.vcmi.nightly — This will contain latest SVN build with Android patch applied.

Clau2iu - 2014-03-02, 15:25

A thanks from the button of my heart.You guys are the best.
Warmonger - 2014-03-02, 17:30

I believe it would be nice to link back to our forum.
Firstly, to let people know the features of project, such as mod support and more.
Secondly, some of them may want to report some bugs to our bugtracker.

Also, Android community is another place where we could advertise and attract some more developers. This is important for the success of VCMI!

xyz - 2014-03-02, 18:36

Warmonger wrote:
I believe it would be nice to link back to our forum.
Firstly, to let people know the features of project, such as mod support and more.
Secondly, some of them may want to report some bugs to our bugtracker.

Also, Android community is another place where we could advertise and attract some more developers. This is important for the success of VCMI!

Sure thing, just tell me what to write there.

Warmonger - 2014-03-02, 20:53

This is more or less how I see it:
Quote:

VCMI Wiki
Report bugs not specific to Android port here
Help VCMI grow here

nileppez - 2014-03-12, 19:10

For some reason, I can't get it to detect the game files. I installed the gog version and VCMI in the same folder, ran VCMI once, copied all of the stuff into android/data/is.xyz.vcmi/files and when I run the app it says the files are missing. I have Galaxy Note 2. Any ideas how to solve this?
Macron1 - 2014-03-12, 20:03

nileppez wrote:
For some reason, I can't get it to detect the game files. I installed the gog version and VCMI in the same folder, ran VCMI once, copied all of the stuff into android/data/is.xyz.vcmi/files and when I run the app it says the files are missing. I have Galaxy Note 2. Any ideas how to solve this?


You installed VCMI in Windows? Wrong.
You must first install VCMI in Google Play. Then copy installed files of GOG HMM3 version to pointed directory.

nileppez - 2014-03-13, 01:48

Did it this way. Doesn't work either, but thanks for help.
oceanking7 - 2014-03-13, 01:59

xyz wrote:

Ivan wrote:
- disabled unicode conversion: should be fixed. Because that code is needed for support of localized versions of H3 (like Russian version).

This is true, I'll try to fix it in the next update (got too lazy for that :( )



may i ask one question,have you fix it?
for my test,it still can't run chinese version on android of v0.95

Macron1 - 2014-03-13, 04:52

nileppez wrote:
Did it this way. Doesn't work either, but thanks for help.


I have Galaxy S4 now, and for me it worked as it's written (yesterday).

Ivan - 2014-03-13, 14:28

oceanking7, AFAIK it was fixed but in order for VCMI to recognize Chinese version you need 2 things:
1) Tell VCMI language of your H3 version. On Windows this can be done via Launcher (go to settings tab and select GBK/Simplified Chinese encoding). AFAIK Android is still missing launcher so you need to edit settings file manually. This is what you should have in your settings.json file but I have no idea where VCMI keeps this file on Android:
Code:
{
    "general" : {
        "encoding" : "GBK"
    }
}


2) Provide fonts capable of displaying Chinese characters. Unpack this archive into <Heroes III directory>/Mods/
https://dl.dropboxusercontent.com/u/22372764/vcmi/mods/TrueTypeHan.zip

Macron1 - 2014-03-13, 17:57

Played test map a little today. Didn't test much, only Cove so far.

1) How I can do right click on object on my smartphone?
2) Mod manager is needed badly to turn on/off mods.

xyz - 2014-03-13, 19:22

nileppez wrote:
Did it this way. Doesn't work either, but thanks for help.

Post list of files in "files" directory.

oceanking7 - 2014-03-14, 01:45

Ivan wrote:
oceanking7, AFAIK it was fixed but in order for VCMI to recognize Chinese version you need 2 things:
1) Tell VCMI language of your H3 version. On Windows this can be done via Launcher (go to settings tab and select GBK/Simplified Chinese encoding). AFAIK Android is still missing launcher so you need to edit settings file manually. This is what you should have in your settings.json file but I have no idea where VCMI keeps this file on Android:
Code:
{
    "general" : {
        "encoding" : "GBK"
    }
}


2) Provide fonts capable of displaying Chinese characters. Unpack this archive into <Heroes III directory>/Mods/
https://dl.dropboxusercontent.com/u/22372764/vcmi/mods/TrueTypeHan.zip


thanks a lot,I'll try.

Macron1 - 2014-03-14, 17:55

Started several maps, on AI turn AI often goes out for several minutes with indicator not running. I didn't wait long and stopped game.
Now at least game's started and still playing. Let's wait, if AI will also stop responding.
If it's because of long turn, maybe AI needs to be shrunken or lightened for Android? Or forcebly end his turn after some 1 min, for example.

Warmonger - 2014-03-14, 18:39

I have no idea about architecture of Android devices or compilator properties, so can't help.
Quote:
Or forcebly end his turn after some 1 min, for example.

There is no point to wait for a minute just to see AI did nothing.

Macron1 - 2014-03-14, 19:52

Warmonger wrote:
I have no idea about architecture of Android devices or compilator properties, so can't help.
Quote:
Or forcebly end his turn after some 1 min, for example.

There is no point to wait for a minute just to see AI did nothing.


I also don't know a thing about Android, I was suggesting to author of port.
is there some numerical parameters in AI like dept of pahfinding etc?

nileppez - 2014-03-15, 21:27

xyz wrote:
nileppez wrote:
Did it this way. Doesn't work either, but thanks for help.

Post list of files in "files" directory.

After the way one of the users here suggested, the folder contains all of the files GOG version originally has (and works correctly with), and nothing more.

Regarding the "If you haven't started VCMI at least once yet you should do it now. This will make it copy some required files that are not a part of original HoMM3 installation." instruction: does this tell about PC version of VCMI, or your ported one? Because I don't see any additional files being created.

xyz - 2014-03-15, 21:43

nileppez wrote:
Regarding the "If you haven't started VCMI at least once yet you should do it now. This will make it copy some required files that are not a part of original HoMM3 installation." instruction: does this tell about PC version of VCMI, or your ported one? Because I don't see any additional files being created.

This refers to VCMI for Android.

nileppez - 2014-03-16, 01:25

Okay, so running Android VCMI should make it create some files right? Where should those be located?
xyz - 2014-03-16, 01:31

nileppez wrote:
Okay, so running Android VCMI should make it create some files right? Where should those be located?

Same place it asks to copy game files to, by default it is /sdcard/Android/data/is.xyz.vcmi/files

Macron1 - 2014-03-17, 14:05

But the way, if screen untouched for some time (AI turns are long), screen goes off with blocking screen.
Maybe Android version will prevent turning off screen while VCMi is running?

Macron1 - 2014-03-17, 17:41

Another issue I found in Android port:
when in battle, enemy hero sprite is not shown (only flag).
Is it only my bug? Or someone else found it too?

Macron1 - 2014-03-20, 13:32
Post subject: Another bug on Android
Another bug:
in siege enemy destroyed my catapult.
Now my hero doesnt have catapult in slot and cannot break walls :-)

Chris12002 - 2014-03-22, 19:56

Been waiting for this for so long, thanks to everyone involved in this.
Just want to mention some bugs I've experienced, unfortunately I can't verify whether they also occur on other versions and these all occurred on a Nexus 10 tablet.

Major:
1. Enemy Hero AI seems to be broken, they don't purchase creatures and instead hire as many heroes as they can which walk around with their starting creature stacks.

2. When Heroes are moving any map any features hidden by the Uncharted Territory fog flicker in and out of visibility

3. Enemy AI turns are never shorter than a minute

Minor:

1. No text for Tavern gossip

2. A neutral creature stack gained a morale bonus, which paused the battle on its turn. Needed to restart

3. May be intentional but if the cursor is held over enemy units their movement shadow is visible, if this is intended is this feature able to be turned off?

4. Grail map has a blue tint

5. Occasional random crashing

If you know anywhere better to post this then please inform me, cheers.

Warmonger - 2014-03-22, 20:45

This link is also present at Google Play page, but anyway:
http://bugs.vcmi.eu/my_view_page.php

Macron1 - 2014-03-24, 07:27

At friday finished my first L map on Android.
VCMI crashed several times during gaming (some times because of me and misconfiguration of creatures JSONs), sometimes due to some bugs. But finally it is playable.
As addition to bug i mentioned earlier there some other bugs:
FLYING ability (as well as WATER_WALK and spells Fly, Water Walk) of heroes didn't work at all.

But i must say saves are stable now, i could load game and try to work around some moments where bugs crash game.
AI goes for long time, and plays relatibly good. He buyes armies, now tryes to siege towns when lost his towns.
Still AI almost doesnt take in most cases his dwellings and mines back. Doesnt attack weak enemy heroes (i went almost all 2 AI players territory by my weak hero and met no attacks.
Seems now AI is quite good at sea exploration and buying ships (in 0.94 AI couldnot effectively do this).
So great work is made on AI.

Warmonger - 2014-03-26, 16:06

Somebody check this port.
xyz - 2014-03-26, 17:05

Warmonger wrote:
Somebody check this port.

This is not related to VCMI. This application includes x86 → arm binary translator, wine and X server. It just launches original HoMM 3.

rastanew - 2014-04-02, 12:42

xyz,
Hello. I am impressed with this project and your work personally.
It was many improvements since r3801 and about a month passed.
When you planned to make new nightly build for android?

xyz - 2014-04-03, 17:08

rastanew wrote:
xyz,
Hello. I am impressed with this project and your work personally.
It was many improvements since r3801 and about a month passed.
When you planned to make new nightly build for android?

I'm currently waiting for VCMI to switch to git.

Reaper - 2014-04-10, 13:04
Post subject: port
xyz wrote:
Warmonger wrote:
Somebody check this port.

This is not related to VCMI. This application includes x86 → arm binary translator, wine and X server. It just launches original HoMM 3.


link is not active. what was theat ports name? O:-)

Reaper - 2014-04-10, 13:06
Post subject: port
xyz wrote:
Warmonger wrote:
Somebody check this port.

This is not related to VCMI. This application includes x86 → arm binary translator, wine and X server. It just launches original HoMM 3.


link is not active. what was that ports name? O:-)

Ivan - 2014-04-10, 15:09

It was "Heroes 3 by Eltech" or something like that. I guess that Ubisoft really does not likes when somebody uses their trademarks (and especially - getting money from that)

Not a surprise I must say - last time I checked they had both "Heroes" and "Might & Magic" registered as trademarks.

AVS - 2014-04-10, 17:32

Ivan wrote:
It was "Heroes 3 by Eltech" or something like that. I guess that Ubisoft really does not likes when somebody uses their trademarks (and especially - getting money from that)

Not a surprise I must say - last time I checked they had both "Heroes" and "Might & Magic" registered as trademarks.


new link https://play.google.com/store/apps/details?id=com.eltechs.es

ziggurat - 2014-04-21, 15:29

Can game files be installed on sd card? Only have 16GB internal storage but 64GB external.

Sorry, found the answer and it's yes.

ziggurat - 2014-04-22, 07:12

Could you please add a mouse mode for Samsung devices that moves the mouse while hovering the finger over the screen, and clicking when tapping?

http://developer.samsung....Finger-Air-View

pelya - 2014-05-05, 23:30

Hi xyz, great stuff you're doing here!
To enable finger hover (or AirView, as Samsung calls it, it is also available on Sony devices), just update your SDL repository.
You might need to roll back this commit, if mouse clicks become laggy (I'll fix that later this week).

Also, would be nice to put a link to your Github repo and to this thread into app description on Google Play, it takes some googling to find this page (I'm guilty myself for not providing all such links for my apps, now with 4K character limit for app description we devs have no excuses).

Putting InhibitSuspend=y in AndroidAppSettings.cfg will prevent phone screen turning off during AI turn.

ThyCrusader - 2014-05-07, 11:09

In my opinion, this android port is the greatest part of this project. I really hope that you will continue and keep it up to date with every new version. I am no android developer, but I am a cplusplus user, and i am not familiar with linux environments. I do not even know what languages you use in android, but this port makes me want to join the android development of this project.
jilocasin - 2014-06-04, 02:12
Post subject: VCMI crashes on load screen every time
Hello everyone!

I just got my brand new Samsung Galaxy Tab 3 and VCMI crashes everytime on the load screen when I try to start a new Scenario. Campaign does not work either. I have tried older builds of VCMI as well as VCMI nightly. The strange thing is VCMI works greatly on my other Android devices. Does anyone have any advice or clue what to do?

I was very much looking forward to play HoMM 3 on my new Samsung Tab so I am rather desperate and any help would be most appreciated!

Thanks,

Andi

AlienX - 2014-06-04, 14:31
Post subject: Re: VCMI crashes on load screen every time
jilocasin wrote:
Hello everyone!
I am rather desperate

Well if it works on your other android devices, then switching from samsung's software to some other unofficial rom SHOULD work.
Anyway, such things shouldn't happen, and xyz should definitely look into it.

xyz - 2014-06-04, 18:15
Post subject: Re: VCMI crashes on load screen every time
jilocasin wrote:
Hello everyone!

I just got my brand new Samsung Galaxy Tab 3 and VCMI crashes everytime on the load screen when I try to start a new Scenario. Campaign does not work either. I have tried older builds of VCMI as well as VCMI nightly. The strange thing is VCMI works greatly on my other Android devices. Does anyone have any advice or clue what to do?

I was very much looking forward to play HoMM 3 on my new Samsung Tab so I am rather desperate and any help would be most appreciated!

Thanks,

Andi


Your device has Intel chipset, x86 is not supported by my port (yet).

Lantos - 2014-06-05, 11:08
Post subject: Re: VCMI crashes on load screen every time
xyz wrote:
jilocasin wrote:
Hello everyone!

I just got my brand new Samsung Galaxy Tab 3 and VCMI crashes everytime on the load screen when I try to start a new Scenario. Campaign does not work either. I have tried older builds of VCMI as well as VCMI nightly. The strange thing is VCMI works greatly on my other Android devices. Does anyone have any advice or clue what to do?

I was very much looking forward to play HoMM 3 on my new Samsung Tab so I am rather desperate and any help would be most appreciated!

Thanks,

Andi


Your device has Intel chipset, x86 is not supported by my port (yet).





I have the same problem with the tablet LG V500.
Please add support for my tablet :-)

xyz - 2014-06-06, 14:07
Post subject: Re: VCMI crashes on load screen every time
Lantos wrote:
xyz wrote:
jilocasin wrote:
Hello everyone!

I just got my brand new Samsung Galaxy Tab 3 and VCMI crashes everytime on the load screen when I try to start a new Scenario. Campaign does not work either. I have tried older builds of VCMI as well as VCMI nightly. The strange thing is VCMI works greatly on my other Android devices. Does anyone have any advice or clue what to do?

I was very much looking forward to play HoMM 3 on my new Samsung Tab so I am rather desperate and any help would be most appreciated!

Thanks,

Andi


Your device has Intel chipset, x86 is not supported by my port (yet).





I have the same problem with the tablet LG V500.
Please add support for my tablet :-)


It should work fine with your tablet, please send me logcat output after the app crashes.

Lantos - 2014-06-07, 09:15
Post subject: Re: VCMI crashes on load screen every time
xyz wrote:
Lantos wrote:
xyz wrote:
jilocasin wrote:
Hello everyone!

I just got my brand new Samsung Galaxy Tab 3 and VCMI crashes everytime on the load screen when I try to start a new Scenario. Campaign does not work either. I have tried older builds of VCMI as well as VCMI nightly. The strange thing is VCMI works greatly on my other Android devices. Does anyone have any advice or clue what to do?

I was very much looking forward to play HoMM 3 on my new Samsung Tab so I am rather desperate and any help would be most appreciated!

Thanks,

Andi


Your device has Intel chipset, x86 is not supported by my port (yet).





I have the same problem with the tablet LG V500.
Please add support for my tablet :-)


It should work fine with your tablet, please send me logcat output after the app crashes.



But how to do it? I do not know much about this and did not know how to do it.
Do I have to use some program?
Thank you for your help!

ohman - 2014-06-26, 11:45
Post subject: AI freezes
Hello,

after 2 Weeks and 7 Days on the map "All for One" the blue AIs turn won't finish. I'm aware that the AIs turns tend to take very long but I'm pretty sure I've waited long enough. Probably like 15 Minutes.
Is there a solution or is this something we will have to live with at this point?

Greets

AlienX - 2014-06-26, 15:07
Post subject: Re: AI freezes
ohman wrote:
Hello,
Is there a solution or is this something we will have to live with at this point?
Greets


Well, android version was not updated for a while. AFAIK there are some improvements on this subject in repositories.

ladycee - 2014-07-02, 11:28

THL T200c 8 core 1.7 ghz 2 gb ram Android 4.2.2 Not yet rooted or modded

Just uploaded latest vcmi and heroes 3 with current WOG (uploaded this week)

AI turn horribly slow on Medium map Battle Of The Sexes Month 2 Week 2 Day 2 AI turn taking 5+ minutes with only vcmi app working.

Have expanded screen blanking to maximum 30 minutes.

Hope this info helps

Warmonger - 2014-07-02, 11:39

The latest version of VCMI is NOT yet on Android. Hopefully it comes live in the following days, though.
ladycee - 2014-07-02, 11:48

Thank you. I meant latest available for android.

I will report back when new android version is available. Have been playing Heroes since Heroes 1 :)

Thethiala - 2014-07-02, 14:00

This is running great on my Galaxy S5.

I do have a question though, as someone else also asked earlier in this thread: Is it possible to "right click" objects somehow? Currently I don't know how to check enemy heroes, neutral map creatures etc. to see how strong they are, which is kind of essential.

If it's not currently possible, is this something that'll be looked into in the future?

Thank you for your hard work. :)

AlienX - 2014-07-02, 16:35

Thethiala wrote:
This is running great on my Galaxy S5.
Is it possible to "right click" objects somehow?

Touch the screen with second finger while holding over thing you want to right click.

Thethiala - 2014-07-02, 22:34

AlienX wrote:
Thethiala wrote:
This is running great on my Galaxy S5.
Is it possible to "right click" objects somehow?

Touch the screen with second finger while holding over thing you want to right click.

That works, thank you. :)

The way it currently works is however a bit prone to making mistakes. Say I want to inspect an enemy hero right next to mine. The first time I right click is fine, but there's something I forgot to check. I try to right click again, but because I did so too fast I've now accidently attacked the enemy hero since he was already targeted.

An alternative could be to make a button in the upper left corner (beneath the text input button) that toggles between left click and right click mode. That would in my opinion be a more elegant solution, less prone to mistakes.

Also I've got to echo some of the earlier posts about the enemy AI taking forever to do their turns.

I'm sorry if I come across as whiny, I just see great promise in this project and want to give my input. ;p

AlienX - 2014-07-03, 14:49

Thethiala wrote:
The way it currently works is however a bit prone to making mistakes.

Well you can set it as you want, just press "Change device configuration" while running VCMI (when SDL logo is shown). Lot of options there, you can set right click to a physical button for example.

ladycee - 2014-07-03, 14:50

I really look forward to a fully working vcmi android. It looks beautiful and is very nesrly there. Cannot get past 3 months 1 week 6 days despite choosing different paths
Macron1 - 2014-07-03, 15:10

By the way, when to expect 0.96 for Android?
Macron1 - 2014-07-03, 15:12

Thethiala wrote:
AlienX wrote:
Thethiala wrote:
This is running great on my Galaxy S5.
Is it possible to "right click" objects somehow?

Touch the screen with second finger while holding over thing you want to right click.

That works, thank you. :)

The way it currently works is however a bit prone to making mistakes. Say I want to inspect an enemy hero right next to mine. The first time I right click is fine, but there's something I forgot to check. I try to right click again, but because I did so too fast I've now accidently attacked the enemy hero since he was already targeted.

An alternative could be to make a button in the upper left corner (beneath the text input button) that toggles between left click and right click mode. That would in my opinion be a more elegant solution, less prone to mistakes.

Also I've got to echo some of the earlier posts about the enemy AI taking forever to do their turns.

I'm sorry if I come across as whiny, I just see great promise in this project and want to give my input. ;p


When VCMI is started, there some SDL settings available. You can change the way right click is made (but other ways of right click are also not much better for my thick fingers)

habek77 - 2014-07-07, 12:43

i installed VCMI on my Galaxy S5. Run it the first time, it loads ok except for the resolution is a bit messed up making the game looked huge on my screen. So exited the game and relaunch VCMI, but now it comes up with message "Unfortunately VCMI has stopped". I have even tried restarting the phone then relaunching the app, it still doesn't work. Anyone knows how to fix this?
xyz - 2014-07-17, 06:49

0.96 is not on Google Play yet because it crashes on one of my devices and I haven't had enough time to debug this crash. I've uploaded the build here: http://a.pomf.se/hvxaig.apk, it may or may not work for you.
Sebt - 2014-07-17, 09:15

xyz wrote:
0.96 is not on Google Play yet because it crashes on one of my devices and I haven't had enough time to debug this crash. I've uploaded the build here: http://a.pomf.se/hvxaig.apk, it may or may not work for you.


I tested VCMI 6 (apk from link in your post), everything works fine until I start the map - it crashes there.

Seems that actual version of Nightly build on Google Play has a very little faster AI and some graphic issues are solved comparing to stabile build on Google Play, however still it takes for AI too much time like I described in other thread (you may saw it xyz, it's that I linked to in my PM to you).

Anyway, looking forward to update, especially that at the beginning of July this year on some websites information about VCMI on Android appear, your better recognizable and still there are many people who download the game from Google Play.

If you want free tester I can help. :)

xyz - 2014-07-17, 17:27

Sebt wrote:
xyz wrote:
0.96 is not on Google Play yet because it crashes on one of my devices and I haven't had enough time to debug this crash. I've uploaded the build here: http://a.pomf.se/hvxaig.apk, it may or may not work for you.


I tested VCMI 6 (apk from link in your post), everything works fine until I start the map - it crashes there.

Seems that actual version of Nightly build on Google Play has a very little faster AI and some graphic issues are solved comparing to stabile build on Google Play, however still it takes for AI too much time like I described in other thread (you may saw it xyz, it's that I linked to in my PM to you).

Anyway, looking forward to update, especially that at the beginning of July this year on some websites information about VCMI on Android appear, your better recognizable and still there are many people who download the game from Google Play.

If you want free tester I can help. :)


Well then, what's the error you get?

upd: I've found and fixed some really stupid bug, new release will be available soon

xyz - 2014-07-17, 19:58

I've just uploaded the new (not so much anymore, sorry) 0.96 release to Google Play, it'll be available within few hours.
Sebt - 2014-07-18, 08:54

I'm not experiencing crash each time I load any map anymore. :)

The AI moves seems to be a very little bit faster, but I'm not sure how much. I'm playing To the South of Hell:
AI player Red:
- 1st turn (3 heroes) - 60-70 seconds, 2nd turn (5 heroes) - 80-90 seconds, 3rd ( 5 or 6 heroes) - 90-100 seconds. - now it goes slower then in Nightly built...
AI player Brown:
- 1st turn (0 heroes) - 4-5 seconds, 2nd turn (1 hero) - 9-12 seconds, 3rd (3 heroes) - 28-32 seconds.

It's not much different from Nightly build version, a very little AI moves are faster (especially that their moves are not "lagging" much like before). The longest turn I ever experienced took about 2 minutes.
Also I was starting this map few times, for second time when Red AI player had a 1st turn game crashed after waiting for him about 66 seconds, but other games went without crashes.

Edit: OK, crash happened again during the play, more info here: http://forum.vcmi.eu/viewtopic.php?p=12765#12765

Moreover:
Even on the King's difficulty level after few months AI can't built best units (playing on Dragon Pass map, but on other maps appears to behave the same) as also when one hero is taking a resource or beating guardian of mine - it takes only 1-2 things from place it have access to instead of taking all things there that are closets to it or only kills creatures, but doesn't claim the mine that was behind guardians. AI attacks even stronger that it creatures or creature's lairs, suicides.

P.S. What files will help with identifying bugs or crashes? VCMI_Client_log.txt and VCMI_Server_log.txt, else?

P.S.2. Thanks for update!

Macron1 - 2014-07-18, 10:28

Sebt wrote:
when one hero is taking a resource or beating guardian of mine - it takes only 1-2 things from place it have access to instead of taking all things there that are closets to it or only kills creatures, but doesn't claim the mine that was behind guardians. AI attacks even stronger that it creatures or creature's lairs, suicides.


And AI doesn't retake his dwellings and mines, if i steal them by my hero, even if he is close:-)

About high level creatures - AI simply doesn't has money.
Take startres.json file and add to "ai" parts a lot of resources. So AI will become more agressive and will buy all dwellings in his towns,

Warmonger - 2014-07-18, 10:48

Quote:
What files will help with identifying bugs or crashes?

Files are of little help, detailed report will do. Also, there's Adventure AI trace mod to help with debug.

Either way, this thread is about Android port, not about AI performance.

explay - 2014-07-19, 13:45

I think that a good idea would be add a support to xperia play gamepad.
For example: d-pad - cursor movement x - lmb o - rmb menu button - menu etc.
http://xperiaplaygamer.net/main.php - Here you can find a guide how to add it.

ThyCrusader - 2014-07-29, 11:01

I did not try the PC version so I do not know if this issue is within the port.

When I play this on my galaxy tab 3 8.0, ingame when i move my hero the fog (fog of war) is blinking/flickering, in other words the fog disappears for an eyeblink and then reappears again, this happens only when i talk with my hero.

Similar problem occurs in the menu when i select singleplayer game and then swtich between maps, the entire interface disappears and reappears almost every time i select an other map.

Sebt - 2014-07-31, 08:15

ThyCrusader wrote:
(...) when i move my hero the fog (fog of war) is blinking/flickering, in other words the fog disappears for an eyeblink and then reappears again, this happens only when i talk with my hero.

Similar problem occurs in the menu when i select singleplayer game and then swtich between maps, the entire interface disappears and reappears almost every time i select an other map.


I experience the same issue, additionally it happens when I move my hero or enemy hero is moving, if you know location of your enemy and you'll look on it's location shrouded by fog of war you'll occasionally see blinking of place it is now.
Also sometimes to unhide part of the map sometimes I just need to click tablet icon next to Home to SD what applications are running to see in when it's pushed part of the map.

It's somehow depending on how much map you discover, not entire map is flickering, but part of map that could be seen if a hero could have vision equal to game window size.

AVS - 2014-07-31, 16:26

Sebt wrote:

I experience the same issue, additionally it happens when I move my hero or enemy hero is moving, if you know location of your enemy and you'll look on it's location shrouded by fog of war you'll occasionally see blinking of place it is now.
Also sometimes to unhide part of the map sometimes I just need to click tablet icon next to Home to SD what applications are running to see in when it's pushed part of the map.

It's somehow depending on how much map you discover, not entire map is flickering, but part of map that could be seen if a hero could have vision equal to game window size.


I've fixed drawing of invisible objects already, but it was after 0.96 release.

Rorschach - 2014-08-15, 22:38

I trying to run WoG on for now I don't see any bigger difference between my work and just Comlete ed. But today I got commanders and unfortunately their stats 0. Can some1 help me? I'm not even programmer. See this screenshot. Ye I'm playing with russian lang.

K5HV - 2014-08-17, 16:49

Is there any way I could build my own APK for Android of VCMI latest develop branch?
Successfully build latest on Linux, no idea how to compile it for Android.

godofpainTURKEY - 2014-09-03, 16:36

Please help!I want to run wog on android but when i start the game I can only play standard heroes 3.I can see the commander menu but when i click it nothing happens.How can i fix it...
rega - 2014-09-12, 19:36

Hi all,
Can we expect an Intel chipset support soon?
Thanks!

anubis - 2014-10-16, 10:53

H3llo, first of i realy appricite what you are doing, thank you very much. I have some problems running the game on my galaxy note 2. When i load a game it will open but when i click end turn it will play the AI turn and crash wheb AI finish. "unfortunately vcmi has stopped" pretty frustrating, i need to reopen new games and cannot load saves and continue .. another problem is that AI is stupid & builds tons of heroes with few very weak creatures and roam the map, and a final thing AI turns takes alot of time.. is there any solutions for those problems?? VCMI Ver is 0.96 . Thanks again for evertything.
Warmonger - 2014-10-16, 11:49

Yes, wait for 0.97.
anubis - 2014-10-16, 13:05

When it will be released? If i update android or try older ver of vcmi can it solve the problem?
Macron1 - 2014-10-16, 15:47

anubis wrote:
When it will be released? If i update android or try older ver of vcmi can it solve the problem?

No.

Wait for update for VCMI for Android.
PS AI doesn't see whole map on start, so it buys a lot of heroes to reveal fog of war, i suggest.

ThyCrusader - 2014-11-05, 16:47

Now that 0.97 is out, can we expect to see it on our android devices?
oceanking7 - 2014-11-10, 04:31

xyz 0.97 android still can't use chinese version.
Is the config/modsettings.json useful?
Code:

        "truetypehan" : {
            "active" : true,
            "checksum" : "6cf9dfa1",
            "validated" : true
        }



ps:it works on PC chinese version

Noui - 2014-11-28, 14:43

It seems it has stopped working now after I upgraded to Android 5.0, I can't start a new game and I can't load any old ones, the game just shuts down. It was working fine before the upgrade.
Is this a known issue?

xyz - 2014-11-28, 18:51

That's a know bug, no ETA because I don't have any Lollipop-compatible device.
Noui - 2014-11-29, 10:46

Ah, okay.. If I want to help out, is the Android port of VCMI open source?
xyz - 2014-11-29, 23:10

Yes it is, but it's not trivial to build. See https://github.com/xyzz/vcmi-build
asdfugly - 2014-12-08, 06:24

Any way to zoom, always misclick due to small screen, especially during battles. Would be immensely improved with that feature.
asdasdasd - 2014-12-08, 08:35

Change device configuration -> Mouse emulation -> Mouse emulation mode -> Small, magnifying glass
asdloveyou - 2014-12-10, 11:18

Thanks alot, even better is using touchpad option.
I never bothered with the options before, didnt
know they existed. Game is playable now and
runs smooth. A few bugs though like loaded up a
saved game and now any luck/morale places
return blank messages when visited and end up
doing nothing. World view spell doesnt seem to
work and when I cast haste it caused my units
turn to be skipped instead. Not a big deal, just
glad I could play this old school game on my
phone. Many thanks for the work you guys have
done! :-)

Muramasa - 2015-01-08, 18:52
Post subject: Cheats
How can I use cheats in the VCMI?

I know that there is a cheat list but How do activate the code function?

Macron1 - 2015-01-08, 18:59
Post subject: Re: Cheats
Muramasa wrote:
How can I use cheats in the VCMI?

I know that there is a cheat list but How do activate the code function?


In game press <TAB> and enter cheat codes in English keyboard layout.

Muramasa - 2015-01-08, 20:17
Post subject: Re: Cheats
Macron1 wrote:
Muramasa wrote:
How can I use cheats in the VCMI?

I know that there is a cheat list but How do activate the code function?


In game press <TAB> and enter cheat codes in English keyboard layout.


I dont see any Tab key.

Delirious17 - 2015-02-02, 00:31
Post subject: Re: Cheats
Muramasa wrote:
Macron1 wrote:
Muramasa wrote:
How can I use cheats in the VCMI?

I know that there is a cheat list but How do activate the code function?


In game press <TAB> and enter cheat codes in English keyboard layout.


I dont see any Tab key.


Yes how can I access the tab key on Android?

[email protected] - 2015-02-09, 09:48
Post subject: Lollipop
Is there hope for VCMI for Lollipop?
Macron1 - 2015-02-09, 12:11
Post subject: Re: Cheats
Delirious17 wrote:
Muramasa wrote:
Macron1 wrote:
Muramasa wrote:
How can I use cheats in the VCMI?

I know that there is a cheat list but How do activate the code function?


In game press <TAB> and enter cheat codes in English keyboard layout.


I dont see any Tab key.


Yes how can I access the tab key on Android?


When VCMI is starting, there in top part apears bar with configuration options.
Go to it, then select "Screen Keyboard" and configure it. "Ab" icon will apear in left top corner.
PS I have russian language adroid, so i only guessed english language names.
PPS Right now i cannot verify if there is tab button (my VCMI is not configured right to run on smartphone).

iste - 2015-02-13, 09:45

As an updated-shield-owner, i'm sad.

How can we help you to push this in lollipop?

SXX - 2015-02-13, 13:55

iste wrote:
How can we help you to push this in lollipop?

I think you can only help if you're have C++ programming experience.

If there any programmer who may want to understand how VCMI work then I'm might join youas I'm eventually want to find out how it's works on Android in order to test cross-platform multiplayer.

iste - 2015-02-19, 16:35

Damn, i'm only java.

But we maybe can throw here some stack to find this crash origine ?

SXX - 2015-02-19, 16:42

iste wrote:
But we maybe can throw here some stack to find this crash origine ?
Actually there was several crashes fixed since 0.97 released so it's at least needed to test latest version there.

So you may try to built VCMI and deploy debug build of VCMI on your device. If you decide to do so PM me with your instant chat info (Skype, hangouts. xmpp/jabber, etc) and I'll be happy to help you find out with that.

SXX - 2015-04-04, 03:05

Is there any details on what problems with building VCMI for Android using SDL2?
Reeferidgerator - 2015-04-13, 21:24

Will vcmi .98 be available for Android soon?
SiTLar - 2015-04-24, 16:57

Hi!
I'm trying to install VCMI on Samsung Galaxy Tab 3. I copy the files to the right place, restart the device, but VCMI keeps asking me to get the files. I've got everything working on my HTC one mobile, so I'm pretty sure I do it right.

I'd highly appreciate any help :-D

AlienX - 2015-04-24, 17:44

SiTLar wrote:
Hi!
I copy the files to the right place


You can set custom path to files somewhere in options, maybe this can help.

te0k - 2015-04-29, 17:42

I just downloaded the version for Android. I am using a Motorla Moto G.

The files I used are the ones from the installation on Program Files folder, from the Heroes III Complete CDs. They should work right?

I am also having the same problem. The game starts, a bit laggy but fine, but then as soon as i press Begin it crashes without any message.

I also noticed when I try to create a random map it says "could not create a random map that fits current choices"

Am I doing something wrong?

Thanks a lot for this good project and for your help!

Zweistein - 2015-05-03, 03:27

Thanks for the awesome port xyz!

I have one problem with the AI - the enemy doesn't seem to be buying almost any creatures. I've seen this mentioned earlier in the thread but it doesn't seen to be fixes. Any ideas?

bodziowolf - 2015-05-03, 14:13

Zweistein wrote:
Thanks for the awesome port xyz!

I have one problem with the AI - the enemy doesn't seem to be buying almost any creatures. I've seen this mentioned earlier in the thread but it doesn't seen to be fixes. Any ideas?


So far Android version is still based on 0.97 in which AI doesn't work at all.
In 0.98 AI still seems broken, so we may need to wait a little longer.

Sebt - 2015-06-28, 10:34

Any news from xyz about new version of VCMI for Android? I saw him last week on the forum, long time since last time, so I wonder if it was a good omen. :D
AVS - 2015-06-28, 20:20

Sebt wrote:
Any news from xyz about new version of VCMI for Android?

He said he has not enough time to make 0.98 now. You can find him online on IRC channel #VCMI ( freenode.net network)

Elysium - 2015-06-29, 23:02

Hello there o/
Some days ago, I fell over this awesome port when I were checking the play store for Heroes Onine app, with no luck, and was like AWESOME, I tried both with HOMM3 HotA, Crack, GOG, GOG with WOG, version.. All complete editions, all of them do start up and play music nicely, can navigate to the campaigns browse singleplayer / multiplayer map. But then again when I press "begin"to start the chosen map. It just crashes :< does any1 of you have an idea if I have done something wrong?
Help is much appreciated :>

Delirious17 - 2015-09-12, 00:38

... any hope for an update? It refuses to work on LG G4 5.1
jroc - 2015-11-29, 06:08

This thread seems pretty dead but I didn't want to post somewhere this topic doesn't belong.

Am I correct in believing that VCMI is not compatible with Android 5.0? As stated elsewhere by others, I can launch the app and navigate the menu but VCMI crashes immediately after cinematic screen before the game can actually start.

Thanks

SXX - 2015-11-29, 11:29

jroc wrote:
Am I correct in believing that VCMI is not compatible with Android 5.0? As stated elsewhere by others, I can launch the app and navigate the menu but VCMI crashes immediately after cinematic screen before the game can actually start.
Yes it's correct. Ported version that currently available is really old and nobody updated it for newer Android versions.

If nobody else going to do that I'll eventually attempt to build newer version for Android, but so far there was more important things to do.

jroc - 2015-11-30, 23:24

SSX wrote:
I'll eventually attempt to build newer version for Android

Please do! :mrgreen:

Thanks for the reply.

Elysium - 2015-12-07, 20:21

I do like SXX's post very much :P
Elysium - 2016-08-18, 01:40
Post subject: No1 gonna revive the android version : ( ?
Well, been a time o.o an no one gonna revive it : ( ? Could be really awesome!
lonelywolf - 2016-08-18, 08:04

Is it not better to wait for it too be a little less buggy then people can focus on android version?
Elysium - 2016-08-19, 20:03

Oh, well, haven't really looked into the normal version of the VCMI but that could be good thing I guess
Fay - 2016-11-19, 16:17

Just want to let you know. I've been working on android version for a couple of days and currently have a quite stable application (vcmi master (0.99), boost 1.61, ffmpeg master, SDL 2.0.5). If there aren't any big issues, I'll try to upload it to github in a few days.

Main changes in vcmi to make it working:
* similarly to xyzz's version, I compiled AI libraries together with main lib; android's support for dlopen/dlsym is broken (it compiles and kind of works, but RTTI between libraries is broken),
* I disabled StupidAI for now (currently always using BattleAI); is StupidAI important? the game seems to work correctly with BattleAI; I didn't search a lot why it doesn't work, but it seems that memory gets corrupted somewhere in there,
* starting server / notifying client that server is ready can't use boost IPC, so these messages go through java (using android's Messenger for a simple IPC)

Currently testing only on my android 7.1, but in theory it should work on 4.1+.

I didn't try to play any game longer than a week, but I think it is quite stable. Playing feels very weird, because map can't be swiped and only viable way to scroll the map is through minimap.

SXX - 2016-11-20, 00:59

Fay wrote:
is StupidAI important? the game seems to work correctly with BattleAI;
I pretty sure that original idea to have StupidAI is to make it handle neutral creatures while BattleAI should be used for VCAI players.

Sadly this is not implemented: #2369

Fay wrote:
starting server / notifying client that server is ready can't use boost IPC, so these messages go through java (using android's Messenger for a simple IPC)
To be fair I not sure we should use it even on desktop since it's cause compatability issues with Windows and we use networking for local game anyway.

So personally I would prefer to have it removed: #2560

PS: I sent you invite to our slack.

Kiiro Yakumo - 2016-11-20, 08:46

Yay~!
It's great to hear the VCMI for Android will be alive again :)
I have seen "oh so original" Heroes 3 "HD" version on Android at friend's smartphone and... How should I put it, the laugh is still on... They have some bug on PL letters which suddenly cuts the texts making funny situations like "Troglodyci widz" which we could kinda translate to "Troglodyte Spectator" which in turn made my friend to extend the joke to the point of the image attached~
*AHEM*

Quote:
* I disabled StupidAI for now (currently always using BattleAI); is StupidAI important? the game seems to work correctly with BattleAI; I didn't search a lot why it doesn't work, but it seems that memory gets corrupted somewhere in there,

Besides what SXX said, I guess it is important so the CPU will not think in full power which in turn will allow us to sometimes win :P

If you will need testing reports I can test as hard as possible the game on Android 5.5 , 6.0 and probably some 4.x if I will search a bit.
I can't test on Android 7.0 yet but since you have that version I guess that won't be problem for now :)

Have a nice and sunny day~

Kiiro Yakumo

Fay - 2016-11-20, 11:29

Quote:
we use networking for local game anyway
Do you mean it should work correctly without boost IPC in the current version? Hmm, maybe I should check if it works on android. That replacement for IPC was a first thing that worked correctly so I went with it... (currently messaging works like this: client-cpp sends msg to client-java (and enters waiting loop) -> client-java -> server-java -> server-cpp -> (server-inits and messages back) -> server-java -> client-java -> client-cpp -> (atomic_bool gets switched and we exit waiting loop)).

I'll leave stupidAI/battleAI like this for now. It needs to be checked but it doesn't seem that important... For now I'd like to make building process easier and allow for basic config editiing like in standalone launcher.

Quote:
They have some bug on PL letters which suddenly cuts the texts making funny situations like "Troglodyci widz"
As you can see, currently special characters are broken on my version as well. ;) That's probably because vcmi default to CP1252 codepage and I currently don't change it to anything else.

Quote:
If you will need testing reports I can test as hard as possible the game on Android 5.5 , 6.0 and probably some 4.x if I will search a bit.
I have access to various versions of androids at work, but for the last week I've been quite busy and haven't been able to check yet. I'll upload the project soon(ish) and of course you're welcome to test. :)
muttley - 2016-11-20, 11:52

I was working on porting it to Android on my own too, but didn't manage to even get it working, so won't call it stable like yours.
I guess I'll ditch whatever I have and try helping your project - as soon as you upload it somewhere :P

I'm on Android 6.1, so I'm up for testing too.

SXX - 2016-11-20, 13:43

Fay wrote:
Quote:
we use networking for local game anyway
Do you mean it should work correctly without boost IPC in the current version?

No. I just mean on PC we don't really need any IPC at all since we can just start process and then do everything over network. Shared memory is absolutely unnecessary dependency we better to drop.

AVS - 2016-11-20, 17:16

Shared memory is used to signal that server has opened socket.
demo - 2016-11-21, 22:34

Hello, I downloaded VCMI for Android 0.97 and copied VCMI 0.99 windows version over. Played on THL 5000 Android 4.4.2 scenario All for one with music and it was quite fluently - only few small lags through game (played whole surface) Problem was subterranean gates were not working and happiness and morale buildings show confirm button without text...
...but Scrolling is working also on map and adventure window (sometimes it needed smooth touch to the edge of screen)
Looking forward to see address for the new vcmi playable version
Wish All of You the best..

SXX - 2016-11-22, 08:55

AVS wrote:
Shared memory is used to signal that server has opened socket.

Yeah it is, but using shared memory for that purpose is overkill. Especially when it's doesn't work properly at least on 2 of 4 platforms. We could just start process and attempt to connect until port to open.

Kiiro Yakumo - 2016-11-22, 10:28

Quote:
As you can see, currently special characters are broken on my version as well. ;) That's probably because vcmi default to CP1252 codepage and I currently don't change it to anything else.

True, but if they are just replaced with some other characters instead of cutting the rest of the text at this point, it's still better than "HD" Edition (screenshot added in the attachment by the rule pics or it didn't happen or whatever).
I DO admit that I have played Heroes of Might and Magic 3 long enough to read those cut messages from memory by first words and know what's gonna happen next - most of them at least - but it's still ugly to see that kind of bug which is probably still not fixed.

Quote:
I have access to various versions of androids at work, but for the last week I've been quite busy and haven't been able to check yet. I'll upload the project soon(ish) and of course you're welcome to test. :)

Take your time then~ I will prepare the Inferno army in the meantime~ 8-)

Quote:
Do you mean it should work correctly without boost IPC in the current version? Hmm, maybe I should check if it works on android. That replacement for IPC was a first thing that worked correctly so I went with it... (currently messaging works like this: client-cpp sends msg to client-java (and enters waiting loop) -> client-java -> server-java -> server-cpp -> (server-inits and messages back) -> server-java -> client-java -> client-cpp -> (atomic_bool gets switched and we exit waiting loop)).

Wow I bet an Asuran Golem with that kind of Android installed could prepare tea in the meantime :P

EDIT #1
For some reason preview of the file is kinda fuzzy but if clicked it will show the image properly.

Fay - 2016-11-24, 00:43

Sooo... first of all, disclaimer -- I have no clue if this works for anyone. :P I tried to make building process straightforward, but it's still a horrible mess.

Compiled apks are here:
https://github.com/Fayth/vcmi-android/releases/download/1/vcmi-api16-20161123-debug.7z (for android 4.1+, only armeabi)
https://github.com/Fayth/vcmi-android/releases/download/1/vcmi-api21-20161123-debug.7z (for android 5.0+, all abis (arm, arm v7a, arm64, x86, x86_64))
Project code: https://github.com/Fayth/vcmi-android
Modified vcmi: https://github.com/Fayth/vcmi/tree/android-support

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

If you want to try to build it yourself, the rough outline is here: https://github.com/Fayth/vcmi-android/blob/master/building.txt (I'm on win10, it probably should kind of work on linux (except maybe some permission magic in the scripts?), probably won't work on older windows (needs win10 bash for ffmpeg build) and I have no clue abous macs)

I'll try to answer tomorrow if you have any questions etc...

Some thoughts/details about the current state of the project in totally random order:
* currently special characters seem to work correctly for me no matter if I choose CP1250 or CP1252; I'm not sure if this setting is correctly applied...
* building ffmpeg is hell; fortunately someone did it before and I mostly reused his confs ( https://github.com/yesimroy/build-scripts-of-ffmpeg-x264-for-android-ndk ),
* I managed to run the game on my android 7.1, an 4.4.2 and a very old 4.1 (needed some extra hacks to get it running and the game is very slow ;) )
* I'll probably take a break from coding this for a few days,
* vcmi's repository.json is broken and can't be parsed without some non-strict mode (missing commas),
* I tried adding WoG and I think it worked correctly (didn't try to play a lot, but generated the map and didn't crash),
* RMG takes a very long time,
* Higher resolutions should work, but the game is noticeably slower,
* Few times I encountered the problem where the game wouldn't start (both client and server were ready, last thing in the logs are successful autosave, then the game just idled on the loading screen and didn't move to the game),
* I'm probably not the best guy to handle contributions/requests etc and don't really plan to make extensive use of github, so if you want I can add you as owners of the repo or whatever (not sure how, but I assume it's possible).
* I tried to gather are configurable paths into one place (vcmiconf.in), but of course there's a possibility that I forgot about some of them... so if you find some hardcoded absolute paths then let me know ;)
* I think that vcmi like to randomly (?) remove my settings from settings.json reverting selected screen res/codepage (possible during a crash?)
* this is the first time I've ever used python, so not sure about scripts quality ;)

SXX - 2016-11-24, 02:30

Fay wrote:
* I'm probably not the best guy to handle contributions/requests etc and don't really plan to make extensive use of github, so if you want I can add you as owners of the repo or whatever (not sure how, but I assume it's possible).
One thing we must decide on is where to store build scripts and configuration.

From one point it's would be handy to have it in main repository too since then we can at least cover develop itself with Travis builds for Android (no reason to check it for pull requests since they took long enough already).

In same time I not sure how to make it all clean. ;-)

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

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

SXX - 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 - 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 - 2016-11-25, 23:43

If I understand correctly - in android version there's possibility to enable/disable mods in launcher?
Povelitel - 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.

Kiiro Yakumo - 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.

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

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

Fay - 2016-11-27, 13:10

Added updated version.
https://github.com/Fayth/vcmi-android/releases/download/2/vcmi-api16-20161127-debug.apk
https://github.com/Fayth/vcmi-android/releases/download/2/vcmi-api21-20161127-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

Quote:
Here logcats for resolution selection crash and black screen
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 <unknown> 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?

Quote:
The screenshot may be a bit blurry because of 800x600 or something...I guess?
Probably. If you have full hd phone then everything is upscaled almost 2x.

Quote:
The game loaded, I just can't do a thing
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.
SXX - 2016-11-27, 14:32

Fay wrote:
Quote:
The game loaded, I just can't do a thing
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.

Povelitel - 2016-11-27, 15:14

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

Kiiro Yakumo - 2016-11-28, 10:55

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(?) :P

SkyRE - 2016-11-29, 10:06

vcmi-api21-20161127-debug.apk - Does not installing. Android 5.0.1
Fay - 2016-12-02, 17:19

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)

https://github.com/Fayth/vcmi-android/releases/download/3/vcmi-api16-20161202-debug.apk
https://github.com/Fayth/vcmi-android/releases/download/3/vcmi-api21-20161202-debug.apk

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

Kiiro Yakumo - 2016-12-08, 21:35

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 :)
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 :P
- Save/Load no problems for now.
- Text boxes done well, I will add one as a proof later :)
- More info to come if I find something

Povelitel - 2016-12-10, 15:23

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.

SkyRE - 2016-12-12, 21:17

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.

Kiiro Yakumo - 2016-12-17, 18:10

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.
misiokles - 2016-12-18, 12:17

It's better to purchase GoG version of Heroes3 Complete and this version should be basic.
https://www.gog.com/game/...omplete_edition
Promotions of this title are set regullary!

SkyRE - 2016-12-27, 22:10

misiokles wrote:
It's better to purchase GoG version of Heroes3 Complete and this version should be basic.
https://www.gog.com/game/...omplete_edition
Promotions of this title are set regullary!
That version also works badly same as mentioned mine version previously.
HarryPhoon - 2017-01-06, 10:22

Hey, just got back to HoMM again.

Downloaded the 21 API version on my Asus Nexus (2013). And the game works just fine in terms of not crashing. But when using bad resolution (screen ratio) there are artifacts between the game screen itself and the edges of the screen. There should be placed some kind of static image. Gonna write after some time if it doesn't crash after longer play ;-) .

I'm using the gog complete version with some update installed.

EDIT: So, after few weeks the game works without any problems. But performance needs a serious tweak. The flaw of performance is very noticeable while hero walk and gathering (fade effect). Loading takes an eternity (H3 itself and game). And when playing with 6 AI players their turns take takes totally something over minute or two.

Tooandorisu - 2017-01-07, 18:57

Is there any way to use the mods for vcmi?
misiokles - 2017-01-08, 11:23

You must edit modSetting.json file and there enable/disable mods (I guess).
Robin - 2017-01-09, 09:30
Post subject: how to compile the code please?
I read the post about Android and download the code of xyz from git. i am NEW developer of android. do we have document about how to build vcmi on Android please? i tried to build IT with vs2015 android,but failed.

does anyone can add the guidance to wiki please?

Fay - 2017-01-12, 11:34

Sooo I'm still alive and do plan to continue working on this, but not sure when (probably not very soon).

Quote:
The intro is still laggy when trying to skip but meh with it, it's just intro.
This is the same behaviour as desktop version, but it's less noticeable because it loads much quicker. Basically app tries to load all data during intro on a separate thread, but when you skip intro, the main thread waits for the loading so it gets blocked until everything is loaded. This should be changed but it's more on vcmi-side than android fix.

Quote:
The walking on the map is choppy as hell but it works at least so I'm not complaining.
I didn't check this, but I can confirm that movement animations don't really work for me neither. From what I remember, heroes movement looks very complex and I don't really want to mess with it. ;)

Quote:
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.
Do you know if this was somehow solved in xyz's version? Probably the most "intuitive" solution would be to use long-press as right click. This would require to add "proper" touch controls support. It would probably require a lot of changes in vcmi, because application assumes mouse input everywhere.
The only easy way to implement it that I can see atm is to add an ui element outside of the game that would cause next press to be treated as right-click. It definitely would be very inconvenient to use.

Quote:
- Clicking certain point is sometimes tricky
Pinch-to-zoom adventure map would be cool, but again, needs proper touch controls support. And possibly also changes to map drawing (as far as I remember, scaled drawing was much slower in SDL).

Quote:
But when using bad resolution (screen ratio) there are artifacts between the game screen itself and the edges of the screen
Didn't notice it on my side... I'm not sure if I can do anything there, because the whole surface is managed by SDL. Might be worth to check it.

Quote:
Is there any way to use the mods for vcmi?
After the app initializes the first time, you can put the mods in <app-root-folder>/Mods (the same folder where you put game data), the start the launcher and you should be able to turn them on/off in the mods section.
val-gaav - 2017-01-12, 18:20

Fay wrote:
Do you know if this was somehow solved in xyz's version? Probably the most "intuitive" solution would be to use long-press as right click. This would require to add "proper" touch controls support.

As far as I remember in some early VCMI Android version I tried to play on a tablet right click was taken care of by SDL Android port setup. So right click should be taken care of by SDL itself and doesn't need extra coding.

I think by default it worked as double touch= right click but I quickly changed it to more preferable hold volume up + touch = right click.

HarryPhoon - 2017-01-22, 23:57

Quote:
Quote:
But when using bad resolution (screen ratio) there are artifacts between the game screen itself and the edges of the screen
Didn't notice it on my side... I'm not sure if I can do anything there, because the whole surface is managed by SDL. Might be worth to check it.


I didn't meant exactly artifacts but it's part of the game screen that disturbs a bit. And when I click the lower half on the left flickers. Attached some screenshota. The game runs in 800:600.

https://postimg.org/image/7iqhvhl4z/
https://postimg.org/image/bz99713ct/
https://postimg.org/image/6v04032yv/

Kiiro Yakumo - 2017-02-21, 20:47

Quote:
This is the same behaviour as desktop version, but it's less noticeable because it loads much quicker. Basically app tries to load all data during intro on a separate thread, but when you skip intro, the main thread waits for the loading so it gets blocked until everything is loaded. This should be changed but it's more on vcmi-side than android fix.

Oh~! Sneaky 3DO, pretending it's just an intro :P
Well if it's not bug per se, I have no objections here.

Quote:
I didn't check this, but I can confirm that movement animations don't really work for me neither. From what I remember, heroes movement looks very complex and I don't really want to mess with it. ;)

No objections here either, they work at least, so let's not shout too much or they will get shy and stop working *cough* XD

Quote:
Do you know if this was somehow solved in xyz's version? Probably the most "intuitive" solution would be to use long-press as right click. This would require to add "proper" touch controls support. It would probably require a lot of changes in vcmi, because application assumes mouse input everywhere.
The only easy way to implement it that I can see atm is to add an ui element outside of the game that would cause next press to be treated as right-click. It definitely would be very inconvenient to use.

Unfortunatelly I don't know how it was done in xyz's version. I don't know how it looks in code-side but if I may give some ideas:
- Another button like you mentioned, a fine idea, maybe inconvenient but better than nothing.
- Double tap, not sure if it wouldn't mess with normal controls, sometimes in Android games it works, sometimes not.
- Two-finger tap, that could be very tricky, but another possibility.
- A joke idea, code the mouse through USB, aka Smartphone <-> USB-special-cable-plug <-> USB Mouse, in theory it would work, but come on xD
Other than that, no objections here.

Quote:
Pinch-to-zoom adventure map would be cool, but again, needs proper touch controls support. And possibly also changes to map drawing (as far as I remember, scaled drawing was much slower in SDL).

Now I think about it, what if half of the problems are resolution-induced stuff? hmmm...

Quote:
I think by default it worked as double touch= right click but I quickly changed it to more preferable hold volume up + touch = right click.

Oh ye~! That would be nice too, Vol Up/Down and stuff...

SomeGuy147 - 2017-03-06, 21:53

Just tested previously posted API16 and API21 builds and to my surprise both worked quite well, I am on Android 7.0, OxygenOS 4.0.3, OnePlus 3T, game version is from GOG. Few things did irk me though:

  • While intro plays perfectly well, there is some significant lag after skipping it, like solid 4-8 seconds. Didn't happen at all with xyz's version but hey, that one instantly crashes when trying to load a game from the menu so what do I know.
  • The way controls are implemented seem awful to me, I much more preferred xyz's way of doing things, he made so your finger upon touching the screen would act as a mouse and controlled the cursor in that way which was really accurate and felt pretty good. If you're still wondering the way he made right click work was that if you had one finger on the screen dragging the mouse around and put a second one anywhere it would instantly stop and hold right click. It's really intuitive and is easy to figure out even if you don't know it beforehand.
  • I know it was in the second point but for the love of god implement right click in some way
  • Resolutions higher than 1280x768 might as well not exist for phones since stuff gets ridiculously small and hard to see, but I am guessing you can't fix this without redrawing everything.
  • Whole menu, loading, displaying maps and that stuff in general is significantly laggier and slower than xyz's version.
  • After you choose your options and start the game there is like 1/10 chance a random very slim flashing bar appears on the very right of your screen, no idea what the hell could that be about. Just something I noticed, doesn't really impact gameplay in any significant way.
  • I know you said that the hero movement coding is complex and you don't wanna mess with it but if you could find a way to fix it, it would make the game nearly indistinguishable from the desktop version, could easily be an android store release if you'd do that.

That's it for now, still hadn't had the chance to properly test it all out but will prob often turn it on when I have free time and report if I see anything acting up. Thanks for making this btw, really cheered up my day, hope you don't give up on the development, wish I could help in some way.

Fay - 2017-03-11, 22:00

@SomeGuy147 Most of the differences probably come from the fact that xyz used unofficial sdl 1.2 port (https://github.com/pelya/commandergenius) and I used official sdl 2.0.

I installed xyz version to check how it works because I haven't seen it for a very long time. I don't have any old devices on me to check in-game, but menus worked correctly. So...

Quote:
While intro plays perfectly well, there is some significant lag after skipping it, like solid 4-8 seconds. Didn't happen at all with xyz's version but hey, that one instantly crashes when trying to load a game from the menu so what do I know.
I think that in xyz's version, actual loading is done before the intro starts (splashscreen + some black screen afterwards). Ideally I just need a change that doesn't freeze the main thread after skipping intro. Optionally displaying a progress bar in that case. It would look "correct" then. This shouldn't be too hard, but again, I'm slightly hesitant to change vcmi code too much because it makes merging the changes harder.

Quote:
The way controls are implemented seem awful to me, I much more preferred xyz's way of doing things, he made so your finger upon touching the screen would act as a mouse and controlled the cursor in that way which was really accurate and felt pretty good. If you're still wondering the way he made right click work was that if you had one finger on the screen dragging the mouse around and put a second one anywhere it would instantly stop and hold right click. It's really intuitive and is easy to figure out even if you don't know it beforehand.
This input handling is done in SDL port. Feels quite good and I thiiink I could port it. (few weeks ago I added a bandaid method to send right-clicks through extra button in gui, but this would probably work better).

Quote:
Resolutions higher than 1280x768 might as well not exist for phones since stuff gets ridiculously small and hard to see, but I am guessing you can't fix this without redrawing everything.
Well, tablets have bigger screens so I assume it could be used there.

Quote:
Whole menu, loading, displaying maps and that stuff in general is significantly laggier and slower than xyz's version.
Probably nothing I can do. Either SDL2.0 is more CPU-heavy than SDL1.x, or VCMI 0.99 needs more resources than 0.97 (or both).

@Kiiro
Quote:
Oh~! Sneaky 3DO, pretending it's just an intro
I meant desktop vcmi version, not OH3. No idea how resources are loaded in the original. ;)

@HarryPhoon
Yeah, basically "random" stuff from memory is displayed outside of the 4:3 game screen area. This is definitely a problem in SDL, because the app itself doesn't even know if the bars are present. It might be fixable.

Edit next day ~ okay, so I added right-click support + changed intro so it looks better. I might build/upload apks later today.

SomeGuy147 - 2017-03-12, 17:37

Fay wrote:

This input handling is done in SDL port. Feels quite good and I thiiink I could port it. (few weeks ago I added a bandaid method to send right-clicks through extra button in gui, but this would probably work better).

Edit next day ~ okay, so I added right-click support + changed intro so it looks better. I might build/upload apks later today.

Awesome, just wondering though, are you gonna try fixing movement animations at some point, or will you leave it as it is?

Fay - 2017-03-12, 23:17

I'll try to build apks tomorrow. I tried to do it, but currently the app seems to crash on older devices (and it looks like some android build system bug).

I've done some testing on the movement animations/logic. I think that the issue here is that
1. movement logic uses some custom/manual rendering loop (with manual frame delays etc); I'm not sure if that's a problem but certainly the rendering hero movement works differently that all other rendering
2. there are lots of full map redraws during the movement and android can't really keep up.

I made a small change/hack (basically added a frameskip during movement rendering so that it doesn't do full redraws every frame) which helped (at least on my phone). I wouldn't call it smooth, but definitely looks better than previously.

Warmonger - 2017-03-13, 06:44

Quote:
2. there are lots of full map redraws during the movement and android can't really keep up.

Yes. In fact I tried to remove map redraw altogether, but it lead to some crashes - couldn't figure out why. Probably only original author knows why it's implemented this way :-/

Jendrus - 2017-03-13, 16:52

Could someone explain to me instalation step by step? What i must download? api16 or api21?
Fay - 2017-03-13, 23:26

Quote:
What i must download? api16 or api21?
api21 is for android 5.0+. If you have 4.1-4.4.x, you can only use api16. "Installation" instructions should be displayed in the launcher, but rough description is in the post with the first version http://forum.vcmi.eu/viewtopic.php?p=15731#15731

Quote:
Yes. In fact I tried to remove map redraw altogether, but it lead to some crashes - couldn't figure out why. Probably only original author knows why it's implemented this way
Maybe it would be possible to change these forced full redraws into partial draws (redrawing only hero tiles + neighbors(?)) because nothing except hero animation changes there. I might try looking into it (at some point).

--

Sooo I built new packages, but they're quite weird this time and I'm not sure if they work correctly (honestly, compiling them feels very random). It works correctly on my 7.1 device, but I was unable to start the app on any emulator (tested on three different ones and each one is broken in a different way...). I don't know, I might need to downgrade sdk/ide or something if it doesn't work for others.

If you feel lucky, you can try it.
https://github.com/Fayth/vcmi-android/releases/download/4/vcmi-api16-20170313-debug.7z
https://github.com/Fayth/vcmi-android/releases/download/4/vcmi-api21-20170313-debug.7z

Changes:
* right-clicking support (two modes, switchable in launcher; personally, after some testing I find relative cursor very weird but I'll leave it there),
* intro doesn't appear frozen anymore (after interrupting intro, screen is cleaned + progressbar is displayed); this might also possibly fix HarryPhoon's problem with artifacts on the sides, buuut I don't know,
* hack that might make hero movement animations slightly smoother.

Alextk69 - 2017-03-14, 06:58

Fay wrote:
If you feel lucky, you can try it.
https://github.com/Fayth/vcmi-android/releases/download/4/vcmi-api16-20170313-debug.7z
https://github.com/Fayth/vcmi-android/releases/download/4/vcmi-api21-20170313-debug.7z


I just updated from the previous version of vcmi that I had and everything went smooth. On my device, Lenovo P2 with Android 6.0.1, the game works absolutely amazing. The right click is working very well and the hero movement is so smooth now. I've played for a few minutes with no crashes and bugs at all. Thanks for the excellent release, Fay!

SomeGuy147 - 2017-03-14, 19:57

Fay wrote:

Changes:
* right-clicking support (two modes, switchable in launcher; personally, after some testing I find relative cursor very weird but I'll leave it there),
* intro doesn't appear frozen anymore (after interrupting intro, screen is cleaned + progressbar is displayed); this might also possibly fix HarryPhoon's problem with artifacts on the sides, buuut I don't know,
* hack that might make hero movement animations slightly smoother.

Few things I noticed:

  • Relative cursor mode doesn't seem to work very well, literally disappears after trying to press right click and you can move it off screen as much as you want, to the point where you completely lose it, thanks for adding it so fast though, if you're gonna fix it and don't mind working a bit more on it add sensitivity too, would be useful.
  • While intro seems much nicer now it seems to take longer time to load (might be just a psychological thing) and the sound of it disappeared (Actually now that I think about it, it may have not ever been there, if so dismiss this one), not something essential to the game but I think it worked previously.
  • Right clicking is pretty nice, takes a few clicks initially to get used to since one of your fingers always cover the information table but just moving fingers while you don't have them released solves the problem.
  • Walking seems a little bit smoother now, but further optimisation would go a long way.


Will edit if I find more stuff, thanks for the update! Oh also meant to ask, are there any performance differences between 16 and 21 API versions? And if not, what's the point of making two different ones? Also why does this update take up three times as much space compared to the last one?

Fay - 2017-03-18, 14:41

Quote:
Relative cursor mode doesn't seem to work very well, literally disappears after trying to press right click and you can move it off screen as much as you want, to the point where you completely lose it, thanks for adding it so fast though, if you're gonna fix it and don't mind working a bit more on it add sensitivity too, would be useful.
Okay, you're right. That's because I wanted to do it without adding more java<=>c communication so I didn't have any reliable info about an actual cursor position and had to guess sometimes. I changed it to get the cursor directly from SDL an it works substantially better. Still can go offscreen though; not sure if I can limit it to actual game bounds.

Quote:
While intro seems much nicer now it seems to take longer time to load (might be just a psychological thing) and the sound of it disappeared (Actually now that I think about it, it may have not ever been there, if so dismiss this one), not something essential to the game but I think it worked previously.
The only things I changed there is clearing screen + displaying progressbar. Definitely nothing that could affect the loading speed.
I'm not sure about the sound because I always have it turned off. If it was there previously, it should still be there.

Quote:
are there any performance differences between 16 and 21 API versions? And if not, what's the point of making two different ones?
Okay, so the short answer is "it's complicated". ;) I could probably get away with building only one package. I'm not sure about some details but generally:
* android device can have one of 5 architectures (arm, arm-v7a, arm64-v8a, x86, x86_64); 64-bit ones require api21 (android 5.0+) and I think x86 needs api18 (android 4.3+),
* all arm-based archs should work "normally" with applications built for normal arm, but x86-based devices will probably not,
* I assume when the arch doesn't match, the performance is works becuse there needs to be some translations,
* running arm application on 64-bit device is probably the similar case as running 32bit applications on 64bit pc (slower, more limited, but usually not really noticable).

Currently the api16 package contains only arm arch and api21 contains all 5.

Quote:
why does this update take up three times as much space compared to the last one?
Because, for some reason, the apk file has no compression. I assume this is some kind of bug in android build system, because I can't see any settings to change it and previously it was compressed normally. You can test this by unpacking the apk file (it's just a zip) -- both packages have ~313MB after unpacking.

Quote:
I just updated from the previous version of vcmi that I had and everything went smooth. On my device, Lenovo P2 with Android 6.0.1, the game works absolutely amazing. The right click is working very well and the hero movement is so smooth now. I've played for a few minutes with no crashes and bugs at all. Thanks for the excellent release, Fay!
:)

I wrote:
Maybe it would be possible to change these forced full redraws into partial draws (redrawing only hero tiles + neighbors(?)) because nothing except hero animation changes there. I might try looking into it (at some point).
Actually... never mind. That's definitely not possible, because the screen follows the hero during movement.
fervi - 2017-03-21, 10:16

VCMI4Droid working nice, but performance on Galaxy Note 2 sucks. Ofc. game is playable :P

Fervi

Fay - 2017-05-15, 20:44

Another release. Yay.

https://github.com/Fayth/vcmi-android/releases/download/5/VCMI-1.4-api21-20170515-release.apk (160MB)
https://github.com/Fayth/vcmi-android/releases/download/5/VCMI-1.4-api21-20170515-release.apk.7z (the same file as above but 40MB)

Some technical changes:
* the biggest change (but not very important from the player's perspective) is that I gave up on gradle-experimental build and returned to stable gradle (+external cmake), because it felt really unstable and required some nasty hacks to work "correctly"; additionally I changed ndk to newest version (r15 b1) and replaced libc++ with gnustl, because it's more stable and "default" in ndk
* at the moment, due to the previous point, the application doesn't work correctly on armeabi (compiler crashes during SDL build) or api <21 (runtime crashes, probably due to some boost<>ndk conflicts); oh well, according to google, ~70% of phones are 5.0+ already; I'll be monitoring ndk/gradle updates, hopefully it gets fixed at some point
* you need to uninstall previous version before installing this one (different app signing because of release mode and stuff)
Functional changes:
* everything is compiled in release mode and should work much quicker (haven't played enough to see big difference in-game, but app startup on my phone was ~12s previously and is ~3s in this version)
* app should no longer crash/hang when it goes into background or screen is turned off (hopefully),
* due to the fact that android can kill application in background at any time it wants to, vcmi now tries to make autosave when the app is about to be killed (_Android_Autosave file); not guaranteed to work, because it's not very elegant solution for now,
* better relative cursor mechanics (as discussed in previous posts) + relative pointer speed multiplier setting in launcher,
* added adventure map swipe support (as an alternative to relative pointer); doesn't feel very smooth but should be functional (launcher -> pointer mode -> "normal with map swipe")
* added sound/music settings in launcher (because it's irritating that these can't be changed right away after starting the game ;) ),
* launcher should correcly preserve all vcmi config settings (previously launcher would drop settings that it didn't understand (everything except resolution and codepage))
* back button should now work like alt+f4 (closes app if in menu, displays exit confirmation if in-game)

Warmonger - 2017-05-15, 20:58

Awesome!

Can you post it on Google Play? Did you try to contact xyz recently?

Fay - 2017-05-15, 21:33

I don't have any private google dev account so I can't. I could provide an unsigned package if anyone wants to put it there (or provide signing info to vcmi team). I never really contacted xyz.
SXX - 2017-05-16, 13:02

Warmonger wrote:
Can you post it on Google Play? Did you try to contact xyz recently?
I registered developer account in Google Play for that purpose and paid fee some time ago.
I'll try to contact XYZ and ask if he can transfer package ownership to me.

PS: I sent developer console invites to Fay, Warmonger and AVS.

Also sent Slack invite to xyz and hopefully he can help us. Shouldn't be too hard:
https://support.google.com/googleplay/android-developer/answer/6230247?hl=en
And of course I sent to to xyz to in case he need some account credentials for transfer.

SXX - 2017-05-16, 15:11

Ok. @xyz sent request to transfer app to my developer console.
There also signing keys for app that I'll need grant to Fay.

Fay - 2017-05-16, 16:45

Okay, I accepted the invitation.

Things to consider:
* I'm not very good with legal stuff, but I'm pretty sure I'll need to add some info about 3rd party libraries and possibly a privacy policy as well (google has recently become way more strict about it)
* keep in mind that the app is currently build against vcmi/develop (b7a19fd); wouldn't it be better to wait for stable version?
* I didn't test the last version extensively (only my device + few emulators) so it's hard to say if it works correctly everywhere

If we plan to update the existing app, it becomes more complicated.
* app will still need to use id "is.xyz.vcmi" -- I'm pretty sure it's not possible to change it for already-published apps
* at the moment I'm not certain what to do about the update process; I use slightly different way of handling OH3 data files so the new app won't detect previously added files

SXX - 2017-05-16, 17:10

Fay wrote:
Things to consider:
* I'm not very good with legal stuff, but I'm pretty sure I'll need to add some info about 3rd party libraries and possibly a privacy policy as well (google has recently become way more strict about it)
I'll try to look into it and and ping some Android developers I know and in IRC.

Fay wrote:
* keep in mind that the app is currently build against vcmi/develop (b7a19fd); wouldn't it be better to wait for stable version?

No good answer for this. One important point: is all code changes merged in develop?
If no this is what you need to start with. We'll also benefit if you join our organization on github and move build system repository here.

And for building stable version I really not sure if it's worth to wait since this would be quite long waiting probably. Like I wish to have tons of time to test and merge everything, but I only have so much... :-(

In same time we don't have any working version for Android at all so I don't think we'll make it worse.

Fay wrote:
If we plan to update the existing app, it becomes more complicated.
* app will still need to use id "is.xyz.vcmi" -- I'm pretty sure it's not possible to change it for already-published apps
Is that a problem at all? I don't think anyone care what package name is and if xyz going to get some weird credit for his previous work that not problem too.

Fay wrote:
* at the moment I'm not certain what to do about the update process; I use slightly different way of handling OH3 data files so the new app won't detect previously added files
That's better to be solved one way or another.

Is there any way to detect when application was updated from older version? If there is then it's would be enough to notify users who updated it that path files changed and they need to move assets. I doubt anyone seriously playing older version since it's wasn't really playable at time, many might have it installed.

SXX - 2017-05-16, 17:14

Also once we get new version I want owner of this one to get it unlisted:
https://play.google.com/store/apps/details?id=eu.vcmi&hl=en
Or if he agrees he can transfer ownership too. Then we could update it once and suggest to install another app instead and then unlist it so it's not confusing anyone.

Fay - 2017-05-16, 18:15

Quote:
Quote:
* I'm not very good with legal stuff, but I'm pretty sure I'll need to add some info about 3rd party libraries and possibly a privacy policy as well (google has recently become way more strict about it)

I'll try to look into it and and ping some Android developers I know and in IRC.
Well, technically I am an android dev. :P
3rd party licenses definitely should be placed somewhere in the launcher.
Don't know about policy, because vcmi doesn't really do anything with user data -- the only thing that could qualify is probably sdcard reading/writing.

Quote:
is all code changes merged in develop?
Do you mean my changes in vcmi? Currently they're here https://github.com/Fayth/vcmi/tree/android-support -- I can start a pull request to vcmi/develop if that's what you mean... probably not today though. I tried to wrap all android-specific logic in VCMI_ANDROID define so hopefully the won't be any problems, but currently I don't have any environment installed to check if the desktop version complies correctly.

Quote:
We'll also benefit if you join our organization on github and move build system repository here
Sure. I think it's a good idea that vcmi team has the ownership over this.

If you feel that the current vcmi/develop version is stable enough to be published then there's no problem on my side.

Quote:
Quote:
* app will still need to use id "is.xyz.vcmi" -- I'm pretty sure it's not possible to change it for already-published apps

Is that a problem at all? I don't think anyone care what package name is and if xyz going to get some weird credit for his previous work that not problem too.
No technical problems. Only the fact that google suggests that your app's id should reflect the domain that you own. But it's not really a problem, because it's not a hard rule, just a guideline.

Quote:
Is there any way to detect when application was updated from older version
No built-in mechanism. Usually apps just save previously launched version number and check it on startup.
In our case, we should probably try to detect datafiles in the old location and move them if possible. Should be doable.

SXX - 2017-05-16, 18:48

Fay wrote:
Don't know about policy, because vcmi doesn't really do anything with user data -- the only thing that could qualify is probably sdcard reading/writing.

Sadly this is something I have like zero idea about so all I can do is just google it.

Fay wrote:
Do you mean my changes in vcmi? Currently they're here https://github.com/Fayth/vcmi/tree/android-support -- I can start a pull request to vcmi/develop if that's what you mean... probably not today though. I tried to wrap all android-specific logic in VCMI_ANDROID define so hopefully the won't be any problems, but currently I don't have any environment installed to check if the desktop version complies correctly.
Just create pull request and Travis will compile it. ;-)

We'll also be able to find if there something need to be fixed.

Fay wrote:
Sure. I think it's a good idea that vcmi team has the ownership over this.

Welcome to team! If seriously we obviously not give everyone access to main repository since not everyone actually need them, but I think github have teams inside organizations so there no problem to invite you and then let you control repositories you want and non-develop branch.

Warmonger / AVS might need comment on this though since I don't have full permissions on github.

Fay wrote:
If you feel that the current vcmi/develop version is stable enough to be published then there's no problem on my side.
I don't think it's stable, but it's far better than 0.97 for sure.

Fay wrote:
No technical problems. Only the fact that google suggests that your app's id should reflect the domain that you own. But it's not really a problem, because it's not a hard rule, just a guideline.
I think they forgive us. Or we could ask for ownership over other package later that in fact represent our domain.
AVS - 2017-05-17, 02:31

VCMI Organization membership give no additional access, only Teams do and on repository level. There is no way to control access to individual branches

@Fay I`ve sent invitation

SXX - 2017-05-17, 07:25

AVS wrote:
VCMI Organization membership give no additional access, only Teams do and on repository level. There is no way to control access to individual branches
There is. GitHub allow to limit pushes to protected branches from certain teams:
https://help.github.com/articles/about-protected-branches/

So for instance we can let Fay to keep Android-specific changes in main repository branch even without giving develop (protected branch) push access. Of course we can also just ask nicely to not push directly anything unless it's absolutely obvious and tested fix.

Fay - 2017-05-17, 21:39

Okay, so I accepted the invitation and created the pull request.

Currently I can't transfer the launcher project, because "You don’t have the permission to create repositories on vcmi".

SXX - 2017-05-17, 22:59

Fay wrote:
Currently I can't transfer the launcher project, because "You don’t have the permission to create repositories on vcmi".
I suppose you need permissions to create repositories.

BTW I also need it since I want to upload server configuration to github organization.

AVS - 2017-05-18, 02:32

Repository creation should be allowed now.
SXX - 2017-05-18, 17:36

@Fay
Another thing I want to request once you have free time for that.
Try to setup Android build for Travis CI, it's will be really helpful.

Fay - 2017-05-20, 10:40

I transferred the launcher repo to vcmi ( https://github.com/vcmi/vcmi-android ).

I can look at the CI config after android support pull request is sorted out.
In theory it should be possible to automate the build without much problem (because it already works kinda automatically via the python script), but at the moment I'm not sure what I need to specify there. Anyway, I will check that out.

Tooandorisu - 2017-05-21, 12:23

Maybe a long shot, but dailies for android build?
SXX - 2017-05-21, 15:51

Tooandorisu wrote:
Maybe a long shot, but dailies for android build?

This is one of two reasons why we need CI. Since we now have plenty space to host them there will be at least builds for Windows and OSX from Travis.

Fay - 2017-05-22, 21:42

Okaaay, so after reading a bit about travis, I added an experimental config to https://github.com/vcmi/vcmi-android/blob/master/.travis.yml -- it's most likely broken, but at the moment I have no clue how to check if it's correct ( https://lint.travis-ci.org/vcmi/vcmi-android says it's syntactically valid, but I can't really check anything more).
https://travis-ci.org/vcmi/vcmi-android says that travis is not enabled for this repo so I think you need to turn it on manually to check?

Btw, android app on master should compile/work correctly on android 4.1+.

AVS - 2017-05-23, 10:27

I`ve enabled travis for "vcmi-android ". Next commit there should trigger build.
Fay - 2017-05-23, 19:54

Okay, I tinkered with it for some time, but have to give up for today.
I think I'm past "obvious" errors already, because travis starts actual cmake build. Hopefully not much left until it builds correctly, because there errors are killing me. :P

SXX - 2017-05-23, 20:01

Might be will be able to check whats wrong in few days.
If build starts then dependency hell shouldnt be so much of a problem.

Fay - 2017-05-23, 20:23

I'll probably be able to continue working on it tomorrow. But if it's still broken after few days, you'll be welcome to help. ;)
Fay - 2017-05-24, 07:56

Build passed. I can't really verify atm if everything is correct, but at least it finished and is all green now. ;)
SXX - 2017-05-24, 23:11

Great! Once I fix urgent "let's remove user home directory" bug I'll try to setup deploy from Travis to our new daily build server. :-)
Fay - 2017-05-25, 22:38

Quote:
at the moment I'm not certain what to do about the update process; I use slightly different way of handling OH3 data files so the new app won't detect previously added files
Okay, I managed to detect the data path from previous version and migrate Data, Mp3, Saves and Maps folders and config/settings.json file. I decided to skip Mods folder though (I think it could cause problems aaand it would take more time to implement).

Edit ~ actually, the saves probably aren't even compatible with current version, so probably they shouldn't get migrated...

Quote:
Great! Once I fix urgent "let's remove user home directory" bug I'll try to setup deploy from Travis to our new daily build server.
Feel free to mess with the travis file. ;)
If you need it, generated artifacts should be in ./project/vcmi-app/build/outputs/apk/*.apk

There are still some (minor) things to solve for daily builds. Currently travis builds only one configuration (debug, api16+, armeabi-v7a). I think that ideally 2 packages should be created (release,api16,armeabi-v7a and release,api21,all abis). Changing the build to 2 packages is probably a matter of fiddling with travis config (+ less hardcoding in ./travis-extras/vcmiconf.json.in) and to build release package, we would need to add some "fake" signing to repo.

SXX - 2017-06-04, 14:32

Two question regarding Android build. First of all I want to start use std::atomic. Is it working fine with NDK?

Also there is scary comment about NO_STD_TOSTRING. I see replacement provided enough convert unsigned short int to std::string, but what about other types? I suppose we shouldn't use it right?

Fay - 2017-06-04, 17:55

It's hard to say exactly what works correctly and what doesn't. Atomic should work, I used it for client/server synchronization.

More explanation about ndk features was in the PR for vcmi android support: https://github.com/vcmi/vcmi/pull/299/files/fb42c1447b28c9a0f209c4924094a672b88e8e38#diff-e59f7a526b7f2ab4f825d4499d876728 .
Full support of standard lib in ndk should come "soon". E.g. according to https://github.com/android-ndk/ndk/issues/82 this is in development and currently planed for ndk r16 (which, I think, should be available in july).

Quote:
I see replacement provided enough convert unsigned short int to std::string, but what about other types?
I'm not sure what you mean. The replacement should handle everything that can be put into stringstream.
SXX - 2017-06-14, 14:33

I tried to setup deploy for Android build, but for some weird reason It's not appear in my Travis account. Might be something wrong with my permissions, but I'm not sure. Also there few question related to Travis build and Android.

First of all what the deal with all those dependencies in repository? Is there way to download them from somewhere? If no and you pre-built them from scratch we could instead put them on our server and setup caching on Travis. Tell me and I'll give you SFTP account to upload them.

Another thing is APK naming. Travis allow to make builds by "cron" so my plan now is to use this feature so new Android builds from develop are created daily or at least when there are changes in develop. Though we also want to have builds when you change actual APK structure so I suggest that would be cool if you generate package name similar to what I did in develop and then store it in some environment variable, e.g like:
Code:
VCMI-{LAUNCHER_COMMIT}-develop-{DEVELOP_COMMIT}.apk

So there will be a way to add simple SFTP upload afterwards.

SXX - 2017-06-14, 14:38

And one more question: xyz originally didn't implement Qt launcher into package. Is there some reasons you didn't try to adopt it too?

Since it's you one maintain the code it's perfectly fine, but I still wonder what technical difficulties is there to use Qt application for that. I suppose launcher UI completely incompatible with phones, but that's not problem and can be rewritten. Mainly interested in this because I want to change mod distribution model and I wish we had one solution for all platforms.

Fay - 2017-06-14, 19:23

Quote:
First of all what the deal with all those dependencies in repository? Is there way to download them from somewhere? If no and you pre-built them from scratch we could instead put them on our server and setup caching on Travis. Tell me and I'll give you SFTP account to upload them.
What dependencies?
* FFMPEG/iconv are added as submodules, (additionally, binaries added to repo in ext-output folder)
* SDL2 is a submodule pointing to my fork of SDL (that has changes that allow resolving touches as left/right click correctly; also available as a binary in main project repo),
* SDL2 addons need to be added manually (because SDL uses hg instead of git if I remember correctly) -- also precompiled in the repo
* boost needs to be added manually (I guess we could add it as a submodule from https://github.com/urho3d/android-ndk.git -- currently I use this repo in travis build)
Can't think of any other dependencies.

Quote:
VCMI-{LAUNCHER_COMMIT}-develop-{DEVELOP_COMMIT}.apk
Should be possible. Not sure if it can be automated from inside the gradle build but I definitely can make a script that passes hashes from git to gradle build script (hash is already included in app (saved in generated java file during cmake)).

Quote:
xyz originally didn't implement Qt launcher into package. Is there some reasons you didn't try to adopt it too?
To be honest, I didn't check if it's possible and went for "normal simple android app" route. It seems that qt does support android ( http://doc.qt.io/qt-5/android-support.html ).
I'm not sure if it's possible to easily do qt+java app (android SDL port uses java).

SXX - 2017-06-14, 20:29

Fay wrote:
additionally, binaries added to repo in ext-output folder

It's exactly what I'm talking about. Is there reason you can't just download them within build process?
GitHub have 1GB soft limit and your repo already 168MB and it's just bad practice to store binaries in git.

So would be better if Travis would just download them from our server (if there no other way to get them) during build process. Then we can rewrite repository history with rebase so it's won't be 160MB. ;-)

Fay wrote:
Should be possible. Not sure if it can be automated from inside the gradle build but I definitely can make a script that passes hashes from git to gradle build script (hash is already included in app (saved in generated java file during cmake)).
If you can implement it to generate package with name like that it's would be great:
Code:
${TRAVIS_JOB_ID}-vcmi-${LAUNCHER_COMMIT}-develop-${DEVELOP_COMMIT}.apk
Once I find out why I can't access encryption key on Travis for vcmi-android I'll setup artifact uploading.

Fay wrote:
To be honest, I didn't check if it's possible and went for "normal simple android app" route. It seems that qt does support android ( http://doc.qt.io/qt-5/android-support.html ).
I'm not sure if it's possible to easily do qt+java app (android SDL port uses java).
Thanks. It's what I wanted to know.
Fay - 2017-06-14, 20:45

Quote:
So would be better if Travis would just download them from our server (if there no other way to get them) during build process.
Yeah, SDL addons would need to be either hosted somewhere and downloaded during build or mirrored on github and added as submodules.
Other than that, "./build.py fixpaths build-optional" should build all of the non-cmake libs.

I added them to repo because it makes building the project much simpler/quicker and these libs don't really need to be ever rebuilt unless we upgrade lib versions.

Keep in mind that ffmpeg takes quite a long time to build (around 20 mins per arch on my pc) + it needs to be checked if travis machines can handle asm out of the box (yasm).

Quote:
If you can implement it to generate package with name like that it's would be great
I should be able to do it tomorrow.
SXX - 2017-06-14, 21:09

Fay wrote:
I added them to repo because it makes building the project much simpler/quicker and these libs don't really need to be ever rebuilt unless we upgrade lib versions.

Keep in mind that ffmpeg takes quite a long time to build (around 20 mins per arch on my pc) + it needs to be checked if travis machines can handle asm out of the box (yasm).

Yep I understand why you added them to the when you tried to get it work. This is just something that need to be changed and if there are no "ready to use" binaries available in trusted source then we can just host our own, but certainly not on git.

If you can please generate SSH key and send me public part so I can provide you with SFTP access to special server where you'll able to upload all dependencies needed. ;-)

Fay - 2017-06-15, 15:21

Current repo version of launcher should create output apks with name [travis_job_id]-[launcher_git_sha]-vcmi-[vcmi_branch]-[vcmi_git_sha][-debug].apk. ("-debug" only in debug builds, travis job id only if there's such env variable, git-shas are first 7 chars).
SXX - 2017-06-15, 15:52

Thanks. Is there any reason you want to stick to certain VCMI commit? Can't you just build latest develop?

Asking since main reason to have Travis at all is to make sure we do not break building on Android.
Also I want Android builds to be generated and uploaded daily by Travis even when you're away.

Fay - 2017-06-15, 16:33

Quote:
Is there any reason you want to stick to certain VCMI commit? Can't you just build latest develop?
Do I? No idea. :P
.gitmodules just specifies develop branch, not specific commit.

SXX - 2017-06-15, 17:03

Oops, I certainly misunderstand reason for commit hash in GeneratedVersion.java.
Might be you can later just add current commit there.

SXX - 2017-06-16, 00:04

Ok I uploaded test branch there, but I still want to get rid of those "committed with" messages. :evil:

PS: It's looks like build works fine. :-)
Code:
/home/travis/build/vcmi/vcmi-android/project/vcmi-app/build/outputs/apk/243458287-vcmi-7609a0d-HEAD-fa02900-debug.apk


Also you can easily rewrite history on your own:
Code:
git rebase -i f92eec4c6af20783b08b4ba1c01f690a80bd01f0

Then set "edit" to first commit and once it's started:
Code:
git rm ext-output/* -r
git rebase --continue

And repeat many many times. :mrgreen:

AVS - 2017-06-16, 00:40

SXX, looks like you failed rebase process
SXX - 2017-06-16, 02:43

AVS wrote:
SXX, looks like you failed rebase process
No. There was failed build because I made it output find of every file and Travis consider log over 4MB as failure. So other than "commited by" it's looks fine and build passed.

Now I also fixed uploading, but we certainly need Release build instead of Debug.
Sadly it's still show horrible red screen on my device... :-(

SXX - 2017-06-16, 13:11

So I removed binaries from repository history:
Code:

$ du -hs ../BACKUP_ANDROID/vcmi-android/
301M    ../BACKUP_ANDROID/vcmi-android

$ du -hs ./vcmi-android
30M     ./vcmi-android

Can't yet push it since master branch is protected. :cry:

SXX - 2017-06-16, 14:36

Ok I made backup and force pushed it. Hopefully I won't break something for you. :-)
Fay - 2017-06-16, 15:39

Quote:
Oops, I certainly misunderstand reason for commit hash in GeneratedVersion.java.
Might be you can later just add current commit there.
GeneratedVersion was just meant to hold current vcmi version + git sha, but it doesn't update correctly (it's generated in cmake script and cmake sometimes uses cache instead of rerunning it -- I guess I could move it to gradle script since I added git sha checking there anyway).

Quote:
Also you can easily rewrite history on your own
Well, yeah. It always is confusing and usually I break stuff when rebasing. :P

Quote:
Now I also fixed uploading, but we certainly need Release build instead of Debug.
I think I should add some dedicated "release" singing keys to repo (either generate new ones or just reuse default android's debug keys because it doesn't really matter).

Quote:
Sadly it's still show horrible red screen on my device...
Hmm, I guess this is the issue: https://bugzilla.libsdl.org/show_bug.cgi?id=2291 . I can try adding one of the possible solutions to the repo.
SXX - 2017-06-16, 18:12

Fay wrote:
Also you can easily rewrite history on your own
Well, yeah. It always is confusing and usually I break stuff when rebasing. :P[/quote]It's even more confusing since I had to mess with reflog. Also I still have no idea how to make GitHub purge orphan originals. I suppose it's will remove them from reflog after default 2 week grace period, but we'll see.

Fay wrote:
I think I should add some dedicated "release" singing keys to repo (either generate new ones or just reuse default android's debug keys because it doesn't really matter).
If some signing it's the only difference in that case then I don't care personally. I was worried "debug" build going to have worse performance since it's might have some options disabled.

Fay wrote:
Hmm, I guess this is the issue: https://bugzilla.libsdl.org/show_bug.cgi?id=2291 . I can try adding one of the possible solutions to the repo.
If you can please do. I still wish to attempt test of cross-platform multiplayer.
Fay - 2017-06-16, 18:27

Quote:
If some signing it's the only difference in that case then I don't care personally. I was worried "debug" build going to have worse performance since it's might have some options disabled.

Debug does have worse performance and we should switch to release.

In debug mode gradle script automatically signs the package using "internal" android debug keystore.
For release build gradle by default doesn't sign the package and requires dev to specify "release" keystore (like I did with actual release vcmi keys in https://github.com/vcmi/vcmi-android/blob/master/project/vcmi-app/build.gradle#L149 (keeping them out of repo of course)). For release mode build on travis we need to specify some signing keys, but these can be any keys, including android "internal" keystore.

I'll do it later (maaaybe today).

SXX - 2017-06-16, 21:54

Yep in that case we certainly need release builds and obviously I'll prefer to not expose signing keys even on our server.

Also I tested multiplayer it's works flawlessly. Though Android client crashed in Linux Host + MXE Windows guest + Android guest game, but I expect this could be result of fact how it's loaded some extra mods or something.

PS: I also enabled daily build for your repository by Travis and added notifications to Slack.
Now we can track if we break building on Android all the time.

Fay - 2017-06-16, 22:01

I added possible fix for invalid colors here: https://github.com/Fayth/vcmi/tree/experimental/sdl-colors-fix (the only change is this ifdef block https://github.com/Fayth/vcmi/blob/experimental/sdl-colors-fix/client/CMT.cpp#L410 ). I'm not sure if you can somehow build it on your side or I should make a PR to develop?
SXX - 2017-06-16, 22:27

I think I could just cherry-pick it, but would be handy if you can add some argument to Android build scripts that Travis trigger. So in future we can just create new branch in vcmi-android with modified Travis config and it's will make build for us. ;-)

E.g like:
Code:
# Now we have
python3.5 ./build.py build-app
# But we can do
python3.5 ./build.py build-app HEAD
python3.5 ./build.py build-app develop
python3.5 ./build.py build-app experimental/sdl-color-fix

OR even better. Expose that argumnent and I'll implement travis script that let us trigger build by creating new branch in vcmi-andoid like:
Code:
buildForMe/feature/ambientSounds

And it's will build "feature/ambientSounds" branch from upstream.

SXX - 2017-06-16, 22:31

Also in future we can just make Android builds on every commit / branch / PR just like we do for Linux GCC, Linux Clang, MXE and Mac. Sadly that would take time to implement and I have tons of other tasks on project right now.
SXX - 2017-06-17, 00:42

Ok. For now it's set to only build "fa02900" commit from develop.
Please make it always build develop HEAD and also get rid of "internalData.zip".

SXX - 2017-06-17, 10:54

Now I just no longer sure git submodules is right tool for the task there.
So probably this need to be changed at least for Travis builds...

So I don't want to disrupt your workflow. Should we just implement cloning of actual VCMI develop instead of using submodule when it's build by Travis?

Fay - 2017-06-17, 13:30

I'm not very knowledgeable about more complex git stuff, so just go ahead if you see a solution. :)

Can we just add git commands to .travis.yml?
* switching to correct branch based on external param
* git pull in the submodules (but this might be not needed because switching to the branch should use latest commit?)

SXX - 2017-06-17, 14:46

I just not sure it's actually worth to use submodule in this situation. :-)
Probably I missing something, but most likely they not intended for that kind of use. E.g there no way to make git automatically grab latest commit. I'll check how we can solve this.

SXX - 2017-06-18, 23:34

Ok updated it and your patch actually fixed problem with red color on my device. Now only visual glitches I have is misplaced into video and some 1-2pixel line at bottom whee some weird white pixels could be flickering at times. I actually even managed to screenshot both line and intro glitch. I sent them through slack, please download one with line so you can see it. ;-)
SXX - 2017-06-18, 23:39

Also one question there. Is internalData actually override assets from VCMI directory? Like "config" directory.

I understand you wanted to include some mods that are not in repository here, but really we cannot ship "extraResolutions" to Google Play. I not sure, but it's might be made using H3 assets as source.

Other than that we'll need to find out how to ship default mods after I'll change how we distribute them.

SXX - 2017-06-19, 11:26

Ok I setup uploaded build processing for Android:
https://builds.vcmi.download/branch/develop/Android/

Fay - 2017-06-19, 16:42

Quote:
fixed problem with red color on my device
Yay. :)
(actually, this might need some confirmation if it doesn't break anything: the fix changes pixel mode chosen by gl to hardcoded RGB565 with 0 depth buffer)
Quote:
Also one question there. Is internalData actually override assets from VCMI directory? Like "config" directory.

I understand you wanted to include some mods that are not in repository here, but really we cannot ship "extraResolutions" to Google Play. I not sure, but it's might be made using H3 assets as source.

You can add a call to "python3.5 ./update_internal_assets.py" on travis and assets will be recreated. Basically internalData is zipped content of Mods and config on repo. (the update_internal_assets script also tries to pack ./../data/vcmi_submods folder, where I have templates + extra resolutions -- recreating assets on travis won't include them).
Edit ~ actually, some more explanations about overriding: I tried to organize the files like in the desktop version:
* "internal" data that normally is in executable folder is placed in private, application-scoped folder (unpacked from internalData when starting the application for the first time)
* "public" user data that normally is in "$appdata-like" location (config/settings.json, saves, maps etc) are in public folder that user can modify/delete

Downloading these submods on startup shouldn't be a problem (but we probably should ask the user if he wants to; I'm not sure how common users without data plans are ;) ).

Fay - 2017-06-19, 17:10

Quote:
Now only visual glitches I have is misplaced into video and some 1-2pixel line at bottom whee some weird white pixels could be flickering at times. I actually even managed to screenshot both line and intro glitch. I sent them through slack, please download one with line so you can see it.

@Intro: Do you mean that there's some unused space on the top/left? It looks the same for me AND these black margins are also present in the desktop version as well.
@bottom line: this will be much harder to debug. Honestly, this looks like some problem in SDL. Might also be connected to this post http://forum.vcmi.eu/viewtopic.php?p=15931#15931 where sdl displays random junk in the letterboxed space on the sides.

SXX - 2017-06-19, 22:38

Fay wrote:
Downloading these submods on startup shouldn't be a problem (but we probably should ask the user if he wants to; I'm not sure how common users without data plans are ;) ).
Problem is that we absolutely shouldn't include mods with unclear licensing to our Google Play packages. After all it's should be doable to rework them with free assets instead (extraResolutions at least).
Fay - 2017-06-20, 21:28

Yeah, I meant we can solve it like this:
* place these submods somewhere online,
* build android package without them (rebuilding internalData without submods),
* after starting the app for the first time (or basically any time when submods are not detected) ask user if he wants to download them -> download&unpack them to internal data folder.

Well, assuming that this method would be legally possible.

SkyRE - 2017-06-22, 20:15

Hello Fay,

Issues:
Doesn't load next scenario of campaign after showing introduction video of it. Hang on main picture - in my case third from http://forum.vcmi.eu/viewtopic.php?p=15931#15931.
Auto fight crashes VCMI right before showing results (creatures lost by attacker & defeater, ...). Does in release version, doesn't in latest develop.
Fight is something like "tap-action-tap-action-tap-..." or LONG wait for actions with pointer mode set to "Native with map swipe". In dev.

Android keyboard could be made more usefull (hide,show,arrows...) when saving scenarios? something like in JuiceSSH during session.
I could upload saves. HMM III Complete, Android 7.0 & Android 6.0

Related to:
VCMI-1.4-api21-20170515-release.apk
VCMI-branch-develop-01e5f99-fb57108.apk

Fay - 2017-06-27, 17:03

Quote:
Doesn't load next scenario of campaign after showing introduction video of it.
Do you mean "next scenario" as in moving to the next mission after winning the previous one? I guess I can check that, but it doesn't look like android-specific problem.
Quote:
Auto fight crashes VCMI right before showing results (creatures lost by attacker & defeater, ...). Does in release version, doesn't in latest develop.
Yeah, this was the vcmi problem at the time I built the app last time. Use automatic builds if possible, they're the most up-to-date.
Quote:
Fight is something like "tap-action-tap-action-tap-..." or LONG wait for actions with pointer mode set to "Native with map swipe". In dev.
I'm not sure what you mean... pointer modes shouldn't affect the performance (and even if they did, it's relative mode that would be slower, as it needs some extra calculations). And if you mean the performance in general, then there isn't much that I can do from android side.
Quote:
Android keyboard could be made more usefull (hide,show,arrows...) when saving scenarios? something like in JuiceSSH during session.
Currently keyboard handling uses default SDL android implementation and I never really analyzed the logic. But honestly I'm not sure what to do there. Waiting for ideas. ;)
One thing I can think of (not strictly about the keyboard) is to add the button to open the chat/console, because I don't think there is a way to do it in the gui.

@SXX
I found out that the fix for the "red background" won't behave correctly on all devices and will crash the app if that device doesn't support the surface type that I forced. In this case I'll probably need to add some better egl capabilities detection (a simple solution would be to check if RGB565/Depth0 is supported, otherwise fall-back to the gl-chosen default values -- not sure if it's possible to implement without messing up SDL config).

SXX - 2017-06-27, 21:10

BTW today I played short game on Android and so far only problems I seen is battle machines tend to appear in army (though I guess this could be problem with outdated bundled config files) and also battle end tend to crash game for some reason.
SXX - 2017-06-28, 23:19

Small note. I dropped VCMILIB_ADDITIONAL_SOURCES from CMakeList and instead added "ifdef" for Android-specific code. I hope this won't break something since I really hope to at least share CMake configs.
SkyRE - 2017-07-02, 10:18

Hello, Fay.
I've findout that issue not in "next scenarion" but even on second loading after one game was already loaded without complete exiting (to "desktop") from game.
I've recorded videos with issues.
Next scenario hang - https://youtu.be/6Ev4pwCwzBE
Second load hang - https://youtu.be/qrPXmB2SEZ0
Slow fight - https://youtu.be/O867LD377Qs
Large keyboard vs keyboard use in JuiceSSH - https://youtu.be/Tc0ET_YVZMk

SkyRE - 2017-07-03, 20:57

Hello SXX,
Where I should report not android related issues?
Because i've tried to switch to "next scenario" on PC (Linux) and one campaign scenario (Clearing the Border) loaded "next scenario" (After the Amulet) and i saved it to continue on android, but other campaign scenario (Graduation Exercise) crashed vcmi on PC on loading next scenario of campaign.

SXX - 2017-07-03, 21:32

SkyRE wrote:
Where I should report not android related issues?

Our bug tracker is here:
https://bugs.vcmi.eu

But use search first because most likely this is already reported.
There are issues with campaigns for quite some time.

SXX - 2017-07-05, 02:13

Sorry, I tried to merge some of the CMake projects locally, but failed. Still unsure why it's fail to build now because I added CAndroidVMHelper into the main CMakeLists.txt of our lib. :-( .
HarryPhoon - 2017-07-06, 22:06

I don't really understand git and Travis but to me it seems unnecessary to use submodules as a way to update VCMI for daily builds. Wouldn't it be better to update the repository itself?? And shouldn't be the submodule present in the vcmi-android first so that Travis can update it?? Just a rough guess.

Edit: Nah, I'm blind. The submodule is present. No idea why it gives error.

SXX - 2017-07-07, 08:28

HarryPhoon wrote:
Edit: Nah, I'm blind. The submodule is present. No idea why it gives error.

It's gives error simply because I broke it. I tried to actually merge some of Android build configuration into our main CMake files, but failed.

Once I find time to install everything needed for Android build to my own machine I'll fix it one way or another.

hardy - 2017-07-08, 05:18

Hi there ! How can i play expansion WOG on VCMI for android ? I can't find WOG mod folder anywhere to put it on android.
HarryPhoon - 2017-07-08, 07:54

I think you have to install it first on your PC and then copy the data into vcmi-data folder in android.
Fay - 2017-07-08, 21:59

Sorry, I don't really have time for development recently. I try to read this topic periodically though.

Quote:
Slow fight - https://youtu.be/O867LD377Qs
Wow, that really looks strange. That definitely didn't happen for me. At the moment I'm not sure how it's possible, but I'll check when I'm able to.

Quote:
Large keyboard vs keyboard use in JuiceSSH - https://youtu.be/Tc0ET_YVZMk
Hmm, okay. I might need to check what I can actually do with SDLs keyboard handling.
I think that the ability to show/hide keyboard is a feature of your keyboard app (that shows up when suggestions are displayed(?)). I don't have anything like this in the default google keyboard.

Quote:
Sorry, I tried to merge some of the CMake projects locally, but failed. Still unsure why it's fail to build now because I added CAndroidVMHelper into the main CMakeLists.txt of our lib.
After a quick check -- I don't get why it has problems during linking, but after adding VCMI_ANDROID define in both lib.cmake and SDL_android_main.cpp, the project complied on my side. (probably some problems with the order of file including?)

Quote:
Hi there ! How can i play expansion WOG on VCMI for android ? I can't find WOG mod folder anywhere to put it on android.
Yeah, vcmi on android generally tries to follow the same folder structure as the desktop one -- mods can be copied from desktop version to <public storage directory>/vcmi-data/Mods/ and then enabled via mods menu in launcher.
Tooandorisu - 2017-07-09, 06:31

Fay wrote:
Yeah, vcmi on android generally tries to follow the same folder structure as the desktop one -- mods can be copied from desktop version to <public storage directory>/vcmi-data/Mods/ and then enabled via mods menu in launcher.

Nope. Not possible to enable mods via the launcher. I have like 5-6 mods in it. Doesn't show up in the launcher at all

Fay - 2017-07-09, 09:05

Well, in that case I need more info, because it definitely should work. Launcher checks for <storage>/vcmi-data/Mods/<mod-folder>/mod.json existence to determine if that's a valid mod. If you confirm that mods are placed correctly on your device, then I'd love to see the launcher logs (<storage>/vcmi-data/cache/VCMI_launcher.log) after opening mods screen.
Tooandorisu - 2017-07-10, 19:08

Here you go
Fay - 2017-07-10, 20:42

Something is definitely wrong, because it should display vcmi essential files as an entry in mods list (even if you don't have any actual mods added). So, as I said, launcher logs would be appreciated, because I can't really say anything specific what goes wrong without details.
Tooandorisu - 2017-07-11, 08:05

Here is a zip for the cache
HarryPhoon - 2017-07-11, 11:48

According to the vcmi_launcher.log the problem is caused by the New Old Commanders mod. Try to put it away and try again. I don't use that much mods but the same thing caused me Resourceful AI mod. You have to move away the "bad" mods and then the rest will show up. But I don't know why is it caused.
Dydzio - 2017-07-11, 12:14

As error shows - it is caused by invalid JSON file that belongs to particular mod.
Fay - 2017-07-11, 17:18

Yeah, that mod's mod.json is not valid (extra comma near the end; removing the mod or the comma should help). I guess vcmi itself uses some less strict json parser and ignores these errors.
On the other hand, I probably shouldn't abort everything when single mod wasn't parsed correctly. :P

Dydzio - 2017-07-11, 18:56

Yeah - VCMI JSON parser is not too strict. I think the best way would be to display mod that causes problem and mark it with some error icon or whatever. If you do not display faulty mod at all then people may think that they install it incorrectly etc.
misiokles - 2017-07-11, 20:00

So, the problem is with additional commas in json files? Ok, I can upload fixed version at mod wiki site. Now are two broken mods for android: New Old Commanders and Resourceful AI mod. I removed two commas from them - tell me, please, if everything is ok now.
New Old Commanders:
http://www102.zippyshare.com/v/7OklzkBA/file.html
Resourcefull AI mod:
http://www102.zippyshare.com/v/gB13xmuG/file.html

HarryPhoon - 2017-07-12, 00:02

Both seem fine now. http://imgur.com/a/F9qFa. Thanks for the fix.
SkyRE - 2017-07-13, 09:28

Fay,
Is it possible to make some mouse right click? Long tap for example.

I have one save that crash in Android 6 after auto-battle and manual battle, but don't crash auto-battle and crash manual battle in Android 7 & PC (Ubuntu).
Android 6 - https://youtu.be/pV1LRh6ELhg
Android 7 - https://youtu.be/UBAIezJkn8A

octavion0223 - 2017-07-13, 14:48

Sorry for asking a question that has surely been asked before but I can't find the answer and I really want to play D:

I can launch the game and the menus function perfectly. But whenever I attempt to start a scenario, random map, or campaign map it crashes during the loading screen. I have a Galaxy S7, Wat do?

HarryPhoon - 2017-07-13, 18:29

SkyRE,
there should be right click already. At least on my device it works in touch mode (or with swipe). You have to hold two fingers (the first one on the object and the second one elsewhere).

octavion0223,
Not really sure about that. I would try to copy in the game data once again, check that core mods are allowed and that should be it. I think it could be caused by the game data. Give it a try :)

SkyRE - 2017-07-15, 04:16

HarryPhoon,
Thanks, it works as you described.

Fay, SXX,
no new auto builds any more? :cry:

SXX - 2017-07-15, 16:06

I'll work on restoring builds once I finish with our internal code formatting changes.
SkyRE - 2017-07-15, 20:38

SXX,
No problem,
Thanks!

Damodred - 2017-07-19, 10:27

The xyz install helper page is down and in-app instructions fail to help me launch. Anyone mind helping me?
I just copied the whole game directory from pc to phone in the folder that the app suggested. App can't find "Data", it says.

Damodred - 2017-07-19, 11:50

Damodred wrote:
The xyz install helper page is down and in-app instructions fail to help me launch. Anyone mind helping me?
I just copied the whole game directory from pc to phone in the folder that the app suggested. App can't find "Data", it says.


Managed to start the app now. When choosing SD card as file location, the app search on internal storage/Android instead.
However the app now crash whenever I try to start a game. Loading screen kills the app.

HarryPhoon - 2017-07-20, 17:00

What version of HoMM3 do you have?? If the app loads fine now then there has to be something with the data.
Damodred - 2017-07-20, 19:27

HarryPhoon wrote:
What version of HoMM3 do you have?? If the app loads fine now then there has to be something with the data.

Homm3 complete,without vcmi or wog.
However while it might be the data files, I find it odd that the app creates files in the wrong folder

HarryPhoon - 2017-07-21, 23:19

Can you upload logs from VCMI?? They should be stored vcmi-data/cache.
Quote:
However while it might be the data files, I find it odd that the app creates files in the wrong folder

What do you mean by this??

Damodred - 2017-07-22, 10:11

HarryPhoon wrote:
Can you upload logs from VCMI?? They should be stored vcmi-data/cache.
Quote:
However while it might be the data files, I find it odd that the app creates files in the wrong folder

What do you mean by this??


Logs are uploaded below.
By "this" i mean: When i start the app, i can chose "Data installation location" as internal storage, SD card, or specified dir. From what i gather: When chosing SD card in the app, launching the app creates files NOT on the SD card but on the internal storage (directory: int.storage/android/data/is.xyz.vcmi/files). When chosing internal storage no files are created anywhere, and i haven't tried specifying directory.

My phone is Samsung S7, and my Heroes 3 files are directly downloaded from Gog.com.
I've not tried using wog files.
Seems like i've got the same problem & phone as Octavion0223.

Fay - 2017-07-22, 19:55

Quote:
(directory: int.storage/android/data/is.xyz.vcmi/files)
That's the old app (the one on google play) and not the updated one ( https://builds.vcmi.download/branch/develop/Android/ ). The current version of app writes data to <external storage*>/vcmi-data/

* (where "external storage" is whatever system returns as "external storage directory", so either actual sdcard, or internal memory if sdcard isn't available)

Damodred - 2017-07-22, 20:50

Fay wrote:
That's the old app (the one on google play) and not the updated one ( https://builds.vcmi.download/branch/develop/Android/ ).


Thanks! I chose the newest of the four links there, it wrote to internal storage but that's no problem for me.
This new app works fine - I've managed to sucessfully start a game, so for now, I'm more than happy:)

Damodred - 2017-07-23, 21:32

Alright so I've tried a few games with the newest app version and found some bugs, don't know if they are new or well known stuff for you guys:
* Random map templates fail to create 5 player maps.
* all random 4 player maps include 3 towns in starting areas and an enormous amount of monsters between regions
* war Machine are off: catapult is an artifact you conquer from rival heroes and first aid tent and ballista are units in the army. Visiting the blacksmith causes the app to crash
* There are no "space" button for revisiting places
I'll keep posting bugs here if it's to any help :)

SXX - 2017-07-23, 22:13

Damodred wrote:
* war Machine are off: catapult is an artifact you conquer from rival heroes and first aid tent and ballista are units in the army. Visiting the blacksmith causes the app to crash
This is weird. It's means that assets are still using "config" from older VCMI version.

Is "python3.5 ./update_internal_assets.py" failed to do it's thing?

Damodred - 2017-07-23, 22:22

SXX wrote:
Damodred wrote:
* war Machine are off: catapult is an artifact you conquer from rival heroes and first aid tent and ballista are units in the army. Visiting the blacksmith causes the app to crash
This is weird. It's means that assets are still using "config" from older VCMI version.

Is "python3.5 ./update_internal_assets.py" failed to do it's thing?


Don't know how to check that

SXX - 2017-07-23, 23:34

Damodred wrote:
Don't know how to check that
Don't worry about that. I shouldn't be quoting your post.

It's was message to @Fay.

Fay - 2017-07-24, 07:40

Not sure exactly what could cause it, but config in the apk should be the most recent (the last config change that I can see is BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE in defaultMods and it is correctly included in apk).
(btw, it's possible to easily check what configs/mods are inside apk: unzip apk file -> open "assets" -> unpack internalData.zip -> profit)

The one thing that could be a problem here is the data migration from xyz's version. I haven't tested it a lot so maybe config gets migrated and skips update from internal zip file.

@Damodred If that's the case, unistalling->reinstalling the app should help (or system settings -> about vcmi -> "clear data").

Damodred - 2017-07-24, 08:35

Fay wrote:

(btw, it's possible to easily check what configs/mods are inside apk: unzip apk file -> open "assets" -> unpack internalData.zip -> profit)

The one thing that could be a problem here is the data migration from xyz's version.

@Damodred If that's the case, unistalling->reinstalling the app should help (or system settings -> about vcmi -> "clear data").


Didn't understand that asset/apk file stuff but that wasnt ment for me?
Before I installed the newest version, I uninstalled the xyz version, and then I moved the game directory from pc to phone so I think it shouldn't be any cross over data from the old version.

burunduchok - 2017-07-24, 11:14

Hey guys. Really appreciate what you are doing. Thanks for your efforts.

I've just installed for the first time vcmi from the link below, version of 22 jul.
builds.vcmi.download/branch/develop/Android/
I placed h3 files in local vcmi-data directory, the launcher has some problems with mods (which I have none installed), as I see some JSON parsing errors with mods.
When I press "Start VCMI", screen blanks off for a sec, then brings me back to launcher screen.

Any ideas what could go wrong? Maybe my fault in configuring vcmi?
Screenshots are here imgur.com

HarryPhoon - 2017-07-25, 08:36

burunduchok
Quote:
I placed h3 files in local vcmi-data directory, the launcher has some problems with mods (which I have none installed), as I see some JSON parsing errors with mods.

That is normal at the moment. Normally that button should work as a shortcut to download mods. Or something like that. If there was some problem with mods it should appear at the top of the mod list.
Still not sure why it doesn't start.

Fay
There's some reference to xyz's VCMI in the launcher log burunduchok provided.

Fay - 2017-07-25, 10:30

It's weird, both logfiles look correct... no idea why the game doesn't start. Mayybe there's some problem/crash that's not caught by launcher (it should save crashes to the logfile; I'll try to check if it actually does).

Quote:
There's some reference to xyz's VCMI in the launcher log burunduchok provided.
This is okay. We changed app package (id) to is.xyz.vcmi so that we can update existing google play app at some point (it needs both the same package and signing certificate).
HarryPhoon - 2017-07-25, 10:53

Maybe the crash is caused by insufficient RAM. Saw something like that on my girlfriend's 1GB phone when I tried to run Kodi.
http://www.gsmarena.com/lenovo_tab3_7-7951.php

EDIT: burunduchok
Could you try to free your RAM as much as possible and then try to run the game??

burunduchok - 2017-07-25, 11:24

Just tried to re-download heroes3 files from another source.
Also freed RAM, as HarryPhoon suggested. Unfortunately, nothing changed as result.
Black screen just for a moment, and back to launcher menu.
Nothing new in logs, imo.

burunduchok - 2017-07-25, 12:12

One more thing with the launcher: when I select screen resolution (1024x600), then press "Start VCMI", after a glitch it returns back to 800x600. Even if I explicitly write in settings.json the desired resolution, after "Start VCMI" it's back to 800x600, also rewritten settings.json.
HarryPhoon - 2017-07-25, 13:59

The thing with resolution happens even to me but that should be caused by faulty VCMI core mods. You can also try to download the latest version (the 23 July version) to make sure it happens in both versions. If the problem persists than you can I think just wait. Maybe Fay will find the solution.
burunduchok - 2017-07-25, 15:59

HarryPhoon, Yes, today i've installed latest version, everything the same.
HarryPhoon - 2017-07-31, 16:24

burunduchok
Try to download this file and put the mods into the Mods folder. It should fix your resolution problem.
https://www.dropbox.com/s...a/mods/vcmi.zip

burunduchok - 2017-07-31, 23:57

HarryPhoon, Thank you, resolution selection box works just fine for me now.
Is there a possibility to turn on "very verbose" debug mode in VCMI, to find why it can't go further?

Dydzio - 2017-08-01, 00:42

Maybe adding this node to settings.json will work:

Code:

"logging" : {
        "console" : {
            "threshold" : "debug"
                }
        }

HarryPhoon - 2017-08-01, 23:26

Fay,
I would like to point out few things that are in my opinion urgent right now for android-vcmi.
When the VCMI app is installed it doesn't come with mod for different resolutions. I think even the additional ability sprites for units are missing but not so sure about that right now. They should be provided already in the apk or there should be at least some links to the files.

In-game session could be made a bit more pleasant. First of all the app doesn't support fullscreen. If there should be a back arrow it could be implemented as a floating button somewhere in a corner.
And when the chosen resolution doesn't fill entire screen then the artifacts could be covered by a single coloured layer or some kind of sprite so that it doesn't look so bad.

Thank you :-)

SkyRE - 2017-08-06, 20:11

All latest builds crashing after battle end in companies.
Trogwar - 2017-08-09, 13:30

SkyRE wrote:
All latest builds crashing after battle end in companies.

I have the same problem. Also I have constant crash when entering the tavern. Sometimes when the quick combat is on everything goes fine, but sometimes I have crash.

Dydzio - 2017-08-09, 18:32

maybe vcmi config folder is outdated on android... i would try using one from recent windows daily build
Trogwar - 2017-08-11, 18:21

Dydzio wrote:
maybe vcmi config folder is outdated on android... i would try using one from recent windows daily build

Very interesting. I have a bug of battle on the windows build too. But the tavern works correctly.

Trogwar - 2017-08-14, 12:45

I can not run the game in the last builds. The message "Could not find or extract vcmi data from app resources" comes out. But the files in the "/data/data/is.xyz.vcmi/files/vcmi-data/" directory exist.
P.S. Is solved. There were incorrect file permissions. But crash in tavern and after combat remained.

semperubisububi - 2017-08-14, 22:31

running on arm exynos and with elevated previleges with the symptom of crashing at the end of the first fight.

impressive though i just was so excited it even worked. Like exult and ultima vcmi look sjust as promising simply amazing great job i dont think its that neeeded on arm or anything but a big thread such as this may be otherwise.

though. vcmi is an amazing client thanks

Damodred - 2017-08-20, 16:14

I experienced that the AI never buyed creature dwellings. Was on an 8 player map. is that a well known bug? Got some error messages on AI turns: "player was 2 expected 3" or something like that.
HarryPhoon - 2017-08-20, 22:14

Damodred
That probably isn't related to this thread but to the official developement.


Powered by phpBB modified by Przemo © 2003 phpBB Group