# I made a 2D Lua game engine using Rust with code and asset…

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…

- **Page:** https://magpie.gallery/i/i-made-a-2d-lua-game-engine-using-rust-with-code-a-pddm
- **Type:** Link to an idea elsewhere
- **Category:** Games
- **Runs on:** windows, macos, linux
- **Tags:** game-engine, lua, rust, pixel-art, live-reload

## Source

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

- **Original:** https://news.ycombinator.com/item?id=48198462

> 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. https://usagiengine.com/

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
