Back to browse
I made a 2D Lua game engine using Rust with code and asset live reload

I made a 2D Lua game engine using Rust with code and asset live reload

by brettcodes·May 19, 2026·30 points·1 comment

AI Analysis

●●●BangerCozyShip ItNiche Gem

Live reload without losing game state beats Love2D's restart workflow for rapid prototyping.

Strengths
  • Live reload applies code and asset changes instantly without resetting game state.
  • Single command exports builds for web, Linux, macOS, and Windows simultaneously.
  • Built-in pause menu with input remapping saves boilerplate for every new project.
Weaknesses
  • Fixed 320x180 resolution constraint may limit developers needing higher fidelity.
  • Not suitable for medium-to-large games or mobile targets beyond web exports.
Category
Target Audience

Indie game developers and pixel art hobbyists

Similar To

Love2D · Pico-8 · Godot

Post Description

I love making small 2D pixel art games, especially using tools that have some constraints. Things like Pico-8 and the Playdate SDK are simple, fun, and allow for focusing on the game idea rather than the technical minutia. Years ago I prototyped an idea for this little game engine, Usagi, but used Rhai instead of Lua. The idea for this little game engine never went away, so I decided to finally dig in and build it.

Today I released v1.0.0 of Usagi Engine after making a bunch of small games, getting feedback from developers, and stabilizing the API. It's simple, has a great developer experience (CLI-based, init template, Lua plugin integration, and cross-platform export for web, Linux, macOS, and Windows with a single command).

The engine is public domain, and its source is on GitHub (linked from the website).

Rust was a great fit for this project due to its stability and tooling. The crate ecosystem is a real highlight for me. Plus clippy. I made a couple of games in Rust in the past (using Macroquad) which prepared me for this project. But for Usagi I decided to go with Raylib for it's maturity. Usagi is using sola-raylib, the Rust bindings for C Raylib with some Rust-y wrappings. I maintain these bindings, which also was a big help to be familiar with what's possible with Raylib.

The well known tools that are similar are Pico-8, Picotron, Love2D, and DragonRuby Game Toolkit. They all have their strengths and weaknesses. I think Usagi fits in a little spot amongst them where it's free, open source, and has a much more modern developer experience.

Now that the engine is v1.0.0, I'm going to focus my energy on making games with it, writing a book of tutorials, and creating video screencasts. I love sharing what I learn and helping people make their games.

I'd love it if you checked the engine out, and I'm looking forward to seeing what people make.

Similar Projects

Security●●Solid

RustNmap

Native Lua engine for NSE scripts sets it apart from RustScan's wrapper approach.

Big BrainBold Bet
greatwallisme
201mo ago