4 ms·
He mentioned a bunch of languages, and I'm not sure why he doesn't look into something like Kotlin. It's the JVM so you get maturity and it's fast as hell (ran
by Mikeb85 11y ago
He mentioned a bunch of languages, and I'm not sure why he doesn't look into something like Kotlin. It's the JVM so you get maturity and it's fast as hell (ran a few economics-related benchmarks on my machine, OpenJDK 8 beat both C++ and Fortran!), has great IDE support (Intellij IDEA - which will actually translate Java into Kotlin if you want to translate snippets), and it doesn't strong-arm you into an OO style. And of course Lwjgl 3 is written mostly in Kotlin.
If he liked Flash, I'm also surprised he didn't go with Haxe. It's fairly mature, is a very nice language (Swift looks like it was mostly ripped from Haxe), with OpenFL he gets the Flash API (but can also compile to native or JS), and of course Haxe also has other frameworks available, or can even be used with native frameworks quite easily.
Anyhow, as far as C goes, it's a decent enough choice. It's simple enough, if you don't mind writing helpers for various tasks and building your own libraries then why the hell not. I definitely prefer the typical C style of programming to the prevailing C++ style.
- krat0sprakhar 11y agoI've been meaning to get into Kotlin and building a game sure sounds like fun. Are there any Kotlin specific game programming frameworks (or any other resources for that matter) that you'd recommend?
- Mikeb85 11y agoWell Kotlin is basically a drop-in replacement for Java. You can literally create a Kotlin project in Intellij IDEA (Community Edition), drop in some jars (and compiled native lib if required), and you get full completion to every class, and everything 'just works'. So the obvious choices would be LibGDX and Lwjgl 3 (which is written mostly in Kotlin). As for tutorials, it's close enough to Java that you can rewrite anything pretty much word for word (albeit with a slightly different syntax), and there's a Java -> Kotlin translator in IDEA. It keeps the semantics very close to Java, but with some sugar and niceties. It really is the 'Java replacement' that languages like Scala and Ceylon attempted to be.
- ZoFreX 11y agoMaking games on the JVM is a lot of fun, but the garbage collector does limit what you can do (the OP mentions this as one of the drawbacks of Go).
- Mikeb85 11y agoDoes it though? Java's garbage collector is very mature and can be tuned any which way. It's definitely more mature than Go's (although Go's is getting better all the time). Not to mention, Unity uses a garbage collector (for all the C# bits, which is a very significant part), as does Unreal (their own written in C++), and even game-oriented languages like Flash and Haxe have garbage collectors. I'm not sure it's as big a problem as popular wisdom would state. Edit - here's some documentation from Oracle about tuning the GC: https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/ergonomics.html#sthref12 https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc...
- ZoFreX 11y agoIt's entirely possible I'm behind the times, I haven't attempted game programming on the JVM in a long time.