u/brettmakesgames

▲ 69 r/lua

Usagi Engine v1 Released - Simple Lua 5.5 2D game engine with live reload and cross-platform export

I made a small game engine called Usagi for prototyping 2D games as quickly as possible with Lua 5.5. It's free and open source and made with Rust + Raylib. I just released v1.0 yesterday and thought it'd be fun to share it.

Here's the project's homepage: https://usagiengine.com/

And you can view the source here: https://github.com/brettchalupa/usagi

The engine is used via a command-line, much like cargo. You can usagi init to create a new project. usagi dev to boot up the dev game that live reloads code and assets. And usagi export to generate cross-platform builds of your game for web, Linux, macOS, and Windows.

My motivation for creating Usagi was that I love using tools like Pico-8 and Love2D for prototyping and game jams. But I wanted a free and open source engine with a nicer developer experience. In particular live reload and easy web exports. Usagi embraces constraints and provides sensible defaults, like a pause menu with input binding, to try to help devs focus on the game rather than the ancillary parts of development.

Since the engine is open source, the hope is that if someone makes a prototype they want to turn into a larger commercial game, they can just fork the engine and customize it themselves, write more bits of it in Rust, and change the API as they see fit.

I'd love it if you check the project out and let me know what you think!

u/brettmakesgames — 1 day ago

Usagi Engine v1 Released - A simple Lua 2D game engine with live reload and cross-platform export

I made a small game engine called Usagi for prototyping 2D games as quickly as possible with Lua. It's free and open source and made with Rust + Raylib. I have been seriously working on the engine and games with it over the past month. I just released v1.0 yesterday and thought it'd be fun to share it.

Here's the project's homepage: https://usagiengine.com/

And you can view the source here: https://github.com/brettchalupa/usagi

The engine is used via a command-line, much like cargo. You can usagi init to create a new project. usagi dev to boot up the dev game that live reloads code and assets. And usagi export to generate cross-platform builds of your game for web, Linux, macOS, and Windows.

My motivation for creating Usagi was that I love using tools like Pico-8 and Love2D for prototyping and game jams. But I wanted a free and open source engine with a nicer developer experience. In particular live reload and easy web exports. Usagi embraces constraints and provides sensible defaults, like a pause menu with input binding, to try to help devs focus on the game rather than the ancillary parts of development.

Since the engine is open source, the hope is that if someone makes a prototype they want to turn into a larger commercial game, they can just fork the engine and customize it themselves, write more bits of it in Rust, and change the API as they see fit.

Rust was a particularly great fit for the project. I've made one public Rust game and a few unreleased smaller ones before Usagi. I experimented with using C, but I really missed cargo and all the crates. Writing tests, working with clippy. Just a great experience, as I think fans of Rust already know.

I'd love it if you check the project out and let me know what you think!

u/brettmakesgames — 1 day ago
▲ 175 r/raylib+1 crossposts

Usagi Engine v1.0.0 Released - Free & Open Source Lua 2D Game Engine Powered by Raylib

I've been working on a little 2D Raylib-powered game engine called Usagi. You code your games with Lua, and your game live updates as you save your code and assets. It has single-command cross-platform export for web, Linux, macOS, and Windows. Today I released v1.0.0 after making a handful of games with it and getting feedback.

https://usagiengine.com/

Raylib was the perfect choice for the foundations of Usagi Engine, making cross-platform rendering, input, and audio playback easier than I could have imagined.

I'd love to know what you all think! The engine is coded in Rust, and you can check the source out on GitHub: https://github.com/brettchalupa/usagi

u/brettmakesgames — 2 days ago

I made a free 2D Lua game engine called Usagi with code & asset live reloading, would love to know what you all think

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. The idea 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). It's ideal for prototyping. Seeing your game update as you save in your editor or update your sprites is a real joy.

Usagi Engine is public domain, and its source is on GitHub. It's powered by Rust and 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 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 shared what you think. Thanks!

usagiengine.com
u/brettmakesgames — 2 days ago

My book "Make Games for Playdate with Lua" is finished!

Over the last 18 months I've been writing a book in my spare time about coding games for Playdate with Lua. I wrote it as I was learning the Playdate SDK because I noticed there weren't many written tutorials out there. It's written for beginners, explaining fundamental programming concepts and the Lua language. Each chapter is building a game from scratch, increasing in complexity with each game. You'll make a Pong clone, a turn-based JRPG, a puzzle game, and more.

And the book is finally done! I proofread it and revised it over the last couple of months. The book has been in Early Access since the first few chapters were written, and the feedback has been positive and so motivating.

If you have any interest in making games for Playdate, please check the book out. There's a free sample and the source code for all of the games is open source and freely available. The website has links to the all of the retailers.

I'm still interested in exploring a print version if there's enough interest and the cost is reasonable, but I'm running out of steam and am going to give myself some time to recover after this final push to get the ebook version done. I am hoping to explore that a bit more in the future and also write a retrospective on the book and how it did when all is said and done.

Thank you! The Playdate community is a special group of people and that's part of what made writing the book so fun.

pdbook.net
u/brettmakesgames — 4 days ago
▲ 34 r/raylib+1 crossposts

With the release of Raylib 6.0 and the raylib crate not getting any releases or PRs merged for over 6 months, I forked the project from the latest crates release (5.5.1) and cleaned up the repo, brought in upstream bug fixes, made some of my own fixes, and added the new Raylib 6.0 functions. I've been using sola-raylib for a week in my own projects and so far so good. Massive credit to the various contributors of the upstream—I think it's a really fantastic set of bindings.

I've been making games with Rust for a couple of years now, and the thing I most want is maturity and stability. Bevy, Fyrox, Macroquad, ggez, chuot, etc. are all interesting projects, but I value that Raylib is many major versions in and actively maintained by raysan5. raylib-rs (and therefore sola-raylib) feel like writing Rust, not C, which I think is a bindings crate at its best.

sola-raylib can be used as a drop-in replacement for the raylib crate.

I've been using it to make a Lua game engine called [Usagi](https://github.com/brettchalupa/usagi) with live reloading and cross-platform export. So far, so good!

u/brettmakesgames — 20 days ago

Here's the Lua source code for 1-Bit Fantasy, a little JRPG starter kit/prototype. I wanted to see how far I could get in two weeks and then share it with the community. The source code is all public domain and the assets are CC0 (made by Kenney and Hexany Ives).

I highlighted some of the more interesting technical bits on the dev forum. I'm pretty happy with the code and found it to be quite productive to work in and not too messy. combat.lua is probably the worst of it. 🫣 The scene and subscene switching, along with the message queue, were useful throughout.

Lua is wonderfully flexible! I feel a bit torn between whether to use Lua or C for my Playdate games. I missed the comfort of the compiler. But it was nice not thinking too low level. Pros/cons.

If you want to download the game, you can get it from the GitHub releases or on itch.

I want to make a more polished, non-prototype JRPG. But I've got some smaller prototype ideas to try out next before I commit to something that might take me many months.

u/brettmakesgames — 23 days ago

I set a challenge for myself: could I make a JRPG for Playdate in two weeks? The answer is: kind of! It's by no means a polished experience, but I am pleased to shared 1-Bit Fantasy with you all. It's free, open source, and public domain. I thought it'd be a great starting place for people who want to make a turn-based JRPG for Playdate like Dragon Quest. The prototype is an expansion pack to the last two chapters of Make Games for Playdate with Lua.

You can download the game from itch above and sideload it onto your console. It's not balanced, and I couldn't get to some systems like magic and items in the short two week jam period. But sharing something is better than nothing.

The source for the game is on GitHub, and I hope it's useful for people who want to take it and make a full game with it.

I would like to make a full JRPG for Playdate, but that's a big undertaking, even with the foundations from 1-Bit Fantasy. I'm going to finish proofreading the book, make some more prototypes, and then commit to a project.

Let me know what you think and hope its useful!

u/brettmakesgames — 23 days ago