littlektframework / littlekt

A multiplatform WebGPU 2D game framework written in Kotlin. Build your own game engine on top.
https://littlekt.com
Apache License 2.0
321 stars 12 forks source link

Replace OpenGL with WebGPU as backend #241

Closed LeHaine closed 4 months ago

LeHaine commented 7 months ago

WGPU for desktop and mobile and WebGPU implementation for the browser.

Java FFM and jextract to interact with WGPU and generate bindings.

JNI for Android?

No need to integrate ANGLE into iOS as WebGPU handles it.

LeHaine commented 6 months ago

An update:

Lots of progress made. Rewrote most of the framework to use WebGPU. Moved the scene graph out into its own module. Fixed lots of bugs that were found along the way. All this work is currently done in a separate private repository until I can get it finalized.

As expected, there will be lots of breaking changes. But most of the API is the same. The main difference will be some of the flush & render methods (i.e Batch) but it isn't horrible. Added some new features such as a SpriteCache for instanced quads rendering. Tilemaps also support this new SpriteCache which is awesome for rendering huge levels.

The library package ID has also updated to be a bit more professional looking from com.lehaine.littlekt to com.littlekt. There are still a few more things I need to do but it is coming along nicely!

Currently, desktop (via WGPU) and JS are implemented. I intend to get WASM and Android added before I unleash it in this repository.

LeHaine commented 5 months ago

The webgpu branch is now live. Currently desktop and web are implemented. Android is going to have to take longer due to needing JNI.