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

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

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

Joined: 21 Feb 2014
Posts: 45
Location: Russia
Posted: 2014-02-21, 22:45   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)
Last edited by xyz on 2014-03-01, 23:34; edited 3 times in total  
 
     
AlienX 


Age: 23
Joined: 10 Jul 2009
Posts: 109
Location: Łódź
Posted: 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!
_________________
Sorry for my poor english ;)
 
     
Macron1 

Joined: 02 Apr 2013
Posts: 578
Posted: 2014-02-22, 11:55   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 :-)
_________________
I'm not a member of VCMI developer group and my posts are not official. I'm just a fan.
 
     
Ivan 
VCMI programmer

Age: 26
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 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 

Joined: 21 Feb 2014
Posts: 45
Location: Russia
Posted: 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 
VCMI programmer

Age: 26
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 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

Joined: 24 Jun 2011
Posts: 3
Posted: 2014-02-22, 20:22   

Just installed this, seems to work very nicely. Big thanks for this!!
 
     
xyz 

Joined: 21 Feb 2014
Posts: 45
Location: Russia
Posted: 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 


Age: 23
Joined: 10 Jul 2009
Posts: 109
Location: Łódź
Posted: 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
_________________
Sorry for my poor english ;)
 
     
oceanking7

Joined: 06 Jan 2012
Posts: 22
Posted: 2014-02-23, 03:21   

I really appreciate what you're doing ,thanks veryyyyyyyy much
 
     
oceanking7

Joined: 06 Jan 2012
Posts: 22
Posted: 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 
VCMI programmer

Age: 26
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 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 

Joined: 21 Feb 2014
Posts: 45
Location: Russia
Posted: 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 

Joined: 21 Feb 2014
Posts: 45
Location: Russia
Posted: 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 
VCMI programmer

Age: 26
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 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?
 
     
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

Hosting provided by DigitalOcean
Page generated in 0.02 second. SQL queries: 13