Страницы

суббота, 2 мая 2015 г.

Will Kotlin be the future for libGdx to target Web platform?

Currently, libgdx uses GWT plugin to target web platform. And GWT doesn't support even Java 1.6! See official docs. And it allways needs source files! (see GWT/html section in libgdx docs) It's not allways affordable.

What about Kotlin? It's robust, brand new language which is fully compatible with JVM, starting from Java 1.6+!

Let's see what's about integration in modern IDE's. Kotlin plugin for Android Studio / IDEA successfully compiles both .kt and .java files to .class! (see here and here for android)

And what about starting to code best libGDX projects in Kotlin and deploy them to web now? Now we have libgdx backends only for GWT...

What we may try now?

1. Kotlin can be converted to javascript thanks to JetBrains. Here is an example of web project, where javascript is generated from kotlin code. So, we may do that generation for now (hoping things become better in the future) and add generated javascript to GWT's web project to use with libgdx gwt backends as usual. In theory, it could work.

2. Or we may try investigating about current possibilities of Kotlin in conversion to javascript, running HTML5. Get gwt backend sources as an example and write our own backend for Kotlin's javascript and contribute to libGDX?

What will you say? Interesting, isn't it? I'll be glad to see your thoughts! Post comments, please


Комментариев нет:

Отправить комментарий