UshFramework lets you create 2D games with Lua and SDL2. It’s fast, lightweight, and perfect for beginners and pros alike.
Download Now
Write simple Lua code in a single main.lua
file. No complicated setup, just start creating.
Graphics, sound, input, animations, and scenes—all in a lightweight package for your 2D games.
Powered by SDL2, UshFramework ensures fast rendering and smooth gameplay.
Try this simple example: move a square with arrows or WASD and press space for a sound.
local x, y = 400, 300 local speed = 200 function init() load_sound("click", "click.wav") set_volume("sound", 75) log("Game started") end function update(dt) if is_pressed("space") then play_sound("click") end if is_down("left") or is_down("a") then x = x - speed * dt end if is_down("right") or is_down("d") then x = x + speed * dt end x = math.max(0, math.min(x, width() - 50)) end function draw() clear({r=20, g=20, b=40}) rect(x, y, 50, 50, {r=255, g=100, b=100}) text("Move with arrows or A/D, space for sound", 10, 10, 16, white) text("FPS: " .. get_fps(), 10, height() - 20, 16, yellow) end
Steps to Start:
ush-installer.exe
.main.lua
file with the code above.click.wav
to your project folder.ush run
in your terminal.Released: May 26, 2025
Version 0.2.0 brings a big upgrade with a switch to SDL2, plus new features to make game development even easier.
SDL_Renderer
for smoother 2D graphics.SDL_GetKeyboardState
and SDL_GetMouseState
.SDL_ttf
for fonts and SDL_mixer
for audio.camera_move
and camera_zoom
.set_scene
and register_scene
.create_body
and get_collision
.play_sound
and play_music
.load_font
and text
.show_debug
.load_texture
and sprite
.timer
.save
and load
.SDL_Scancode
.Older Lua scripts (v0.1.x) need updates for SDL2 APIs. The Breakout game example is updated for v0.2.0.