Render Engine

Lightweight 2D graphics library for Kotlin

v1.3 • Kotlin • OpenGL

Build 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.

Features

🎨 Rendering

Sprites, shapes, and text with texture atlas optimization.

⌨️ Input

Keyboard and mouse events with press, hold, and release states.

📷 Camera

2D camera with zoom, smooth follow, and coordinate transforms.

🔤 Fonts

TrueType and OpenType support with Unicode rendering.

📦 Resources

Minecraft-style resource packs for easy modding.

⚡ Performance

Tick-render separation with automatic interpolation.

Quick Start

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()
}

Documentation

Tech Stack