New 3D rendering, MSDF fonts & more in 0.12.0

Build 2D & 3D games in Kotlin.

LittleKt is a free, open-source game framework built on WebGPU. Write your game once and ship it to Windows, macOS, Linux and the web.

implementation("com.littlekt:core:0.11.0")
MyGame.kt
class MyGame(context: Context) : ContextListener(context) {
    override suspend fun Context.start() {
        val logo = resourcesVfs["logo.png"].readTexture()
        val format = graphics.preferredFormat
        val batch = SpriteBatch(graphics.device, graphics, format)
        val camera = OrthographicCamera(960, 540)
        val clear = Color.BLACK

        onUpdate {
            renderFrame { frame, encoder ->
                val pass = encoder.beginRenderPass(
                    RenderPassDescriptor(colorAttachment(frame, clear))
                )
                camera.update()
                batch.begin()
                batch.draw(logo, 50f, 50f)
                batch.flush(pass, camera.viewProjection)
                batch.end()
                pass.end()
            }
        }
    }
}
  • Windows
  • macOS
  • Linux
  • Web
  • Kotlin/JVM
  • Kotlin/JS
  • Kotlin/Wasm
Idiomatic Kotlin

Simple code, no boilerplate

Coroutines for loading, DSLs for building scenes and extension functions everywhere. LittleKt feels like Kotlin, not a port of something else.

  • Load assets with suspend functions
  • Build UIs with a Compose-style DSL
  • Drop down to raw WebGPU any time
Write your first app
val atlas = resourcesVfs["tiles.atlas.json"].readAtlas()
val hero = atlas["hero"].slice

onUpdate { dt ->
    renderFrame { frame, encoder ->
        val pass = encoder.beginRenderPass(
            RenderPassDescriptor(colorAttachment(frame, Color.BLACK))
        )
        batch.begin()
        batch.draw(hero, x, y, rotation = angle)
        batch.flush(pass, camera.viewProjection)
        batch.end()
        pass.end()
    }
}
Why LittleKt

A framework, not an engine

Inspired by libGDX and KorGE. You stay in control of your game loop, your code and your architecture.

Free forever

Apache 2.0 licensed. No fees, no royalties and no splash screens. What you build is yours.

Build your own engine

Use only what you need. Every layer is open, from the scene graph down to the GPU device.

One codebase

Share your game code across desktop and web with Kotlin Multiplatform.

Start building today

Grab the starter template and have a window on screen in minutes.