utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
560 stars 38 forks source link

Can we use all Java APIs? #634

Closed Ali-RS closed 1 month ago

Ali-RS commented 1 month ago

Hi,

Can we use any Java APIs like web socket networking, reflection, files and third party Java libraries?

I have my game server written in Java and curious to know if I can do the client side (3d rendering, inputs, UI,...) with godot using this library.

Regards

chippmann commented 1 month ago

Depending on your target platform, yes. Android and iOS (graal native image in general) are more restrictive though and more care has to be taken on what libraries and functionalities you use.

But as with any framework you evaluate: test the things on the respective target platform you want to achieve before committing.

Ali-RS commented 1 month ago

I see, thanks for the quick answer. I want to target desktop and android.

chippmann commented 1 month ago

Then I don't see any restrictions on code you write. Just take care that third party libs you use work on android. It is recommended to export and test on all platforms frequently.

But in any case i recommend you just try it and see if it suits you and your needs. A little sample project and a bit of dabbling around with your chosen libs and patterns is definitely a good idea.

Ali-RS commented 1 month ago

Thanks, going to give it a try.

chippmann commented 1 month ago

Personally i haven't come across anything i couldn't use on the platforms you've mentioned and since the latest release, we shouldn't have any issues with reflection anymore.