Android port

Thanks for the patch.

I’ve committed the erm fix.

I’ll check the patch to the console in more detail (since it’s linux related) and commit that later in the day.

I think the change to replace the shared memory with a file is not right. That should probably be a handshake between the server and the client instead. But I guess the file will do in the meantime (if it doesn’t break on windows).

The changes to CMT.cpp are rather intrusive and may change the behavior of the code on non android platforms.

Also your patch has many blank lines insertion/removal. It would make review easier if they were not there. I’d say the same for the traces you added (“tlog1 << …”).

On gingerbread 2.3.3 and Samsung Galaxy Tab the app loads, iti presents the SDL screen with option to change settings and then quits to homescreen.
I tried using aLogCat to view reported logs but i can’t make any sense of it, apparently the app makes it all the way to loading unit models, then calls a function for OpaqueWindow that results in error, after which the Homescreen loads.
Can you tell me if you have any clues what I should look for in order to make it load?

Thank you for all your effort and all the nice ports :slight_smile:

I have the same problem on the Nexus S, I also got the SDL screen, before a black screen, then crashed to home screen.
Is it possible that there’s something wrong with my Heroes files? As I followed the instructions on the Android Market (I even tried twice just to make sure).
My Heroes is HoMM3 Complete Edition, from the ‘Ultimate Heroes Pack’.

Really looking forward to getting this working, so any ideas that might help would be greatly appreciated.

Keep up the great work, thanks!

Well… the same again… SDL starts and then crashes on HTC Desire with Android 2.3.4 … log is saying libvcmi.so not found

@pelya: i sent you an email earlier with my log file… if necessary i will attach it here too

and again… nice work for pelya and the vcmi team too :wink:

I’ve bumped into some nasty crashes when testing on the device - I’ve got it back just today, on emulator everything worked so good :frowning: seems like memory alignment problems. So I’ve unpublished it for now.
I’ve also fixed troubles with unpacking libvcmi.so on some devices.

Ok, if there’s something we can do to help just say the word

HTC Desire Z, 2.3.4 (Cyanogen)
Getting the “libvcmi.so not found” crash as well.
If it would help you getting a full logcat drop me a line at Christoph(Dot)Wagner(at)gmail.]com

Appreciate the work you are doing:)

Pelya, i’ve saved the logfile from a Galaxy Tab output onto pastebin:
pastebin.com/E7PG1uDG

The tablet’s characteristics are
Galaxy Tab P1000, Overcome 2.0.0 Gold ROM on Gingerbread 2.3.3 android, Koxuaxi’s 3.0.8 kernel.

As far as i can tell, VCMI makes it as far as loading libapplication.so after which it crashes. No missing file errors, apparently. :unamused:

for those with missing libvcmi.so… pelya has fixed this, but as far as i know he didnt release it yet, because of the other more major bugs he found… so … if you would like to try going pass the libvcmi.so not found message find where your chmod binary is and link it to /system/bin/… for example mine was in /system/xbin… and here it goes:

ln -s /system/xbin/chmod /system/bin

afterwards try starting the game… mine didnt work :slight_smile: but hey… you might get lucky :wink: at least you could “pastebin” the log then, because it might be more helpful

It looks like publishing VCMI on android market caused some stir. It’s still not playable though and I’m afraid many people will be disappointed with the game. I think you should wait at least for an AI before VCMI is officially out there again (it should be ready by the end of the year).

Anyway, I think we should consider releasing VCMI under different name when it gets stable and playable so bad fame of VCMI is not necessarily something to avoid at any cost.

It would be good to provide some brief info about what VCMI is, otherwise people start propagating incomplete or totally false view of the game. So far I’ve seen threating the port as an alternative to VCMI, providing original H3 screenshots and general threating this game as complete H3 port.

Yeah… Just found Russian thread about Android port.
Rough translation:

Which makes me wonder - what is original game? VCMI or HOMM?
There is also interesting statement: “The game is ready on 97%”. Where they found that number?
And no mentioning of incomplete game.
There is nice page on the wiki regarding this: wiki.vcmi.eu/index.php?title=VCMI but I don’t think that a lot of people saw it. This page should be mentioned more often to prevent confusion regarding current state of the game.

I do believe shipping Manual in the package would help a lot. People seem to rarely find it, and at least it clarifies what VCMI is all about without getting into details.

Still, people don’t like to read anything and just play it NOW, so giving additional info impossible to miss may help them.

Maybe we should show show a kind of splash screen (when running vcmi_client) with info about the project and its progress when the game is run for the first time on the machine?

I’ve got a minor progress - now it loads main menu on my Evo, but crashes when I’m pressing any button.
Adding extensive debug to the code has shown that sometimes VCMI tries to read memory past the end of buffer created by CLodHandler::giveFile(), inside CDefHandler::getSprite(), maybe this is Android-specific though, because running it under Valgrind on PC has shown no errors (but I did very few tests). Adding a safety margin to the buffer returned by CLodHandler::giveFile() seemed to resolve the problem for now.
The next crash is inside CDefFile::loadFrame(), I’m going to fix it next week.
The patch became extremely ugly, don’t look there please 'till I’ll clean all the things up.

Edit: I’ve managed to run it to the point of fighting battles (at least on my HTC Evo), it still crashes often at random. So I’ve published it back to market, with big fat warning at the top.
installer file, extremely ugly patch

Wow Pelya, congrats, i just tried the new version on Samsung GT P1000 and made it as far as the in-game. The game is so far playable, though i didn’t get to do much yet other than load a map and enter combat.
I’ll be doing some extensive testing of it and will upload pastebin logs for the major issues i encounter, they might help development.

So far I have these if they might help:

pastebin.com/xGrsaHRb - game crashes to desktop when saving

pastebin.com/0nHGkV8q - game freezes when selecting the Quit to Desktop menu option

Android 2.3.3 | Overcome 2.0.1 Hermes ROM | Overcome 3.0.1 kernel

Definitely working much better, it runs, can start a game and battles seem to work properly. However there does seem to be a crash when upgrading creatures (only tested on 1st Tier creatures).

Other than that I have not had any other crashes yet, though I only played for about 5 minutes

Edit: Crashed during battle. Progress is still great though

That’s a very good idea. It would clear some confusion and reduce the risk the project gets (unfairly) a bad name because of those thinking it’s “just another mod”.

I can now also start a game. Build buildings, entering battles work. I’m also happy that it’s smoother than the heroes2 :slight_smile: I have the Desire Z with Cyanogenmod7 (Android 2.3.4), if you need logs, just tell me!

Also, maybe you should consider pulling it from the market and setup a beta testing site or something like that. Just to avoid angry e-mails from people expecting it to work 100% :slight_smile:

Just tried today on the EVO 3D, and it doesn’t make it past the SDL splash screen. It briefly flickers to black with a tiny squard with “Ab” inside it in the top left corner, but after that hits home screen.