🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Porting custom engine to mobile platforms

Started by
2 comments, last by Shaarigan 4 years, 4 months ago

Hi everyone.

I'm writing my game engine for a few years, as many of game developers here, and I decided to try porting it to iOS and Android. The engine uses one main DLL file and several DLL files with different render systems, one of which can be chosen in settings before launching the EXE file. Pretty standard situation. On Linux DLL files are SO and on MacOS - DYLIB.

But as I learnt about iOS, it doesn't support DYLIB files, only static libraries. I'm not sure about Android, but maybe the situation is the same. It seems that there are some workarounds, but they are not really native.

So, it's not clear enough, is there any way to use dynamic libraries on mobile platforms or they should be linked to an executable file as static libraries. And in this case, it's not clear, would it be possible to choose the render system or not, at least it would be a little bit trickier. Although it's not so important on mobile platforms.

Does anyone have the similar experience? How did you solve this situation? ?

Thank you.

Advertisement

Dynamic libraries can't be loaded during runtime by definition. You can only add them ‘that might not be the word for it’ static libraries - this means using android studio you already add it to ezecutable file when you build your project - this wull worm but loading manually with lets say dlopen during runtime will throw an error that android prevented lib fron loading - itsna safety precaution since there are.lotsnof online tutorials (say on youtube) that use third party libraries that can be used as malicious softwate and are easy to program even for newbies… you practically include library and run a function and you are done. This is a security precaution. Not to mention it can br somehow bypassed but you need ti add a library to trusted list of libraries that are allowed to run- does it require root? i dont know(we it does but still you dont own proper previliges) i bet someone could bypass that too…

Android and iOS don't need dynamic rendering. Android supports GL while iOS as same as Mac is now on Metal. iOS even permits to compile code for example in Unity at runtime so you have to change the behavior or your engine if you want to be approved for their official stores.

However, this “choose what you want” instead of defining a clear path with your engine and other engines/ rendering libraries seems very outdated to me.

Anyways, what you also need for Android if I rember right, is a java launcher to bootstrap your C++ code

This topic is closed to new replies.

Advertisement