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
Search found 49 matches
VCMI Project - Heroes 3: WoG recreated Forum Index
Author Message
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: Yesterday 17:03   Subject: VCMI for Android
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).
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-20, 21:28   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-19, 17:10   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-19, 16:42   Subject: VCMI for Android
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 ;) ).
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-17, 13:30   Subject: VCMI for Android
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?)
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-16, 22:01   Subject: VCMI for Android
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?
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-16, 18:27   Subject: VCMI for Android
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).
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-16, 15:39   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-15, 16:33   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-15, 15:21   Subject: VCMI for Android
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).
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-14, 20:45   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-14, 19:23   Subject: VCMI for Android
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).
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-06-04, 17:55   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-05-25, 22:38   Subject: VCMI for Android
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.
  Topic: VCMI for Android
Fay

Replies: 275
Views: 175552

PostForum: Development   Posted: 2017-05-24, 07:56   Subject: VCMI for Android
Build passed. I can't really verify atm if everything is correct, but at least it finished and is all green now. ;)
 
Page 1 of 4
Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

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