Drewol/unnamed-sdvx-clone

[Question] Android Port

Opened this issue · 24 comments

I'm porting usc on android, and it works (!)

but some graphical issue occured.
Screenshot_20220811-204830_Game
I don't know what to fix: C++ code, GLSL code or Lua code. Any guesses?

My first guess would be glsl code. Are the changes available anywhere? and instructions on how i can set it up to test myself?

I edited lots of code that include third party library. It will take a day or so to clean up the project

https://github.com/SieR-VR/usc-app

Uploaded it! Maybe some helps are needed

I have not managed to build yet but if you add me as a contributor to your forked repo (https://github.com/SieR-VR/usc-android) then I can start pushing some android specific fixes.

I got stuck on building because I'm not sure on how I'm supposed to add the external libraries

Request sended! External library guide will be written.

If you are sure the problem is in the Lua code or the GLSL code, I can also send you the built APK.
Customaizable files exist in /sdcard/usc

I finally got it to run but all the graphics looked like they should, but I have only run it through an emulator so far as my actual device has usb connection issues.

Wow, that means USC is even one step ahead of SDVX officially logged into the Android platform, and did a pretty job😄👍🏻

I finally got it to run but all the graphics looked like they should, but I have only run it through an emulator so far as my actual device has usb connection issues.

Did you modified glsl/lua code? I have galaxy tab s7 / galaxy A90, and able to test

No changes to lua or glsl. The only graphics related change was to fix OpenGL context creation.

I'll clean it a bit then push the changes later today.

I tested with committed code at android_vcpkg branch, but same issue occured.

I have gotten it installed on my actual device and it had some graphical issues. The ones I saw I was able to solve by changing the order of the vertex shader attributes.

For example the C++ struct had the vertex format as (pos, uv) but for some reason the shader expected (uv, pos) even though the glsl code had them in the same order as in C++

From a renderdoc capture of the track rendering:
image
inTex is of size 3 and inPos is size 2 when it should be reverse.

And my game looked the same as your original screenshot so I think it's the same cause.

That means, Will reversing attribute position in vertex shader solve problem?

That means, Will reversing attribute position in vertex shader solve problem?

it could be that simple but i would not be surprised if C++ changes are needed.

Btw, setting up renderdoc for android was very simple so if you want to take a look with your devices i recommend renderdoc

image

I changed Material.cpp, and problem solved!

Would I commit android stuffs?

Does this still will work? I try to build the usc andriod but stuck on CMake problems.

@wohehehe Do you mean Drewol/usc or SieR-VR/usc
There work is actually on the SieR-VR/usc for now.

both my fork (Drewol/usc-app) and the original (SieR-VR/usc-app) are still not really set up for easily building yourself, I think both me and SieR have tried to set up automated builds but no success with that yet.

well it seems like this is mostly resolved? though there are still things to be done to make it a bit better, with the asset files and such. and maybe the fork can be cleaned up and merged to not spread things out too much.

As for the asset files, other things could also benefit from changing how they're handled, possibly things like a flatpak version.

so does anyone create apkfiles for it now?
or who can teach me how to play it on android?

android Dev的页面上有一个apk。 https://github.com/SieR-VR/usc-app

On Sat, Oct 8, 2022, 9:52 AM nick-haoran @.> wrote: so does anyone create apkfiles for it now? — Reply to this email directly, view it on GitHub <#616 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZBWE665Z6UCTYMBDY2ATJDWCGDBNANCNFSM56H5VESQ . You are receiving this because you are subscribed to this thread.Message ID: @.>
sincerely thanks