r/lua • u/yughiro_destroyer • Sep 01 '25
Help Would a new Lua game engine be well received?
Hello!
Yes, many game use Lua for modding like Roblox or FiveM. Also some game engines like Cry Engine or Defold use Lua as well for scriping. But I can see that Lua is slowly fading away when it comes to game development. Many people love C# much more which, IMO, is a good language but has a lot of boilerplate code that's overkill for many small or medium applications.
I am tempted to try building my own game engine and see if I can do it better. I would most probably not write my own rendering pipeline or physics engine because there's OpenGL and Bullet for that. I want to combine battle proven and well tested libraries into an easy to use framework with an editor.
For context, I dislike Unity for being too heavy and while I enjoy Godot it kind of scares me with the amount of bugs it has. Unreal is another story though - no single man can compete with their lighting algorithms but not everyone needs them.
I've seen people who were able to pull out something like this - namely Flax or Cave engines, made by one person. But I can't say I totally agree with their policies or API choices.
What do you think? It's worth a shot? I expect it to take a year of moderate effort to get a working and bugless MVP because that's what I prioritize - stability over features while making it expandable through code for people who need to write those features by themselves.
7
u/didntplaymysummercar Sep 02 '25
Open GL is a graphics API, not a rendering pipeline. It can't even load any image or model format by itself, it doesn't do anything by itself. If not rendering or physics then what will the engine do? Audio, logic, networking, etc.? ECS?
I'm not gonna discourage you but maybe instead of setting out to write an engine write some games and then as you keep reusing the same stuff you'll get your engine naturally. Some engines got created like that, including id tech.
In Rust some people joke there are more engines than games.
4
u/Pedka2 Sep 01 '25
id like to have a 3d lua game engine
2
u/neogameentropy Sep 02 '25
Do give it a shot. If you succeed we will have another great lua game engine to choose from.
2
u/Chris_Entropy Sep 02 '25
For what you want to achieve, wouldn't it make more sense to use LUA scripting in an existing engine? There are for example already plugins for LUA for Unity and Unreal. No need to reinvent the wheel.
32
u/immortalx74 Sep 01 '25
I assume you already know about LOVE2D. But I don't know if you're aware of LOVR, a Vulkan powered 3D engine which uses a similar API to LOVE2D, mostly tailored for VR but can happily do general 3D games. Fairly low level (for a Lua scripted engine) with Jolt physics.
20
u/adbs1219 Sep 01 '25
Why not contribute to an existing engine like Defold or create an editor for Love2D, LOVR or Solar2D?
4
u/Denneisk Sep 02 '25
Game engine world has pretty stiff competition, Lua or not, but I think it's worth a shot either way. I agree with being a bit disheartened about the fall of Lua from gaming grace.
From a practical view, you should consider utilizing (or allowing the usage of) LuaJIT or Luau if you can. I know Luau is a bit heretical, but it has a killer VM so it stands well as a LuaJIT alternative. Even if you choose neither, I still think Lua >5.1 deserves more love, so I can't complain.
2
u/benjamarchi Sep 01 '25
Go for it!
2
u/Ed_Blue Sep 02 '25
LUA's biggest advantage by far is its tight coupling to the C spectrum of languages aswell as how simple it is to use for how much performance you can get out of it using that.
I'd be all over something that integrates both LUA and a C-based language well enough to be able to interop between them seemlessly. In my eyes it'd be the best of both worlds between low and high level languages. Even better if the LUA side of things compiles to JIT.
1
u/ripter Sep 01 '25
There are several Lua game engines out there and they are pretty good. If you want to make your own you should go for it! There is so much you’ll learn by doing so. I would recommend building a simple game in the others before you start so you have an idea of what has been done before and you can build off their ideas and change the things you don’t like about them.
1
u/Square-Singer Sep 02 '25
On a related but slightly off-topic note: I am working on a physiotherapy game console that helps sick kids do their physio better.
The games on there run in a DIY lua game engine. It does 2D and mode-7-style fake 3D so far, but I'm working on adding 3D as well.
The console is based on the Lilygo T-HMI running on an ESP32-S3. I chose Lua for its very small overhead compared to other scripting engines.
1
u/bythepowerofscience Sep 02 '25 edited Sep 05 '25
As someone who's used Lua: please use a language with better syntax, or else include official support for TypeScript-to-Lua.
Lua is an amazing language for what it can do, but by god is it the worst language to work with. It's got all of the QoL of early 2000s JavaScript combined with the syntax of BASIC. It's genuinely awful to program in, and I've gotta assume the only reason anyone uses it is because it's already the standard.
1
u/konzeptzwei Sep 02 '25
Try Playdate, it’s radical and fun 🤩
1
u/vitiral Sep 03 '25
I'm not an expert, but from what I've seen I'd think a Rust+Lua hybrid engine could definitely gain popularity.
1
u/Positive_Total_4414 Sep 03 '25
Also check out https://www.crownengine.org/
1
u/Kekipen Sep 03 '25
What would be different or better about your engine compared to Defold, Roblox and Love2D?
How about Godot? What could possibly your engine do better?
1
u/epyoncf Sep 03 '25
About as many people will use your engine for development, as your flagship game on that engine will have daily players.
You do intend to release it with a flagship game, right? Right?
-1
u/AutoModerator Sep 01 '25
Hi! It looks like you're posting about Roblox. Here at /r/Lua we get a lot of questions that would be answered better at /r/RobloxGameDev, scriptinghelpers.org, or the Roblox Developer Forum so it might be better to start there. However, we still encourage you to post here if your question is related to a Roblox project but the question is about the Lua language specifically, including but not limited to: syntax, language idioms, best practices, particular language features such as coroutines and metatables, Lua libraries and ecosystem, etc. Bear in mind that Roblox implements its own API (application programming interface) and most of the functions you'll use when developing a Roblox script will exist within Roblox but not within the broader Lua ecosystem.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-2
u/BK_Onty Sep 02 '25
YES!! DEFOLD SUCKS BAD!! I had to use Godot with the Lua plugin.. All because Defold was a pitiful mess..😐
We need a Lua game engine that works..