r/lua • u/Empty_Salamander_183 • 40m ago
r/lua • u/wak6817-2 • 49m ago
Project i made a backup utility in lua
github.comleave some feature requests if ya want
okthxbye
Project I created a UI builder tool for LOVE2d devs that speeds up the entirety of UI/MENU/HUD workflow.
github.comThis is a starter template/boilerplate that I made for all of your LOVE2d UI and HUD needs (screenshots in the repo). This repo solves the biggest time-wasters developers hit at the start of every new LOVE2d project:
- creating the UI, HUD, Main Menu, and Loading Screens from a fresh, easy to edit template, in-engine (runtime)
- Saves you from having to code input remapping, speeds up prototyping, gives you a pre-built structure for layering on-screen HUD elements over gameplay without cluttering main.lua
- Handles game-state wiring out of the box, and fully eliminates many repetitive actions that devs waste hours working by giving you all the tools and widgets you need to create, export, and integrate UI/HUD/etc. elements into your LOVE2d project
- Works with any LOVE2d project and does not require any external libraries
Know that it is a work in progress and will continue to receive updates for the foreseeable future. I also have other LOVE2d helper repos on my github, and more tools I have made to be polished up and posted soon for the community to use in their own LOVE2d projects. Thanks for checking it out!
Shout out to u/serasoft_alex for inspiration in polishing and posting the tool. I took a lot of inspiration from his recent game demo, Vaporwave EX Demo. Very inspiring work from him, thanks, Alex.
Project Title: JITLua 1.0.0: a LuaJIT 2.1 fork with Lua 5.4.9 semantics (Linux arm64/x86_64 only)
Built by LLM coding agents under human direction; details below.
JITLua-5.4 1.0.0 is a fork of LuaJIT 2.1 that runs the Lua 5.4.9 language and C API on LuaJIT's JIT compiler. It is not an official LuaJIT release and Mike Pall does not support it. It is not a drop-in replacement for stock LuaJIT, and it is not binary-compatible with PUC Lua.
What works: 64-bit integers next to floats, // and the bitwise operators, 5.4 for loop rules, goto, <const>/<close>, coroutine.close, __gc on tables, and the 5.4 standard library. LuaJIT's FFI, jit.* and bit.* are kept. The C API is source-compatible with PUC 5.4, so C modules must be rebuilt against JITLua's headers. A module built against PUC's headers that calls luaL_checkversion is refused at load.
Platforms: Linux arm64 and Linux x86_64 (GC64) only. The other LuaJIT backends do not build with the 5.4 changes. Windows and macOS are untested.
Verification: It is compared against PUC Lua 5.4.9 with a differential harness, with identical results on both architectures. The PUC test suite plus an edge-case corpus gives 696 PASS / 0 FAIL / 14 XFAIL / 3 SKIP. Three suite files that need PUC's internal test library T do not run. The ASan/UBSan run is 619 PASS / 0 FAIL / 4 XFAIL. Fuzzing is not a 1.0.0 gate and continues afterwards.
Differences: docs/DIFFERENCES.md lists them, each with its reason. They include a private bytecode dump format, one incremental collector ("generational" is accepted, but there is no separate generational collector), different stack and table size limits, and the LuaJIT 3.0 -> and continue syntax. The Lua 5.1 leftovers (unpack, module and so on) are off by default and can be enabled with a compile flag. A program written for LuaJIT 2.1 gets Lua 5.4 rules for numbers and for loops.
Performance: On the classic benchmarks it is within 10% of stock LuaJIT on both architectures. The exceptions are two workloads of about 10 ms or less, where a repeat measurement did not confirm the gap. It is faster than PUC 5.4.9 on every classic workload except scimark on x86_64, where PUC is 2.6% faster. These are medians of 3 on one host per architecture, so treat small differences as noise.
How it was built: LLM coding agents (Claude, DeepSeek and Qwen models) did the implementation under human direction. A second model reviewed each batch of changes before it was pushed. The differential tests are the evidence, not the process.
If you find a program that behaves differently from PUC 5.4.9 and the difference is not in DIFFERENCES.md, please open an issue. Repo and release notes: https://github.com/marfrit/JITLua-5.4 (tag v1.0.0)
Project I made an open source map editing tool for LOVE2d+g3d games
https://github.com/666mayn/LOVE2d-g3d-map-editor
You can easily integrate this simple g3d map editor into your game project to make creating maps a breeze, as long as it has g3d repo library. The editor doesn't interfere with or require other libraries. I just thought I'd share for any solo devs making a g3d love2d game. It essentially expects you to have 'map_editor/' in your root folder with all of the files in the LOVE2d-g3d-native-map-editor repo inside, and then you just write in your calls to open it in your game + save your texture types to the appropriate files. I'm really trying to get this out for the very few projects there seem to be for LOVE2d+g3d, I know it can be of great use to these specific developers, and developers looking for swift options in solo game development, as LOVE2d has been such a cherished engine for such development. That said, after about a year of playing around with LOVE2d and g3d, I decided this is just about the best tool I've made for my own solo development, and that I'd share. So here it is. Updated, polished, and packaged for integration.
r/lua • u/MundaneFoundation864 • 3d ago
Project Made a calculator in lua (first serious project) what do you guys think?
print('What is your first number?')
io.flush()
nr1 = io.read()
print('Operator? (+,-,/,*)')
io.flush()
op = io.read()
print('What is your second number?')
io.flush()
nr2 = io.read()
print('calculating...')
require("socket").sleep(0.2)
if op == '+' then
print(nr1 + nr2)
elseif op == '-' then
print(nr1 - nr2)
elseif op == '*' then
print(nr1 * nr2)
elseif op == '/' then
print(nr1 / nr2)
else print('invalid operator')
endr/lua • u/thecratedigger_25 • 3d ago
Discussion Has anyone ever used luajit before?
I'm a C++ dev interested in lua and found out about lua jit as I was researching a way to substitute for python and bash scripting while also being easily embeddable.
Mainly looking at ffi.cdef for interoperability with C code for low level stuff. Has anyone tried it out?
r/lua • u/Gold-House-7482 • 5d ago
Help Is Defold or LOVR better for 3D lua development?
Would like to know the advantages and disadvantages of either engine. Would also like to know if there are good tutorials or learning resources available, other than documentation and AI. I noticed LOVR has pretty good documentation but if there are other good learning resources I'd love to know.
Help is there a better, more condensed way than doing this?
i've always just been made to view elseif chains as a mortal enemy so i'm wondering if there's a cleaner way than this
this is for a black clover-themed discord bot that more-or-less makes you a random character, i intend to make it a full-fledged text-based rpg but my focus before i get into that has been optimization, condensation, and just making it more readable overall
not looking for someone to "make me the better way", just point me in the right direction so i can learn rather than have my hand held, if it's even possible at all anyways
also,
the function of this scope is it checks a rolled number from a math.random(1,101) remote, after some testing i learned that it does essentially make this 6 times more likely to roll a common as it is a lower number, so i'm going to tweak around and fix that, so don't focus on that part if you also noticed it since, you know, i'm working on it
r/lua • u/Personal-Sandwich157 • 7d ago
Project I created a project in Lua
Good evening, everyone. I’ve started building projection software for churches using Lua, with wxLua for the interface. Is Lua a good choice for this? Do you have any tips for me?
r/lua • u/Avya_patel_2011 • 6d ago
Lua tools
Does .lua file differs from steam acc. to steam acc or we can use the same .lua file in other steam acc.
Lua Pro adds busted tests, LuaCov coverage and stronger native Lua support
Hi all, I've been working on providing better Lua support in JetBrains products for a while now, and I've just published another big update. Lua Pro, 2026.1.6, adds busted gutter actions, test results, rerun-failed and failure navigation, plus LuaCov coverage in the standard JetBrains coverage view, so that it integrates with the native JetBrains toolings.
Other additions include native LuaCATS documentation/completion/hints, function usage counts, more quick-fixes and statement suppression, mixed-runtime directories, five framework presets, and remote/embedded attach with source mappings. Inline Function now supports statement bodies, multiple returns and varargs.
you can find the plugin here https://plugins.jetbrains.com/plugin/35721-lua-pro , feedback always welcome. Cheers.
r/lua • u/McGalakar • 8d ago
Accessing the additional table information in the for loop
Hello Everyone,
I have crated a table that compares the values and print the highest one. But when I print a value only the information of the highest value is printed (for example: 61). I understand that in the for function, in the code below, key stands for 1, 2 or 3, while value is 61, 42 or 55. However, the keys are associated with names, and I would like for the code to print not the value nor key. So far no matter what I tried it did either give a different result or I got an error.
Gear_Head = {"Bhikku Crown +3", "Hes. Crown +4", "Mpaca's cap"}
Gear_Head["Accuracy"] = {}
Gear_Head["Accuracy"][1] = 61
Gear_Head["Accuracy"][2] = 42
Gear_Head["Accuracy"][3] = 55
--print(Gear_Head[1])
--print(Gear_Head["Accuracy"])
--print(Gear_Head["Accuracy"][1])
--print(Gear_Head["Accuracy"][2])
local accuracy = -math.huge
for key, value in ipairs(Gear_Head["Accuracy"]) do
--print(key, value)
if value > accuracy then
accuracy = value
end
best_gear = key
print(beast_gear)
end
--
print(accuracy)(This is a learning code to test tables and for loops)
r/lua • u/Adventurous-Bee-3762 • 8d ago
I built LuaC — a standalone Lua-to-machine-code compiler (JIT & AOT) in C99 with a custom Vulkan Studio & Android port
Hey everyone! I've been working on LuaC, a standalone compiler that translates Lua-like `.lua` files into machine code via generated C — without using the original Lua VM or LuaJIT.
Highlights:
- JIT & AOT: Compiles to native shared libraries (`dlopen`) at runtime or standalone executables.
- Ownership + Cycle Collector: Deterministic cleanup via reference ownership cells + lightweight cycle collection for cyclic tables/upvalues (no stop-the-world GC threads).
- LuaC Studio (Vulkan GUI): Built with Nuklear + a custom Vulkan renderer, featuring a code editor and a 2D Engine mode (60 Hz fixed-step physics).
- Android Port: Includes an APK build with multi-file project support and Vulkan viewport.
- Batteries included: 197 native APIs (JSON, TCP/UDP, mbedTLS HTTPS/WSS, miniaudio DSP, stackful coroutines).
Currently in Alpha 0.5.0 with prebuilt binaries via GitHub Actions. Would love any code review, C99/Vulkan feedback, or suggestions!
GitHub: https://github.com/ehekufa/LuaC/releases/tag/Alpha-0-5-0
r/lua • u/API_Exploiter • 10d ago
Project Python LuaJIT bytecode decompiler with multiprocessing
github.comr/lua • u/Deitiessoul • 11d ago
Help Is it possible for a Lua script to read another .lua file as if it were just text?
r/lua • u/SmileAffectionate572 • 11d ago
News I built a Lua-powered IDE for developing native Android apps directly on your phone
REPOSTING (AFTER POST REMOVED)
I've been working on a project that I'd like to share.
After years of research and development, including building cross-platform software with Python, I decided to apply that experience to something new: a mobile IDE for building native Android applications using Lua.
It supports Lua 5.4 and 5.5 and includes:
A comprehensive API with approximately 100 APIs.
A custom-built game engine with physics, tweening, and ray tracing.
Material Design UI components and customizable themes.
The ability to build and export APKs directly from your phone.
The goal is to provide a complete mobile development environment, not just another code editor.
It's been quite a journey building the IDE and its underlying components, and I'm interested in hearing what other developers think.
Would you use something like this? What features would you like to see?
r/lua • u/slhamlet • 12d ago
Discussion We lead Lua scripting implementation for Second Life -- Ask Us Anything!
EDIT, Nov 12: Thanks everyone for the great questions! Will do another AMA soon-ish as Lua gets closer to official launch in SL!
Hi /lua! We’re Kyle (u/KyleLindenSL), Harold (u/HaroldCindy/) and Hamlet (u/SLHamlet) of Linden Lab, the company which publishes the long-running user-created virtual world Second Life.
We’re currently updating the platform to run Lua scripts and are excited to see what Lua developers (and Luau creators from Roblox) build with it in SL.
For background, Second Life has been online a bit longer than Roblox and while we have a smaller user base, SL is still a very active virtual world, and has a large ecosystem of community creators who sell their virtual content (fashion, animations, vehicles, games, etc.) as a side hustle or a full-time income.
Here’s more info about what we’re doing with Lua on 80 Level: https://80.lv/articles/second-life-wants-its-23-year-old-world-to-be-a-modern-game-platform
And a feature breakdown on our site: https://secondlife.com/create#scripting
Lua is now in live beta in SL if you want to check it out. Just need to install SL and teleport here: https://maps.secondlife.com/secondlife/Lua%20Beta%20Landing/121/141/23
We’re hoping Lua will help modernize SL as a UGC platform and grow the economy.
So if you’re curious… ask us anything! (We’ll be checking this thread over the next few days.)
Project I made Lua Pro - Lua and Luau support for JetBrains IDEs
Hey all. I’ve been working on Lua Pro, a (paid) plugin for writing Lua and Luau in IntelliJ IDEA, PyCharm, CLion, GoLand, and RubyMine.
It supports Lua 5.1 through 5.5, plus Luau. Some of the things packed into it:
- Code completion, documentation, navigation, and refactoring
- Syntax and semantic highlighting, inspections, and quick fixes
- Run/debug configurations and a REPL
- Built-in formatting and StyLua integration (we're working on supporting StyLua for Lua 5.5 as well, but we first need to get a PR approved in full-moon, and then we'll do a PR to StyLua to have this addressed. While this plugin isn't OS yet, we spend time contributing to Open Source!)
- Lua toolchain management, LuaRocks support, and Luacheck integration
- A choice of language servers, including LuaLS and EmmyLuaLS
There’s quite a bit in there, but the goal is pretty straightforward: make working with Lua even better in a JetBrains IDE.
You can check it out here: Lua Pro on JetBrains Marketplace
Would love to hear what you think, thoughts, experiences, bugs, etc, and happy to give away some licenses to people who have some constructive feedback. thanks!
r/lua • u/Levno_710 • 12d ago
Prometheus, an open-source Lua obfuscator and AST transformation framework
Hey everyone,
I've been working on Prometheus, an open-source Lua obfuscator written entirely in Lua, for over 4 years now.
It supports various obfuscation techniques, including VM-based obfuscation, which I added in a recent update.
While obfuscation is its main purpose, Prometheus is built around a modular AST transformation pipeline. This also makes it useful for things like minification or building your own custom Lua transformations.
It currently supports Lua 5.1 and has partial Luau support. There's also a web playground if you want to try it without installing anything.
GitHub: https://github.com/prometheus-lua/Prometheus
I'd be interested to hear your thoughts or suggestions!
r/lua • u/Nervous_Flan_4685 • 12d ago
LuaPwnTools — a vibe-coded attempt to bring pwntools to LuaJIT
Hey everyone!
I decided to try porting the Python pwntools library to LuaJIT because I think LuaJIT is a really cool and underrated tool, and having something like pwntools available for it would be pretty awesome.
To be completely honest, this project is 100% vibe-coded. I'm not going to pretend otherwise :)
I'm sure there are plenty of bugs, rough edges, and things that could be implemented much better. But I figured it would be worth sharing anyway.
Think of it more as a starting point or a foundation rather than a finished library.
I'd be really happy if anyone finds it interesting enough to contribute, improve the code, fix bugs, or add missing features. PRs, issues, suggestions, and criticism are all welcome!
GitHub: https://github.com/Kiwichek/luapwntools
Hopefully someone finds this useful, or at least interesting :)
r/lua • u/ImSoYellow • 13d ago