Replies: 5 comments 1 reply
-
One thing to note though is that web games written in other languages than JS/TS tend to be harder to debug and more error-prone. It's cool that you can write your game once and export for multiple platforms, but realistically - even with pure Java and no complex LibGDX extensions - supporting the web is a pain. I don't think I've ever had a worse experience debugging my code than with GWT. LibGDX and KTX are the best fit for mobile games. If you want to focus on web games, I'm afraid JS frameworks might be your best bet. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed overview. I just recently learned that web games are stuck to being single threaded even if I did find a solution, which is a necessity for my game. It looks like I just have to give up on supporting web, which is kind of a relief tbh, I was not looking forward to all the issues that come with supporting web. |
Beta Was this translation helpful? Give feedback.
-
Well, there are web workers that you could use, but since they cannot share state like Java threads, you'd probably have to rewrite significant portions of your game. You can also simulate "green threads" or coroutines with async operations, similar to how KotlinJS/TeaVM achieve this despite JS being single-threaded, but obviously that isn't true parallel processing.
In my experience, if you want to support the web, you should start with the web, as it's the most limited platform by far. Even with plain Java + LibGDX you need to constantly track GWT compilation and performance if you don't want to end up with an unplayable application. |
Beta Was this translation helpful? Give feedback.
-
I'm currently working on this, using Bytecoder and WebGl. I'm working on it until 30 January 2021(my traineeship for Computer Science Bsc degree). Check my project and latest findings here: https://github.com/squins/libgdx-wasm-with-bytecoder |
Beta Was this translation helpful? Give feedback.
-
@CoenRijsdijk That's a very cool project, keep us updated! |
Beta Was this translation helpful? Give feedback.
-
Are there any viable solutions to export to web? Or is all hope lost until korge is good enough? Even if it was though, you have to sacrifice all the cool java libraries built over the years for kotlin multiplatform. I've heard rumours about teavm or something called dragome but I don't know much about them.
Beta Was this translation helpful? Give feedback.
All reactions