Android port

Kind of. Possible but this is far, far from straightforward. To do this you’ll need:

  1. Install some distribution using Linux deploy
  2. Compile ARM build of vcmi (or find binary compiled by someone else)
  3. Install H3 data
  4. Start vcmi using some VNC client

I can’t help you with any of these but I know that this is possible. And you definitely will avoid all Android-specific bugs.

Performance is not a limiting factor because this method does not involves any emulation/virtual machine but not all mobile devices are powerful enough to run vcmi.

Off topic:
Sad fact: installation base of Linux Deploy that can run VCMI is 10 times smaller compared to install base of buggy vcmi build.

I found a russian site where they ported vcmi to armv7:
4pda.ru/forum/index.php?showtopi … ry20457929
And this is the gameplay video:
youtube.com/watch?v=-L0LFqgm5M8
He is using multirom to switch between android and ubuntu at boot.

I try to download the vcmi.7z attached in the upper post, they made it for Linux deploy.

Results:
http://img38.imageshack.us/img38/3425/screenshot2013051113100.png
http://img189.imageshack.us/img189/9693/screenshot2013051112530.png
http://img194.imageshack.us/img194/3664/screenshot2013051112535.png
It’s working, but slow. FPS was around 5, it’s hardly playable. Who has a stronger phone (or tablet) can give it a try.
(I have 1gb ram, 1ghz dual core.)

VCMI team should really make an effort to take the VCMI Google Play page down. It only makes bad rep for the whole project.

SDL 2.0 is going to be final soon. Android support introduced.

I’d Be Willing To Help Make A Better Andriod Port, But I’ve Never Tried Coding For Andriod. I Had An Idea That Maybe You Could Make An Seperate App That Updates The Engine Used In Existing App. Here’s What I Mean

Current VCMI Port:87 Or 83

So

Files Updated Since 87/83 = Replace With New Ones
Files Left The Same = Stay

That Way It Wouldent Take As Long, or Be As Hard

Also, The Team Wouldent Need An Andriod Device

Google Has Made An Andriod SDK That Can Make A Virtual Device, So You Could Test On That Instead Of A Real Phone.

Also, If Anyone Updates This Port, Please Make It Andriod 2.1 Compatible, Or At Most 2.2. Some Older Devices From Those Have The Power To Run This. I Ran The Old Port On The Following Phone

HTC Driod Eris: Andriod 2.1 : 525MHZ CPU

It Was Really Slow But If You Like The Game Its Worth It, Also It Never Crashed

Im Getting Ready To Test On A Newer Phone, Built FOR Gaming SPECIFICALLY

Sony Xperia Play: Andriod 2.3.4 : Dual-Core 1GHZ SnapDragon

It Has Built In PSP Controls(Even Digital Touch-Pad Analogs) And A 800x480 Display.So
With AnyLucK It Will Work

Ill Post Back Later, But If You Do Make An Update To This And Need A Tester, Ill Test On Both My Devices.

-Katarn Out

Please, don’t start every word with capital letter.

On topic: none of us have either time or skills to work on Android phone. Check this: [forum.vcmi.eu/t/android-version-faq/587/1)

Won’t work. IIRC current version from Android Market works perfectly in Android SDK but barely works on most of phones due to hardware differences.

Hello Guys,

some of you might know me, I’m the one who has been trying to port VCMI to Android.

I took the work Pelya had build and now I got registered on this forum.

The bad news are, as many of you know, vcmi for android is outdated, very outdated and that has to change.

The good news, I finally got it running!!! Nevertheless I still don’t get it working with the data.

I want to give a release for android but I will need some help. I cannot even run on PC, so something must be wrong about my data.

I hope there are still people wanting to help me on that.

I don’t know the users here, but I’m sure some of you have written me. I have been getting a lot of emails for porting that game.

What nobodys knows, because it so happened yesterday, it compiles and runs :slight_smile:.

Anyway, I might tell more depending on how hot this topic is and who is willing to help.

Also I want to contribute on bugs if I find any as Pelya did and hope they go into the upstream. That way we can work better on a port of Heroes III and make it awesome for phones and tablets

Ahh I forget to mention, I mean the 0.94 version I got compiled and running… not that old one…

That news will make some people glad.
But I think that HMM3 is totally not fit to be controlled by fingers touches.
So interface and control (mostly of battle) must be seriously reworked. So it will need many programmers…

gerstrong, please, don’t create identical posts in multiple topics

What exactly is wrong? Does VCMI reports any missing files?

Have you seen this page? I think for Android data installation should be similar:
wiki.vcmi.eu/index.php?title=Ins … data_files

AFAIK current version in Google Play also compiles and runs. Until you try to save game or end turn.

Yeah, wasn’t sure where to put that. Thanks for reducing.

I’m not at the computer right now, so I will write reply to this later. I have done what is written in the instructions but I sense, that my version of data is somehow broken. I don’t hope so.

I tried to get it running on my PC (Arch Linux x64) and there it didn’t work. Where to put the data in order to get it running on Android, you can bet that I do know…

Yeah, I maintain that version, I know it, but it’s the 0.86 version, so a bit old. Uploading an pdate was pretty hard, until now. I’m pretty confident that I can fix those issues you mention and about the controls, don’t worry, Heroes II (FreeHeroes) also runs well and is pretty good playable, at least in my opinion, so we have a nice working framework. We only need to update everything.

See you later!

Here it goes. Compiled it through cmake, everything went fine.

[gerstrong@gerstrong-pc vcmi]$ cd vcmi-0.94/
[gerstrong@gerstrong-pc vcmi-0.94]$ ls
AI	       CMakeCache.txt  CPackConfig.cmake	Makefile  README.linux	     VCMI_global_debug.props	cmake_install.cmake  editor	  osx	     test
AUTHORS        CMakeFiles      CPackSourceConfig.cmake	Mods	  VCMI_VS10.sln      VCMI_global_release.props	cmake_modules	     launcher	  rpm	     vcmi.workspace
CCallback.cpp  CMakeLists.txt  ChangeLog		NEWS	  VCMI_VS11.sln      VCMI_global_user.props	config		     lib	  scripting  vcmibuilder
CCallback.h    COPYING	       Global.h			README	  VCMI_global.props  client			debian		     license.txt  server     vcmimanual.tex
[gerstrong@gerstrong-pc vcmi-0.94]$ cd client/
[gerstrong@gerstrong-pc client]$ ./vcmiclient 
Starting... 
Creating console 0
	 Initialization: 4
Resource with name CONFIG/FILESYSTEM and type TEXT wasn't found.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Resource with name CONFIG/FILESYSTEM and type TEXT wasn't found.
Abgebrochen (Speicherabzug geschrieben)
[gerstrong@gerstrong-pc client]$ ./vcmiclient -v
Starting... 
VCMI 0.94
  data directory:    /usr/local/share/vcmi
  library directory: /usr/local/lib64/vcmi
  path to server:    /usr/local/bin/vcmiserver
[gerstrong@gerstrong-pc client]$ 

Everything of the heroes III data is “/usr/local/share/vcmi”. I also extracted WoG and core.zip you provided as download on the wiki.

Now let’s see

[gerstrong@gerstrong-pc client]$ cd /usr/local/share/vcmi
[gerstrong@gerstrong-pc vcmi]$ ls
BINKW32.DLL  HEROES3.EXE  JSGME.exe  MP3DEC.ASI  Maps  Mp3	     VCMI_Client_log.txt  VCMI_client.exe_crashinfo.dmp  games	       h3maped.exe  random_maps
Data	     JSGME	  JSGME.ini  MSS32.DLL	 Mods  SMACKW32.DLL  VCMI_Server_log.txt  config			 h3ccmped.exe  ifc20.dll    server_log.txt
[gerstrong@gerstrong-pc vcmi]$ 

[gerstrong@gerstrong-pc vcmi]$ cd config/
[gerstrong@gerstrong-pc config]$ ls
settings.json
[gerstrong@gerstrong-pc config]$ 

At least I know that config/filesystem is missing. Is it because the data is incomplete? And why does it crash with segmentation fault? ( Abgebrochen (Speicherabzug geschrieben) )

Should that file be part of the game or what?

Config and mods directories from source code are missing. Easiest way to fix this is to install vcmi - “make install” should copy all required files including some miscellaneous stuff like icons & .desktop files.

For development it may be easier to create symlinks instead of actually copying these files.

(yes, I know that this is too complex than it should be but I can’t find any ways to make this easier)

Ah okay thanks. Maybe I can prefix the installation path. With Cmake it should be possible. Still that crash should not happen. Let’s give it another try…

Okay, now it works.

I will take a deeper look on that data copy ‘make install’ system and try to port at some way to android or update what needs to be changed.

Quite happy I am, awesome project you have here…

Now on to the update of the android port. :slight_smile:

Good news,

the game starts on my android phone arm based. I see a menu, can choose campain, but when trying to start it crashes. I think some search path are not registered correctly.

At line 311 of the client/CMT.cpp file it looks for StackQueueBgBig.PCX which cannot be found. I was able to disable the search for it and got me that far, but I’m sure this image and other stuff is needed. In fact it is in mods/vcmi/data instead of data. So the mods/vcmi search path is somehow not looked up. The file is there and I guess some others as well which are needed.

Maybe someone here can help on this and explain how the search path system is structured and how they are registered. Printing a list of search for debugging would be very useful, so I can trace the problem down.

If we get the correct paths registered I think nothing stands in the way to get it fully playable.

CResourceHandler::get()->existsResource(ResourceID(filename))

So I need to investigate how this CResourceHandler works and how to list the search paths it is using.

My guess is that Android only uses one path where the linux, windows build has multiple paths.

Could someone instruct and explain how this works? It would save me a lot of time…

I just saw another issue, the mouse cursor seems to be flashing a lot, but I’m confident, that this can be fixed. On FreeHeroes II it also does not flash. Must be some issue with the back buffer maybe…

Campaigns are still work-in-progress. Testing with single scenarios is a better idea.

Check lib/VCMIDirs for all system-specific paths.

ResourceHandler generates virtual filesystem from:

  1. paths specified in VCMIDirs::dataPaths();
  2. path from userDataPath()
  3. Data from “mods” - essentially, all subdirectories in Mods/ will be merged into “main” filesystem.

That’s something new. Check client/gui/CCursorHandler.
Essentially, VCMI disables system cursor and blits its own each frame in the same way as any other image.

How does one compile VCMI for Android? I’m willing to tinking with my Nexus 7, but I have never done Android development before.