Making Games with Kotlin
kotlin.christmas
kotlin.christmas
Hopefully, it gets more attraction from different platforms because staying in the JVM land and being able to use an expressive & lightweight language is great!
In short, if you are using Spring and are ignoring Kotlin, you are missing out a lot of good stuff. Or in other words, the same that happened to Java on Android is now happening to backend Java. You can still use it but why would you when things can be so much better with a simple upgrade to Kotlin (I've migrated tens of thousands of lines of code, it's easy). And yes Java 9-14 added a bunch of things that are definitely nice/useful but it doesn't come close to Kotlin in terms of expressiveness and language ergonomics.
Also, KotlinConf was on last week. There was a nice presentation about the state of kotlin-js, which is getting some nice updates in the next year including much better dead code elimination resulting in very compact minified code (< 100kb is now feasible for simple stuff), better integration of existing typescript type script defifinitions (i.e. support for most relevant npms out there), better build tooling in the form of an improved gradle plugin. Or put different, Kotlin might start doing to typescript/javascript what it already did to Java. IMHO it's a more capable language than typescript, which I consider to be pretty nice but it just lacks a bunch of things and comes with a some ugliness that relates to backwards compatibility with js.
In related news, Kotlin native is also happening. So, Kotlin is joining a list of full stack languages that used to be really short.
They already have a few multi platform things. Mainly Ktor currently, which kind of should work on native. Additionally, you can target the node-js ecosystem via Kotlin-js. Also, one goal with Spring Kofu at least is also supporting GraalVM at least.
They are also adding more platforms to the native target.
Reading between the lines with what was announced last week at Kotlinconf, I expect a lot of this stuff might stay at least partially experimental through the 1.4 cycle (current is 1.3.61) and would expect that they might start pushing harder on backend native stuff around 1.5. Also there are still a lot of question marks around things like WASM where e.g. MS has a more clear strategy with .Net and Blazor.
This only goes for Valhala. The other examples seem to be java playing catch-up to Kotlin (Panama for Kotlin native and Loom for co-routines).
Does Kotlin/Native support multi field value classes?
Yes you can get around portability issues with multiple platform Kotlin, as many other guest languages have tried to.
However then one begs the question why use the language at all, when having to write the same stuff multiple times.
I rather have the JVM, .NET take the OS decision away, not see them as yet another OS to deploy on.
Assuming a JVM is installed, distribution is as simple as sending a packaged .jar file.
There is a huge ecosystem of available libraries in Java, many with Kotlin wrappers for idiomatic usage.
I know games aren’t exactly meant for enterprise, but it’s been even longer since I had a JVM on my private computer. Maybe I’m alone in that?
This is not to shit in Kotlin, it’s certainly a nice language, but I wouldn’t expect widespread adoption to be what it was a decades ago.
You just create a custom image for you application with the Java linker.
At least in Linux the package management systems enable packagers to specify dependencies such as the JVM. In Windows perhaps it's possible to bundle a JVM of choice.
Nowadays of course the web has blunted our pain receptors for memory bloat and non-native UIs, thus you're probably running three Electron apps right now, compared to which Java is Win32ASM.
And as others pointed out, for games it doesn't matter anyway. You're not building a AAA-game or something for a 6510, so GC pauses and memory consumption don't matter, either. Plus rapid-development, refactoring and a setup where OOP actually makes good sense.
I wouldn't start Kotlin for that, but if you already know it, there's no reason not to use it.
On the other hand, Android tablets and laptops are part of the new desktops.
I'm sure there are still people doing it but it's becoming quite rare that that does not involve electron or similar with a lot of web technology. I haven't come across any projects involving desktop UIs in recent years. Plenty of native IOS/Android + web. But absolutely nothing that had desktop UI on a roadmap or backlog or even on a nice to have list.
Java used to own that space when it still existed. IMHO that went away between 2005-2010 time frame. Before that you could get away with not supporting OSX (or Linux, ever the afterthought) and building stuff with Visual Basic, Delphi or whatever.
And Android Java is still kind of Java, so Android running on ChromeOS or tablet plugged into a docking station, and one gets a desktop.
Enterprise applications are almost exclusively web based. And consumer software that isn't games is mostly web based in electron or one of a few remaining big desktop products (e.g. MS Office or Adobe tools) and also a long tail of relatively niche stuff.
The tool I use daily for making money is Intellij, I don't f* care that the menus and buttons do not match my DEs, I would also prefer programs that use the system defaults rather then try to implement a better theming with custom buttons,colors and whatever some designer with big ego thinks is cool today(I can't understand why they like slim fonts with low contrast colors)
https://touchlab.co/kotlin-native-stranger-threads-ep-1/
We're even getting early support for multi-threaded coroutines
https://github.com/Kotlin/kotlinx.coroutines/blob/native-mt/...
They apparently did it last year as well, so the domains have lasted at least a year, then?
[0] https://en.wikipedia.org/wiki/List_of_Internet_top-level_dom...
Who will be more compelled to click on a Christmas link in, say, July? A christmas-themed link in February or March seems stale as hell.
I don't think they seem stale, but perhaps out of season Either way, we're committed to keep this content online for the foreseeable future, and write a new edition next year if people find it interesting.
We've been experimenting with this model too, as "write once, run anywhere" is very tempting for business logic, but those platforms have traditionally fallen down when it comes to UI and other native functions (e.g. alarms, sensors, etc). So far, it's proving very do-able. Non-trivial in some areas such as multi-threading, but a lot more practical than replicating the same logic across Android, iOS, and web.
The individual talks' videos aren't up yet but you can probably find it here: https://youtu.be/nfb6lDnvtKQ?t=13852
Also, Kotlin let you use tons of java libraries.
EDIT: Apparently it's not dead and there seem to be up-to-date instructions here: https://medium.com/@bschulte19e/deploying-your-libgdx-game-t...
I used RoboVM just like that person in the article, but I used it with Intellij IDEA instead of Android Studio.
It works and it's pretty easy and straightforward to set up.
There's no reason the wrapper couldn't be enhanced to use the Java library on the JVM and something else on native but it would probably be a lot of work.
> OPENRNDR is a tool to create tools. It is an open source framework for creative coding, written in Kotlin for the Java VM that simplifies writing real-time interactive software.