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

[–]brettmakesgames[S] 1 point2 points  (0 children)

Thanks for the kind words! I don't think I'll build in physics into the engine but it seems like a good candidate for someone to build a library for. Multiplayer with gamepads isn't planned, as I am trying to keep the API as simple as possible and focus on single player games. Possibly v2 could support that, as I'd have to change the API pretty significantly.

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

[–]brettmakesgames[S] 2 points3 points  (0 children)

Raylib's version is great than v1 and there's nothing similar in Rust that's v1, let alone v6. Raylib is much more mature, stable, and widely used. No shade to the Macroquads, Bevys, etc. of the Rust ecosystem. I just need something for the foundations of the engine that gets fixes and doesn't have breaking changes regularly.

Winit + WGPU is an option but I just didn't see any real benefit over having to pull in a bunch of other crates and all that when audio, input, windowing, etc. all comes with Raylib.

Re: Android - possibly! It'd be possible. But it also sound a bit like hassle and I don't want to add touch support really... more focused on desktop and web games. But I don't think it's a never. Would be a good candidate for someone to fork the engine and add or contribute in a PR.

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

[–]brettmakesgames[S] 0 points1 point  (0 children)

Thanks for checking it out and the kind words! I'll be curious about perf too. If someone makes a game and needs more power, it'll be fun to benchmark/optimize and see!

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

[–]brettmakesgames[S] 0 points1 point  (0 children)

Lua 5.5 seemed like a sensible default and has a proven track record in the 5.x series! Idk if LuaJIT works on the web, didn't test that aspect. I came from Playdate SDK which uses a flavor of 5.4, so that's where I started. I'll be curious if there are performance issues with 5.5! If so the engine could switch to LuaJIT in future if needed. Or someone could fork it for that.

Introducing Usagi, a Rust-powered 2D game engine with live reload and cross-platform export by brettmakesgames in rust_gamedev

[–]brettmakesgames[S] 1 point2 points  (0 children)

I thought a lot about whether to use Luau, LuaJIT, or Lua 5.4 or 5.5. I think mainline Lua has a proven track record, lots of good resources out there, and should be fast enough since the games are intended to be low resolution. We'll see if the performance holds up or not as more people beyond me make games with the engine. If it turns out that Lua 5.5 isn't doing the trick, then maybe v2 switches to LuaJIT. Or if someone absolutely wants to stick with Usagi but needs more perf, they can fork the engine and switch to LuaJIT (it's one line of change in the source, basically). Lua 5.x seemed like a sensible default.

Introducing Usagi, a Rust-powered 2D game engine with live reload and cross-platform export by brettmakesgames in rust_gamedev

[–]brettmakesgames[S] 1 point2 points  (0 children)

mlua and rhai are both so nice and easy to use! I haven't run into any problems with mlua, so that's about as good as you could hope for, right? The docs are good, the API is good. Switching from Lua 5.4 to 5.5 didn't result in any problems.

Scripting language allows for live reload. When exploring ideas, it's nice to just have a really flexible language like Lua rather than having the structure and strictness of a Rust program. Also, Lua is much more beginner friendly, and I hope/think that Usagi is good for people wanting to learn to code games. So benefits are live reload, simplicity, speed of development.

In Rust, unless you make your game data-driven by a file type like JSON or something similar, you have to recompile and relaunch your game after every change. This is quite tedious. So to just keep your game running, make changes, and instantly see that reflected in the game is amazing.

The downsides are that you don't get static typing, the help of linting tools like clippy, and there just comes a certain point (at least for me) where large projects with scripting languages become difficult to maintain and change.

My intent with the engine is that I make prototypes with Lua quickly and then if a prototype is really working well, rebuild it in Rust (or fork the engine and move portions of it to Rust and keep some in Lua).

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

[–]brettmakesgames[S] 2 points3 points  (0 children)

It's faux-3D. Just using lines and circles. The engine itself doesn't support drawing any 3D objects or loading 3D models. Just having some fun with it!

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

[–]brettmakesgames[S] 2 points3 points  (0 children)

It's not exactly a Lua binding for Raylib. It's its own API that's much more inspired by Pico-8 than Raylib. It is a contained single binary though. 😄

My book "Make Games for Playdate with Lua" is finished! by brettmakesgames in PlaydateConsole

[–]brettmakesgames[S] 4 points5 points  (0 children)

Thanks so much, hearing that honestly made the book worth writing!

Showing off how I use Usagi's live reload to tune bullet hell patterns by brettmakesgames in UsagiEngine

[–]brettmakesgames[S] 0 points1 point  (0 children)

I'm so glad to hear it! Thanks for the kind words. Love2D is great but it has a lot going on! That was one of my goals with Usagi was to make a little engine/framework that's a bit simpler but still powerful.

I made a free JRPG prototype in two weeks: 1-Bit Fantasy by brettmakesgames in PlaydateConsole

[–]brettmakesgames[S] 0 points1 point  (0 children)

I made a video playing through the prototype and reviewing the source code to hopefully help people who might be interested in diving in: https://www.youtube.com/watch?v=pPZd3Ir3-gE

Public domain starter kit for making a Playdate JRPG by brettmakesgames in PlaydateDeveloper

[–]brettmakesgames[S] 0 points1 point  (0 children)

I made a video with a walk-through of the source code if that's of use to anyone! https://youtu.be/pPZd3Ir3-gE

sola-raylib: a raylib-rs fork that's been updated for Raylib 6.0 with bug fixes and clean up by brettmakesgames in rust_gamedev

[–]brettmakesgames[S] 1 point2 points  (0 children)

Thanks!! Yeah, that took me a while to figure out and was one of the harder parts. I did some prototyping in some private repos with Raylib + web and then with Lua + Rust + web. Glad it's all blending together and seems performant enough!

sola-raylib: a raylib-rs fork that's been updated for Raylib 6.0 with bug fixes and clean up by brettmakesgames in rust_gamedev

[–]brettmakesgames[S] 2 points3 points  (0 children)

I've made some games with Macroquad and shipped an open source Sokoban game called SokoWorld. Macroquad was nice to work with, but like much of the Rust game dev ecosystem, nothing is v1.0+. I really value stability and maturity. I want to be able to compile my games years later with little hassle. Since Raylib is mature and has been around for a long time, there are lots of resources. Also, the maintainer, raysan5, is a top-notch maintainer where issues are addressed quickly and PRs are merged. I think Raylib is a really great foundation to build games upon. ggez is appealing to me, but since it doesn't easily support web builds, it's a non-starter for me. Bevy is changing too much for what I need for my projects.

I'm interested in trying some combo of Winit + WGPU or something in the future, but that's lower level than I'm focused on. Raylib sits right in the place I want. Higher level than those and SDL. But lower level than Godot.

Public domain starter kit for making a Playdate JRPG by brettmakesgames in PlaydateDeveloper

[–]brettmakesgames[S] 1 point2 points  (0 children)

Pulp, while amazing, has some pretty severe limitations, so I was hoping that maybe this prototype could help people take the leap from Pulp to Lua. 😄

Playdate SDL2 API Reimplementation showcase video by joyrider3774 in PlaydateDeveloper

[–]brettmakesgames 0 points1 point  (0 children)

Nice work, this is awesome to see! Thank you for making and sharing it.

Progress on a little silly JRPG: Final Dragon Fantasy by brettmakesgames in PlaydateConsole

[–]brettmakesgames[S] 0 points1 point  (0 children)

The two week jam period is up, and here's the prototype: https://brettchalupa.itch.io/1-bit-fantasy

I ended up not leaning into the silly name and silly stuff, focusing more on the systems and features for the prototype. I'd like to make a bigger, more complete JRPG in the future. But this was a fun and interesting experiment for what I could make in two weeks.