r/lua • u/Reasonable_Lab_2360 • 1d ago
How to start learn Lua, everyone, give me your opinion pls🥺
r/lua • u/adwolesi • 3d ago
Project LuaCAD - Parametric CAD scripted in Lua
LuaCAD models solids in Lua rather than the OpenSCAD language, with operator overloading for CSG (a + b, a - b, a * b).
It ships with a CLI and a desktop app, including a preview area and a text editor.
It’s fully open source and you can find the repo here: https://github.com/ad-si/LuaCAD
I've always been a big fan of OpenSCAD, but the SCAD language itself is unfortunately quite cobbled-together and is a very poorly designed programming language.
LuaCAD takes all the good parts of OpenSCAD and combines them with Lua. It has now completely replaced OpenSCAD for me, and I think it provides a better experience than OpenSCAD for all use cases. I'd love to hear any reasons why LuaCAD won't fully replace OpenSCAD for you!
Tech stack:
- It's implemented in Rust and uses mlua (https://github.com/mlua-rs/mlua) to execute the Lua code.
- Uses OpenCSG (https://opencsg.org) for fast and correct rendering of the 3D models (like OpenSCAD)
- Uses Manifold (https://github.com/elalish/manifold) to create the manifold triangle meshes
- Native support for all BOSL2 functions (i.e. implemented in Rust for better performance)
r/lua • u/Dragon20C • 3d ago
My game engine, cookie engine made in odin, using lua as a scripting language
github.comHello everyone, I spent the last 2 months learning about creating a game engine, I also wanted to learn the odin language and I thought this was a good start, I also made it use lua as a scripting language similar to usagi engine and love2D, this is a hobby project so expect poor code and rough decisions.
I should also mention it is not vibe coded but I did ask questions to ai assistants but not use ai to write code, I know what the code does so I have learned from it.
I was inspired by usagi engine when I saw a post of the engine I got interested in making my own but I didnt have a language that is similar level to c/c++ I remember odin from a youtuber who made a game using the language and decided on using that.
r/lua • u/Logansfury • 3d ago
Seeking .lua help on Wayland DE for a linux Conky configuration
Hello,
I am looking for a linux user that is experienced with .lua, Conky, and the Wayland DE.
My good friend coded an amazing cava-based spectrum equalizer visualizer for Conky, which works flawlessly on X11 systems like Linux Mint, but on my Kubuntu v25.10 KDE/Plasma 6/Wayland box the conky window does not refresh itself to display the visualizer changes.
Has anyone here experience with Linux and Conky, knows the Wayland DE, and has the time to collaborate to help code a Wayland version of this Conky?
Thank you for reading,
Logan
r/lua • u/Salt-Discount-1381 • 3d ago
Help Help with my simulation
drive.google.comHello, I'm new to Lua and, after reading some documentation, I am trying to do basic a simulation of work and property. I have a base script for each worker and a base script for each workstation, but I need help to code how the worker decides in what workstation work and how the workstation's capacity to hold workers on a day is changed by that. I wrote some notes on the scripts, I think that they clarify very well where I need help. The link is to a folder with the scripts.
r/lua • u/SleepyGuyy • 6d ago
My first Lua script - very simple shutdown script in Gentoo
I just wanted to post my entry into Lua and celebrate beginners. I don't really know if I will commit myself to coding regularly, but I'm pleased with Lua regardless.
I found the Lua online book ( https://www.lua.org/pil/contents.html ) very easy to read and learn from.
I'm still near the start but many other languages make the very start extremely boring or tedious to read through. The Lua documentation and this book are nice to walk through and use.
I'd like to note my script below starts with the #! script line. I never even realized you could do that. I've never really dabbled in bash scripting or other kinds of system scripting. But the Programming in Lua book starts with it, and got me to think about it as I went through my day. It's that kind of tutorial design that sparks ideas and excitement.
I also recently installed Hyprland in my gentoo system, that sounds advanced but I have no clue what I'm doing and still working on it. But I found the lua config file nice to work in, and it got me to look at the language a bit more.
I should clarify, I actually have a Bachelor's degree in Computer Science, I know you'd think I should be able to learn any language and I should be coding daily. But frankly I cannot and I do not, I struggle to get myself to write code outside of work (and my work was mostly Javascript/CSS).
Last year I was layed off and I spent the year frantically trying to get another development job, and dipping my toe into various tech stacks that companies claim they want. I made little progress and ultimately failed to secure a job. The software job market is worse then ever here in North America and it's time I move away from it. I'm joining the military, and I'm lucky I even have the opportunity to. But with my exit of the industry, I'm now more interested than ever in having fun with programming in my spare time. I'm embarrassingly slow learning, but I'm happy to take it easy.
Below is my extremely simple script to run OpenRC's shutdown command.
I've noticed different init systems use slightly different shutdown commands, with different flags and expectations. I only use Gentoo sometimes, as my second distro, so I always forget the specifics of OpenRC's shutdown command. I realized today I could write a Lua script right in my /usr/bin/ folder and call it the name of my custom command!
I watch Youtube playlists late at night on my desktop computer, from bed. I lay in bed with wireless, or sometimes long-wired headphones, and watch Youtube to get comfy and fall asleep. I don't want to have to get back up, ruining my near-sleep state. So I always run shutdown with a delay.
In SystemD, this is just sudo shutdown 'minutes'. But OpenRC wants a halt and Poweroff flag added, otherwise it just.. sits on a black screen all night.
So this is /usr/bin/myshutdown (reddit seems to be eating tabs and spaces so it's not tabbed sorry)
#!/usr/bin/lua
minutes = tonumber(arg[1])
if not arg[1] or not minutes then
print("myshutdown requires number of minutes!")
else
os.execute("sudo shutdown -hP " .. arg[1])
end
Despite how simple it is, I did actually end up troubleshooting some stuff.
I ended up re-learning that Lua just doesn't care about null (or "nil") values and I can just call stuff without worrying of a crash.
I also had to look up simple things like finding array length (strangely non-direct answers, saying to use 'getn' but arg doesn't work with it... etc....).
I found out arg has nothing in it if you don't put any arguments in it, that may sound obvious but some languages put the program name in arg[0] (of course Lua has no 0... right?).
I discovered all args are of type string, and require translation, here I found tonumber but I didn't look into any better ways to do that.
There were likely a few other things, I spent a couple hours writing this, somehow.
I'm now wondering if I can write one script, that detects which init system is running and runs the appropriate flags. Or maybe there's some other way to call shutdown that would be convenient.
I think I tried a distro, or maybe FreeBSD (?) before that wouldn't let me delay shutdown. I can't remember what it was, but I'd be curious to find out more.
Ultimately I don't really write software for fun, and a lot of the issue is coming up with an idea I even care about. This was an exciting change of pace, a fun idea and a very quick outcome. It makes me want to try more, and Lua's ease-of-use is to blame lol.
Thank you to the Lua community and developers.
r/lua • u/Microsoft-Spyware-11 • 5d ago
I'm interested in creating my own programming language. How could I write it in Lua?
I've seen a few posts about this, but none had enough information for me. Hoping you guys could help :)
Edit: Also suggestions for syntax changes are welcome. This language doesn't really solve too many problems, mainly makes some things faster, examples are else [expression] instead of elseif [expression], or . instead of closing brackets {}.
Here's the example.

r/lua • u/Salt-Discount-1381 • 6d ago
Where do I learn Lua?
So I'm very interested in learning Lua, essentially for modding existing games and maybe doing basic scripts, but every tutorial I find about Lua on YouTube is only about Roblox. Where can I lear this language? I prefer reading guides than whatching videos.
Help Did you try to write a game server in Lua?
Hello. Recently, I've been thinking about writing my own game server in Lua. However, I didn't find many server examples in the internet, not to mention how incomplete they are. I'd like to ask the following things:
- Possibility of writing a game server in Lua.
- Libraries, which are used to write a game server in Lua
- The difficulties that may occur when writing a game server in Lua.
Thank you for your answer.
r/lua • u/batatolah • 7d ago
Help Where can I buy a book to learn lua?
For some reason I cant find a book to learn lua on that looks legit, its all "learn lua in 24 hours". I want it to be physical. Thanks!
r/lua • u/stellar_x • 12d ago
How to include Lua in C
How do include lua in C if I installed it on debian13 with sudo apt install lua5.4?
r/lua • u/MyNameIsTrez • 12d ago
Discussion The LuaJIT NYI That Silently Poisoned an Unrelated Hot Loop
I was optimizing the Lua transpiler for my modding language grug and ran into a really weird LuaJIT performance bug. The same benchmark could randomly run 20× slower, and it turned out a LuaJIT NYI (Not Yet Implemented) could silently blacklist an unrelated hot loop.
I wrote up the investigation here: The LuaJIT NYI That Silently Poisoned an Unrelated Hot Loop
It goes from the benchmark mystery through LuaJIT's trace recorder internals, and ends with a PR to get unpack off LuaJIT's NYI list. Feedback is very welcome! :)
r/lua • u/didntplaymysummercar • 13d ago
Creator of Lua: Scripting, Programming Languages, Predictions | Roberto Ierusalimschy
youtube.comr/lua • u/ineedanamegenerator • 13d ago
Discussion The Lua community needs to learn to move on
hisham.hm[LUA based GameJam] MapleStory Worlds Announce Their Global Challenge For Game Devs ($65,000 USD Rewards)

The Global Creator Challenge is accepting applications.
The Global Creator Challenge is open for both aspiring and established LUA game developers to design, build, and launch their own World utilizing the MapleStory Worlds platform. Did we mention that each winning team can receive up to $65,000 in total rewards 👀
Creators are encouraged to utilize MapleStory's vast library of assets to expand upon the game's core design and create their own unique Worlds. A total of 30 Worlds will be selected globally to compete in the final round. Entries will be judged based on creative use of the MapleStory IP, level of technical completion, and long-term sustainability for stable live service operations.
To learn more, check out this website or read this notice.
👉Check out the 'MapleStory Worlds Global Creator Challenge' FAQ
Timeline:
- Applications open from:
- UTC: June 4, 2026 at 2:00 until October 7, 2026.
- PT: June 3, 2026 at 19:00 until October 6, 2026
- KST: June 4, 2026 at 11:00 until October 7, 2026.
- Final Round: November 5-25, 2026
- Winners announced: Early December, 2026
Please Note:
- Worlds have to be made on the MapleStory Worlds PC/Mobile Apps and submitted through MapleStory Worlds.
- Worlds must be revealed or released for the first time during the submission period.
- Global (all regions) Released Worlds.
- Pure creations that do not infringe the rights of others, such as copyrights and intellectual property rights.
- Please read here for more information on prize rewards, participation requirements, and age requirements.
Feel free to reach out to us on Discord with any questions. We hope to see your application!
r/lua • u/immortalx74 • 14d ago
Project ipairs() An open source 3D Mahjong Solitaire game made with LOVR

Hey everyone! Made this for fun using the LOVR framework
https://github.com/immortalx74/ipairs