Game engines and frameworks

I have tried and played around with just about every damn, somewhat known, game engine and framework that is out there. I've used many different languages, game development styles, and just full-blown editors. And there are two things that I found that I love that I could not find anywhere.

Code only low level 2D game framework and Kotlin. I found I do not like be restricted to a certain pattern or style and like to branch out and do my own thing. Editors (Unity, Godot) restrict this even more and make refactoring such a painful experience that I've just completely stopped using anything like it.

LibGDX

The closest thing that comes to mind is libGDX with LibKTX but does not get the full benefits of using a game framework written completely in Kotlin. The freedom and flexibility and the code-only type of development that libGDX has to offer are exactly what I was looking for. LibKTX adds a bunch of syntactic sugar which made it very enjoyable. But unfortunately, libGDX is not able to target the JS platform using Kotlin. And for me, that was a problem due to mainly wanting to distribute games for game jams via the browser versus having to have to download a binary. Although libGDX didn't have exactly what I wanted it is the biggest inspiration for the main point of this post.

KorGE

I found KorGE to be almost everything I wanted. It had the syntactic sugar, coroutines, utility extensions, quality of life fixes, and most importantly written completely in Kotlin with multiplatform in mind. I loved it and used it for Ludum Dare 48. The developer has thought of almost everything you think you'd want and in some idiomatic fashion as well. The thing that forced me to stop using it is the way a view and a container work. A view itself is not able to have any children. But a container can. If you wanted a sprite that had a child sprite you would need to have a separate container that held that child and then sync the positions. This made for some very awkward code and handling of what I wanted to do. With that said, I do love KorGE and it is the other big inspiration for the main point of this post.

What to do next?

After spending ages trying out all those different frameworks and languages and finding nothing that suited me I decided that if I truly wanted those things I stated above then I would have to write it from scratch. And that is exactly what I did. Thus LittleKt was spawned.

LittleKt

LittleKt - Platformer Example
LittleKt - Platformer Example

LittleKt is a Kotlin game development framework with multiplatform in mind. Currently, it targets JVM and the web with mobile planned in the future once everything is tightened up with a focus on 2D. As of writing this, LittleKt is still heavily in development but is in a workable state.

LittleKt aims to be what libGDX did for me in terms of freedom and flexibility with the syntactic sugar and idiomatic approach that KorGE took. LittleKt has a light abstraction over OpenGL with a bunch of tools and utilities to help build a game.

It currently has a bunch of features supported such as:

  • Coroutine support
  • LDtk tilemap support
  • TTF file parser and loader
  • High-performance GPU-based font vector rendering
  • Bitmap fonts.
  • Input handling including gamepads
  • Optional scene graph with own UI implementation inspired by Godot's. (UI is currently a work in progress as of writing this)
  • Simple particle system
  • An idiomatic virtual file system based on KorGE's implementation
  • An asset manager/provider to make loading and preparing assets easy
  • Audio support
  • Custom optional GLSL runtime code generation when creating shaders
  • Animation and animation player
  • Matrix and Vector math classes

There is still a lot to do to get this where I want it to be but it is at least a start and I am very happy with it and the progress that has been made. Huge thanks to libGDX and KorGE developers and their communities for creating such awesome frameworks.

If you are interested, you can check out the source on GitHub. There is also a samples repository as well.

© 2020-2023 Colton Daily / LeHaine, all rights reserved.