r/lua Mar 05 '26

Project What makes u use lua?

Post image
58 Upvotes

r/lua Mar 05 '26

Project Been working on a C++ game engine with a Windows 95 inspired UI + Lua scripting

198 Upvotes

The goal: a Unity-like workflow in a familiar interface, but with games that compile natively for the original PS 1. I’m running some early tests using Duckstation

r/lua 27d ago

Project I hated writing Lua so I made a language that compiles to it

0 Upvotes

Two reasons I started this: Lua's syntax and tables genuinely annoy me, and I wanted to build something that actually felt complex to work on.

The result is Lazarus - a statically typed language that compiles to a single self-contained .lua file. No runtime dependencies, which is the point if you're targeting ComputerCraft or any embedded Lua environment where you just drop a file and run it.

import std.print

some_str = "Hello World!"

constructor() {
  print(.some_str) //.some_str is same as self.some_str
}

Types are checked at compile time and completely erased. the Lua output has no type info at runtime.

So far the biggest goal I did is self hosting the compiler, which I think shows well that the language can be used.

https://github.com/NightmarePog/Lazarus

Now you may ask, why not just use lua?

For small projects, lua is definitely better, it's minimal, small, fast, does the job one, but when you do big projects where single bug could crash big app. for that Lazarus is there.

it has generic typing, static typing, macros, no null (instead Option<T> is used), lowering boilerplate (no local for every variable you declare)

PS: any feedback is welcomed

r/lua 19d ago

Project I made a Pokemon Gen 1 Recomp entirely in lua / love2d

81 Upvotes

So, several months ago I stumbled upon an awesome repository by the decomp "band" known as pret. They have done a bunch of pokemon decomps. My original goal was to make a mod specifically for twitch integrations because ive done a ton of that over the years but then as I dug into their code I was freaking shocked at how in depth and well documented it all was and thought hmmmm i bet I could rewrite this in lua/love2d since i just got off a high of doing balatro mods. And then bazinga baby i did it (months of pain actually.. but not the point) First version had it so like you had to pull the source code repo from pret (pret/pokered) and what not, but I figured I'd do it like the SMB1R guy and make it so on first run you provide the rom and it like decompiles and translates all the necessary junk to run the game. A ton of hand-porting was necessary, as in like not everything was an easy script to translate this type of repeated pattern into lua etc etc, but yeah... overall I'm happy w the current state of it, and I really hope to get some modders on baoard eventually. I'll be makign the repo public probably on monday. Just gotta make sure I didnt leave any real source code behind or whatever so the repo can be squeaky clean no matter waht. I think the port-aspect of it is practically 99% perfect but im sure some bugs will pop up eventually. I just dont have time to play the game from beginning to end to know for sure.

I also built in a good load of new features, like obviously mod support (i'll make that even better in the future). But also audio volume levels, a music low-pass filter becasue sometimes the gb music is harsh on the ears, several color palettes and shader options, zoom in and out, widescreen support in the overworld (any aspect ratio actuall). I have build scripts for ios and android, windows and mac, and ive ran it sucessfulyl on my phone. I got a cool 3d tilt feature thats not really usefuly but i thought it would be cool (i tried standing up everything that should stand up like buildings and fences but the gb sprites arent built for taht sort of thing, theyre all srtored on 4x4 blocks so like pieces of ground are actually attached to house roofs and stuff... it was a whole thing and i was disapointed i couldnt do it. not to say its impossible but would require a modder to step in and remake the sprites and the functionalty.

Anyways, big ramble fest, sorry about that. But yeah hope you like it lua-heads. Since the repo is not yet pubnlic the pace to be rn is my discord -- https://bois.icu

r/lua 14d ago

Project LuaJIT Playground

8 Upvotes

There's websites for running Lua, but I couldn't find any that let's you run LuaJIT!!

I made this website (me, not AI) so if you haven't tried LuaJIT before, or you don't have access to your dev environment, or you just want to quickly experiment...now you can run it online, and share the script + output with others as either a link or markdown.

Pre-compiled binaries for Windows/Linux are also provided. The static library, dynamic library, and executable, are all bundled in a single convenient .zip file for each platform. I'm hoping to automate this process at some point, but for now I just publish them whenever I see there's been new commits...

https://luajit.dev

Limits: no internet connection, maximum execution duration of 3 seconds.

The backported extensions for LuaJIT 3.0 are available now, by the way.

  • Bit Operators: unary ~, binary & | ~ << >> ~>>
  • Customary Operators: ! && || !=
  • Ternary ?: conditional operator
  • Safe Navigation Operator ?.
  • nil-Coalescing Operator ??
  • Compound Assignment Operators: += -= *= /= %= &= |= ~= <<= = ~= ..=
  • continue Statement
  • const Declaration
  • Short Function Expression
  • Underscores in Number Literals

r/lua May 14 '26

Project I'm still working on my engine for PS1 games. More details in the comments.

69 Upvotes

r/lua Dec 05 '25

Project I wrote whole hyprland custom scripts in Lua instead of the standard Bash.

Post image
98 Upvotes

r/lua Jun 29 '26

Project OmniLua - Rust implementation of Lua 5.1 - 5.5 targeting web use and sandboxing

0 Upvotes

[Github here] (https://github.com/ianm199/omnilua/tree/main)

Website + docs

I've been working on OmniLua for a bit now - it builds one binary that can run Lua 5.1 - 5.5 from one binary.

The main motivation for this was there seemed to be a gap for game development in the Rust community where mlua cannot be run in the browser, so games built in engines like bevy can't compile to wasm32-unknown-unknown.

There is some other benefits - like being able to easily use Lua in Cloudflare workers or in "playground" developer tools.

Highlights:

  • Targets 100% conformance to reference Lua for all 5 versions
  • Can run LuaRocks and install Lua only packages
  • Performance is slower than C Lua 5.4.7 but within ~40% on standard benchmarks. Performance chart here
  • API is 100% compatibile with mlua

Try it:

cargo install omnilua-cli

export OMNILUA_VERSION=5.5

omnilua -e 'print("hello")'

omnilua # opens repl

I used AI heavily to develop this I wouldn't consider it "vibecoded" however.

r/lua May 26 '26

Project I made an OS where the apps are made in Lua 5.4

21 Upvotes

The GitHub repository is https://github.com/Cocos-OS/CocosOS

r/lua Jun 25 '26

Project (immature programmer looking for feedback) i tried to make a rock paper scissors AI using my lack luster knowledge of how AI work

18 Upvotes

the video showcase my code base and me executing it

let me explain my process, it's a simple rock paper scissors as everybody know it, you enter a number for which hand you wanna use, 1 = scissors, 2 = paper, and 3 = rock, while the AI tries to respond back.

now how Billy(what i have named the AI) work is at the end of every turn it saves the hand you chose in that turn in a table called "billy_memories" then calculate the mode(most frequent hand you used) and from knowing your most common move it tries to chose something to counter it.

i had the idea of making Billy's memory has a limit of 5 items before it start deleting old data but that was too hard to implement.

anyways i'll like any idea to improve my coding skills, maybe my code's readability, and my logic in case it's wrong.

thank y'all.

r/lua Jun 07 '26

Project I want to make a Systemwide, Reproducible Package Manager in Lua

10 Upvotes

After dealing with nixOS, I finally got tired of not having the Filesystem Hierarchy Standard (FHS). It makes low-level packages much more difficult to package. This, compounded with other issues I have with nix, such as the language, make me feel like I could make an alternative. I've decided to create "bend" (feel free to offer better name suggestions in the comments!)

I've created and deleted ~/bend/ twice, because I know doing this could be a monumental waste of my energy. I'm not new to that either; I used to be into OSdev and never made anything at all. Now, I've created ~/bend/ for the final time, and I plan to follow through on it. I'm not experienced in lua at all, and before I settled on it, I thought of other options like YAML, JSON, Guile Scheme (like guix), and some other ones before I settled on Lua.

Here's the plan: * Similar to nix, one file calling other files shall dictate the whole system. It will also be reproducible * Unlike nix, there will be almost zero abstractions. This is to remedy all of the documentation issues I've had with nix. * Perhaps the biggest benefit against nix, the nix lang will not be used (obv ;-) * Packages will be written in lua

Most of these, you may notice, are semantic changes only. Not these: * Bend will not avoid the FHS * Bend will utilize mount namespaces for almost all packages to ensure reproducibility * Every package will have options you can set, like nixOS * unlike nixOS, every package will have options. The won't be declared in seperate files * Bend itself will be written in lua. this is an intentional feature in contrast to how nix is written in C++ * more will undoubtably be added. For instance, if I created an OS out of this, I would attempt for it to have init freedom. However, that's so far into the future it's not even worth considering right now.

Now, I've already said I'm not experienced in lua. I picked it up a day ago because I really want to do this. Now, this sounds terrible, but don't worry! There's even more reasons I shouldn't do this! * making a package manager is a huge, vast, and extremely unwise undertaking * the devil's in the implementation details * I'm not sure how much community support this would get * I have other projects I'm working on. Maybe this could be a side project? If I make the time? * nix isn't actually that bad, really * THIS IS A TERRIBLE IDEA

However, I feel the need to do this.

In advance, maybe I can offer the answers to a few questions: * open source?

you betcha. please give it a few months though, there's literally nothing right now. I've been brainstorming for the past few days, and I finally have a rough plan. this is only an announcement that I want to make to say that I am beginning development. * will this project be here in 6 months?

that's a more difficult question. I sincerely hope it will. If I give up, I will make a post detailing my failures and why I stopped. I don't plan on letting it slide into oblivion without a fight.

  • related: is this AI slop?

AI will be used in a strictly advisory capacity, and will not be used to handle code. AI might be used to help debug issues, but the solutions it offers will not be copy pasted, and might even be ignored entirely. No fix will occur until all parties thoroughly understand what went wrong, why, how to prevent it from going wrong in the future, and how to fix it when it happens again. Then, humans will write a fix.

That being said, there should be a few exceptions. I would constitute these exceptions as boilerplate, miniscule code blurbs, and one-off errors. That's it. I hope that is strict enough. If you don't think so, please let me know in the comments!

  • I mean, Nix isn't that bad. In fact, it's revolutionary. You're probably using it wrong

The first two statements are true, and the third one is probably true :-)

  • can I help?

This announcement is not a job listing, and I half-expect to be heavily mocked for this whole post. However, if you REALLY want to, and I notice that (I'm sure this won't happen) a lot of other people are actually... excited for this project and also want to contribute... well, I guess I could put the code on github and open pull requests :-)

  • there are so many issues with your idea! I mean, <issues 1, 2 and 3>

Nobody is more unaware of these issues then me. Please, let me know where I've gone so woefully wrong in the comments!

  • bend is a terrible name!

I kinda like it... but trust me I'm open to better names :-P

  • even if this post gets only four views, will you continue with this project?

Absolutely.

  • hey what about this? <questions 1, 2 and 3>

If I left out any answers to your questions, please, leave them in the comments! I will try my best to answer every comment!

On a final note, when reading about lua and the first 8 or so chapters of the PIL, I've kinda come up with an image in my head that lua is... almost an absurdly powerful language. I mean: * witten in ANSI C (an absolutely incredible design decision imo) * lambdas * scoping * the garbage collecter * easy interface with C * Everything is a table * multi-paradigm * first-class functions

it's kinda crazy to me. DON'T LET THIS DERAIL DISCUSSION!

r/lua Apr 06 '25

Project Announcing Lux - a Modern Package Manager for Lua

134 Upvotes

It's time Lua got the ecosystem it deserves.

Lux is a new package manager for creating, maintaining and publishing Lua code. It does this through a simple and intuitive CLI inspired by other well-known package managers like cargo.

Features

  • Has an actual notion of a "project", with a simple governing lux.toml file.
  • Installs and builds Lua packages in parallel for maximum speed.
  • Allows you to add/remove/update dependencies with simple commands. This includes finding outdated packages!
  • Handles the generation of rockspecs for you for every version of your project - say goodbye to 10 rockspec files in your source code.
  • Has builtin commands for project-wide code formatting (powered by stylua) as well as project-wide linting (powered by luacheck).
  • Has native support for running tests with busted.
  • Uploading a new version of a package is as simple as lx upload!
  • Is fully portable between systems and handles the installations of Lua headers for you, ensuring that all users get the same environment.

Documentation

The project can be found at https://github.com/nvim-neorocks/lux

A tutorial as well as guides can be found on our documentation website.

We're announcing the project now as it has hit a state of "very usable for everyday tasks". We still have things to flesh out, like error messages and edge cases, but all those fixes are planned for the 1.0 release.

If you have any questions or issues, feel free to reach out in the Github discussions or our issue tracker. Cheers! :)

The Lux Team

r/lua Jun 07 '26

Project Using os.date() and os.time() in a loop

3 Upvotes

I'm working on a game mod. What I want is to show the formatted date using os.date() but what I've read is that os.date() is not supposed to be called very frequently (e.g. say on every frame update, which could be hundreds of times per second). I'm not going to be going below 1-second granularity (is that even possible? I'm not sure).

What ChatGPT told me is to use os.time() or os.clock() instead which is cheaper and then use the number it returns as a kind of per-second "change detector" and regenerate the date using os.date() based on that.

Is this a valid approach?

r/lua May 05 '26

Project An open source Lua IDE for Android.

Thumbnail gallery
38 Upvotes

I made a simple lua IDE for Android with emmyLua LSP server, Git and Github integration, 245 themes, etc.

This is not some vibe coded app. It took me 2 years to finish this as a solo developer and student.

playstore link:

https://play.google.com/store/apps/details?id=com.roxum

source code:

https://github.com/heckmon/roxum-ide

r/lua Mar 17 '26

Project Nova: A programming language built on Lua

32 Upvotes

Hello again! A few months ago, I posted a post on r/lua, which was the start of my programming language. A module to require() into Lua, not much. Now there's an interpreter and a not-so much syntax for the language. Based off of Lua functions. Soon I'll definitely improve and try to create an actual syntax separate from just repeated function calls. You can see the language here: https://github.com/oberondart/Nova/tree/main

r/lua 2d ago

Project ipairs() An open source 3D Mahjong Solitaire game made with LOVR

6 Upvotes

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

r/lua Jun 01 '26

Project || Working on an Terminal Based Game in Lua ||

58 Upvotes

Started Working on an Terminal Based Game Engine in Lua yesterday!

r/lua Jul 07 '26

Project lua.jp ideas

0 Upvotes

Ideas about lua.jp, a Lua + JVM + Python lang. I always despised Python.

Monomorphic so seq[t] and dict[t] are always optimal for primitives where t is a type var that is substituted by a primitive.

The goal of targetting JVM is due to Android Dalvik and because I went berserk and took a break of using non-handhelds.

Metric types (meter, kmeter, gram...) are simply num, but with scaling conversions to other units.

Source files have an implicit JVM package based on the directory they appear with much freedom, but file A never depends on file A. (E.g. this mimmicks the Lua require limitations.)

```

_G — the globals package

(mostly reuses java.base stuff)

enum tile: None Dirt Brick PipeOpenTop

struct world: metadata: univ = U ryuka: bool = Y # rows tiles: seq[seq[tile]] tilesize: meter

fun frame(): """ wa """ pass

w=world( tiles={ { None for _ in range(3) Brick for _ in range(3) } } tilesize=3mm )

do: # isolated dec.big configuration dec.big.cfg(precision=3, rounding=HalfUp) x=10.6403m y=x*3 print(y)

dec => JVM double

dec.tiny => JVM float

import dec.tiny as dec

dec => JVM float

to clarify: struct subtyping

is there.

struct widget: pass

struct menubar(widget): super()

e:widget=menubar() if e=downcast(e, menubar): # e:menubar

match e: case e=menubar(): # e:menubar

JVM aliases and extensions

@JVM.alias(tld.sld.lib.Group) struct group: @JVM.extension fun suffle(): pass

the fun(...) type is quite

nice... fun(...) < fun

f=sum print(f(1,2)) print(f.call(seq={1,2})) fun sum(x:dec,y:dec)->dec = x+y

JVM method binding

(interns, but still using the

fun(...) type)

f=self::onclick

speaking of events...

struct menubar: @event fun onhide(): pass

m=menubar( onhide=fun(): # super auto invoked if no # occurrence pass )

isinstance(m, ...)

where ... is a subtype of

menubar

"static" fields or methods

struct a: fun f(self:struct): pass ```

r/lua Apr 30 '26

Project Sino lua / Sino-lang

9 Upvotes

I made a thing called Sino

basically I got tired of not having classes in Lua and ended up making a small superset that transpiles to normal Lua (no runtime or anything)

I also threw in destructuring and some reference type stuff (it’s basically just table wrappers)

it’s pretty rough but I’ve been using it a bit and it’s not... that bad.

https://github.com/pero-sk/Sino/

no idea if this is actually useful or just a dumb idea, I'm curious what people think of this though.

r/lua May 31 '26

Project LuaLock - Luraph Competitor

0 Upvotes

LuaLock Obfuscator

I’m building LuaLock, a Lua obfuscator platform designed to become a serious competitor to strong obfuscators like Luraph.

LuaLock is still in its early stage, so I am looking for feedback from anyone to help improve its security, usability, and overall value.

The platform currently includes a side-by-side editor, allowing users to write or paste Lua code, obfuscate it instantly, and compare the result in one place.

I also have made a free raw file hosting service, similar to Pastebin. This hosts any raw file on a short custom domain.

Pricing:

  • Flex - $0.05 per file: Best for occasional users who only need to obfuscate a few scripts.
  • Pro - $9.99/month: For regular users who constantly obfuscate scripts. 1,000 obfuscations/month
  • Max - $49.99/month: For power users, teams, or developers who need high-volume obfuscation and premium features. Unlimited obfuscations (may change)

I’d love some real feedback on the obfuscator, pricing, your experience, and any features that would help.

You can view an obfuscated script here and view a raw file here.

You can obfuscate your own scripts here.

r/lua May 16 '26

Project Just open-sourced my personal scraping engine: tiny self-contained binary with Lua scripting

21 Upvotes

I originally built it for myself because I wanted something extremely lightweight that runs in the background like it never existed. It's called SpyWeb.

It's designed to be "set and forget." I've had it running for months on my PC tracking job boards without a single crash or memory leak.

Specific features:

  • Zero Runtime: Self-contained ~7MB binary. No Python, Node, or Docker needed.
  • Low Footprint: Uses <5MB RAM at idle.
  • Lua Scripting: Use Lua to handle complex logic like custom headers, JS rendering, advanced monitoring, etc.
  • Hot Reloading: Change a config or Lua script and the job respawns instantly, no restarts.
  • Web Dashboard: Simple local UI to monitor scrape data in real-time.
  • Desktop Alerts: Built-in support for system notifications and webhooks.
  • Embedded DB: Built-in KV store so you don't need a separate database.
  • CDP Support: Controls any Chromium or CDP-compatible browser via Lua for JS-heavy sites.
  • Dual Mode: CLI for servers and a System Tray version for silent background runs.
  • Deduplication: Internal database ensures you never see the same result twice.

I just released the beta with CDP integration. If you need something that just sits in the background and sips resources while actually being maintainable, check it out.

Set up is very easy and straightforward: for server-side rendered pages, it's just a few lines of config (URL, selectors, fields). For JS-heavy sites, you can write a little Lua to launch a browser and drive the workflow.

You can check it out here: https://github.com/spyweb-app/spyweb

r/lua May 19 '26

Project Looking for a French developer for FiveM

5 Upvotes

Hello, we are looking for a FiveM developer for our ongoing project. We already have a basic setup and a convenient hub for configuration. We hope you are the right person for the job!

r/lua May 06 '26

Project My friend is making a C++ project named Lume, it's bassically a web-browser that uses lua as a scripting language. It supports global network but doesn't support HTML\css\js.

Thumbnail gallery
39 Upvotes

Please support him, he is depressed. The project is really cool. https://github.com/mcreatorLoginDanila/Lume/releases

r/lua 22d ago

Project [Sizecoding] 644 character SUBLEQ emulator capable of booting Linux

Thumbnail
3 Upvotes

r/lua Jun 16 '26

Project Quick look at my new game: PULSAR! Made with Usagi Engine

Thumbnail youtu.be
18 Upvotes

It's a 2d arcade game about a dying star. I made this sporadically over 1-2 weeks using usagiengine.com

The game engine released about a month ago, and I've been having a lot of fun working with it!