otclient icon indicating copy to clipboard operation
otclient copied to clipboard

Merge master into mobile_port of OTClient and port new build systems (ndk)

Open memegauste opened this issue 5 years ago • 4 comments

Seems that mobile_port branch is so far deprecated, but I managed yesterday to merge it with master with only conflicts in 4 files which are releated to visual studio development and README.md, thus not affecting any way an actual code.

Which I am really worried about is that the Android build system is horrible mess if you do porting of old code base like that so we must provide Gradle file and replace 'android' NDK command in build sh/bat script since 'android' is not used since 18b NDK.

Also we should update the libraries to the new ones.

I tried to do yesterday because I was feeling crazy enough to try to run Tibia again on my phone. Rafonix approves :call_me_hand:

memegauste avatar Jan 21 '20 11:01 memegauste

This is what I did yesterday: https://github.com/HoshiYamazaki/otclient

I don't understand if this is even possible to compile that project with Gradle and newest NDK, but I will try to watch PPSSPP repository because it's one of the projects I trust to see how they handle it.

memegauste avatar Jan 21 '20 11:01 memegauste

The code quality of mobile port is mediocre at best and it uses over complicated solutions. Personally I would never merge it unless adequate technique* to approach such port is used.

  • Whole platform window should be based only on SDL2. There is no need for separate x11, windows and android classes. SDL2 can handle any underlying platform for that matter (including iOS, emscripten and countless of others).

iryont avatar Jan 21 '20 12:01 iryont

The code quality of mobile port is mediocre at best and it uses over complicated solutions. Personally I would never merge it unless adequate technique* to approach such port is used.

  • Whole platform window should be based only on SDL2. There is no need for separate x11, windows and android classes. SDL2 can handle any underlying platform for that matter (including iOS, emscripten and countless of others).

Despite that, the only good x11 is XServer XSDL by Peyla, which does not support graphics acceleration so we're be forced to use OpenGL Wrapper to software rendering, which is no-no way.

I really appreciate use of external and nice library. I'm curious too if we could handle newest Tibia and play game on phone. Wet dreams, isn't it? Is Tibia 11 supported by OTClient?

memegauste avatar Jan 21 '20 13:01 memegauste

I meant the platform specific window creation code available here:

https://github.com/edubart/otclient/tree/master/src/framework/platform

It can be replaced by a single SDL2 window creation code.

That being the case it is trivial task to create working OTClient with SDL2 on Android. However, without tons of other stuff (scalable UI with scalable fonts) it makes the game client rather useless as playing with pixel based UI on displays with highly variable DPI is just pure masochism at this point.

iryont avatar Jan 21 '20 18:01 iryont