Open AdamBilisic opened 4 years ago
Hi, @AdamBilisic !
Right not only windows is fully supported and linux implemented(not tested), so compile and run game on android is not yet possible.
However, it's not too hard to port engine to another platform: it requires only rewriting of event loop and Vulkan-surface initialization.
Hi @Try. Thanks for the response!
I thought it would be possible without too much effort and it seems so.
Maybe it would be good idea to contact team which is working on ReGoth for a long time and they could do this much quicker then implement their own stuff. What do you think ?
Hm, you suggest to ask ReGoth team to port my engine to android... I don't think they are familiar with engine development, after all they use third party engine at this point, right?
Do you think that experience with engine development would be crucial here? Imho this collaboration would be perfect, since they are developing for android for a long time, they have passion for Gothic and with some of your guidance it could work nicely. Also lets face it. Its much more time consuming to reprogram everything from scratch like they are doing then just reprogram engine on which the game is running on. And I think that over time they already realize that their approach will take years.
Hi, i just wanted to say i also have great interest in an android port if possible. Maybe the android port of Morrowind could be an inspiration/code source? https://github.com/xyzz/openmw-android
Hi @Try could you point me to the direction what files/functionality exactly would need rewriting? I never developed anything android related but I have c++, c#, java, php and js background so maybe if i spend some time on it i will figure it out.
Thanks for enthusiasm, @AdamBilisic :)
There is no C++
applications on android, all android is capable of is java
app + C++
library. So you have to create sort of 'java' app, which delegates everything to already existing C++ code.
I use to have android support in previous(opengl-based) version of my engine, you can use it for inspiration: https://github.com/enotio/Tempest/blob/master/android/src/com/tempest/engine/Tempest.java
Apart from that Android doesn't support opengl(and I assume Vulkan as well) graphics in main thread, so you basically have to start another thread right at the begging and then invoke a c++ main from it.
There is an OpenGothic\lib\Tempest\Engine\system\api
catalog, if you need some extra android-code add it here.
Again, for inspiration: https://github.com/enotio/Tempest/blob/master/Tempest/system/androidapi.cpp
Also there is a WSI (window system integration) in VkSurfaceKHR VDevice::createSurface(void* hwnd)
- here you have to add an extra case for android. Should just work...
OpenGothic is cmake-based, afaik android studio has support for cmake out-of-the-box. Should 'just work', but will see.
Disclaimer: this is only to get engine to work, there must be a whole-lot performance and ui-related issues.
I can confirm that it "works" mostly out-of-the-box.
Performance-wise I'm getting 5 FPS in Xardas Tower (mid range device) and vulkan dies with VK_ERROR_DEVICE_LOST
on fences.
Hey, just wanted to say I made a Steam link configuration for all Gothic and Risen Games. With that it is possible to control Gothic with a touchscreen.
Here is a demo: https://youtu.be/zEkMRMM3X1A
If this topic will ever come further this could maybe serve as inspiration for the controls.
Here and there people show interest in such a port, here for instance: https://www.reddit.com/r/worldofgothic/comments/zg4755/is_piranha_bytes_thinking_of_developing_a/?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button
Any update on this?
any update on this?
nope :)
no pull requests from other people, and on my end not much enthusiasm.
PS: android-Vulkan is reduced in functionality and even what remain is buggy, so development wont be fun :(
Update: Apparently this is not necessary anymore. There is this new emulator https://winlator.com/ which let's Gothic and Gothic 2 run fine on modern phones. It is even possible to use mods with it (tested it myself)!
Emulation is no solution as OpenGothic is quite a bit different. Especially look wise. Claiming that stupid emulation is a solution just says one thing, you don't understand the aim of this project at all yet. AND... Winlator does not work that well at all if you don't have a Snapdragon CPU.
EDIT: And don't post some questionable claim to be official site please. This is the one and ONLY site. https://github.com/brunodev85/winlator
Also, winlator is closed source made by unknown company, which makes it suspicious to me.
My understanding of this issue is there are people out there wanting to play Gothic 2 on their phone. Since nobody expects THQ Nordic to provide an official port, the hopes lie on this project. @Try made a statement above this issue won't be followed, so still no Android port in sight.
I just wanted to give the other commentors here who wanted such a port a working solution for their initial usecase. My assumption is they don't care that much if it is an OpenGothic or regular Gothic, the main point is it should work. If Winlator is shady, there are also alternatives like Box64 or exagear. Next year maybe also Project Cassia.
Edit: After reviewing the website i posted above it looks indeed a bit shady. There are screenshots put there which were initially posted on r/EmulationOnAndroid. There is also no direct link to the GitHub repository and some 4.9 star ratings coming out of nowhere. On the other hand it seems like a little too much effort to scam people looking at all the content on the page.
I can confirm that it "works" mostly out-of-the-box.
Performance-wise I'm getting 5 FPS in Xardas Tower (mid range device) and vulkan dies with
VK_ERROR_DEVICE_LOST
on fences.
AFAIK this happens when something takes roughly > 2 seconds on the GPU - could just be a performance problem if not an internal error
Hey, just some general info for anyone who is interested in developing an android solution: Regarding games on Vulkan, the talk (especially slide nr 6) is quite interesting. https://www.youtube.com/watch?v=0Z-J0XBmvEw https://vulkan.org/user/pages/09.events/vulkanised-2024/vulkanised-2024-ian-elliott-google.pdf Basically Androids strategy is to render everything with Vulkan and they encourage developers to use it and submit issues to android so they can be fixed. There's also some useful advice given to developers in the video.
I would say main issue with android is lack of tools:
So the title is probably self explanatory, but if I understand correctly this re-implantation of the engine which then could mean that with some effort it could be compiled for android?
Thanks for the response!