2 min read

Should you learn Lua?

Should you learn Lua?

Lua is simple, powerful, and extensible.  It is vastly popular in game development, but it can also be found as an extension language in programs like Adobe, Cheatengine, and server stacks. Here is what I like about Lua.

Easy and fun

Lua is the very first language I've learned. I've used it for game development with Roblox and Love2D. Learning it at 13 years old, I felt it was very easy to understand. It isn't as much as a load to take in comparing to when I started to learn C++. If you're brand new to coding and want to make games, I recommend learning Lua. As a young person, I picked it up in under a year and didn't have much of a hard time. I actually enjoyed coding with Lua. Years later, developing with Lua is still the most fun I've had.

Limited

Lua is a minimalist's language. This makes it somewhat of a limited language. The standard library is small and you would need to download additional packages for something as common as making network requests. You can't do much with Lua by itself. If you're learning Lua as an extension language for something like Roblox or Cheat Engine, you have much more available to you thanks to additional libraries.

It won't teach you everything about coding. Being a simple language, you won't be learning things like type systems and pointer algorithms. The two of which are necessary with building speed sensitive applications, but this may not be much of a concern if you're in your early days of coding.

Embeddable

You can add Lua to an existing C++ project to give users the ability to write scripts for the project. You would be doing this through the Lua C API. CheatEngine utilizes the Lua C API so users can write scripts to automate searches rather than manually navigating through the interface and sift through data. If I had a project with a database and a search bar, I could offer Lua execution so users can run a script to aggregate data.

Read more about Lua C here.

Summary

Lua isn't the most powerful language, so don't expect to create anything too complex. Albeit, there is still a lot you can do with Lua depending on the platform you're working with. You can script entire games with Love2d/Roblox or embed it into applications to give user's easier control.