Lightweight 2D graphics library for Kotlin
v1.3 • Kotlin • OpenGLBuild games and interactive applications with a simple, powerful API. Render Engine handles window management, rendering, input, and resources so you can focus on your game.
Sprites, shapes, and text with texture atlas optimization.
Keyboard and mouse events with press, hold, and release states.
2D camera with zoom, smooth follow, and coordinate transforms.
TrueType and OpenType support with Unicode rendering.
Minecraft-style resource packs for easy modding.
Tick-render separation with automatic interpolation.
Create a window and start rendering in just a few lines:
import org.lwjgl.glfw.GLFW.*
import ua.terra.renderengine.RenderEngineCore
class MyGame : RenderEngineCore("My Game", -1, -1, 1280, 720, 60) {
override fun onEnable() {
keyboard.onKeyPress(GLFW_KEY_ESCAPE) { window.close() }
}
override fun tick() {
// Game logic at fixed rate (60/sec)
}
override fun onRender() {
// Rendering (can be faster than tick)
renderEngine.flush()
}
}
fun main() {
check(glfwInit()) { "Failed to init GLFW" }
MyGame().enable()
}