What's the current state do you guys think of usin...
# gamedev
g
What's the current state do you guys think of using kotlin for games outside of android? I see the above 2D game engine which looks pretty cool, but what about 3D? I guess you could hypothetically use native to bind into stuff like unreal but that seems like a small nightmare and no ROI.
a
It would be nice to have a collection of Kotlin gamedev engines, libraries, utils, etc. For 3d there are a few options • https://korge.org/ of course • https://github.com/utopia-rise/godot-kotlin-jvm And I've seen some cool experiments: • https://github.com/hiperbou/kotlin-unreal via the Unreal JS bindings • https://github.com/kotlin-graphics/vkk Vulkan graphics • https://github.com/kotlin-graphics/gln OpenGL graphics • https://codeberg.org/Kenta/KaylibKit Raylib And there are are loads of Kotlin Multiplatform utils. The most pertinent one is an ECS lib https://github.com/Quillraven/Fleks
btw I'm working on Kotlin/Native bindings for Raylib. Nothing released yet, but let me know if you want to take a look send a PM and I can share the repo. I really like Raylib. I much prefer doing purely code-based gamedev over gui-based like Unreal or Unity!
👍 2
Some of the benefits for Kotlin would be • support for multiple targets, so you could code once and sharre your game on multiple platforms (at least in principle, in practice it might not be so easy!) • generally Kotlin is easier to use than most gamedev languages, because it's a high level language. (A downside being the abstractions might make performance worse). Kotlin also has solid async/concurrent/parallel support built-in, thanks to coroutines. • The code base could be almost 100% Kotlin, since you could you Kotlin for a multiplayer backend server (and share the data models). And and even for your game's website, if you used Kotlin/JS. So devs could share a lot of responsibilities, even if some areas need some specialist knowledge.
h
Great info! I would like to add to the cool experiment list this one: https://github.com/hiperbou/kotlin-unity Kotlin JS in Unity via Puerts
k
@Adam S Would be curious to see how you’ve managed to go around the memory allocation with Raylib. One of the biggest issues with it is that everything has to be allocated in order to properly use it (as far as I understand it at least.)