DEV Community

Valentin Briukhanov
Valentin Briukhanov

Posted on

2

Lua needs more love

Three years ago, I became familiar with Lua for an interview test task. Before that, I had no experience with it.
So, my first surprise was how easy it was to learn and start using it. Yes, complained a little about the "continue" statement, but it was easy to get used to.

The next time I got to Lua it was when we started to work on CodeCombat Worlds -- Educational Game on the Roblox platform to teach kids programming. So yes, we used Luau. Luau is an extension of Lua with some improvements, such as type-checking and other features. I already have experience with interpreting languages, so getting used to Luau for game development was easy. When I started to use it, I was a little skeptical that we could use it for our ambitious project. I was wrong, and I was happy to be wrong. Lua is an excellent language for game development and scripting. I like its simplicity and straightforwardness.

When I recently decided what game engine to play with, I found that Defold is using Lua. It's an excellent choice for this game engine as it highlights its simplicity. I'm not sure I would use Defold for big projects; however, it's an excellent choice for small projects, especially educational games, because it is easy to make HTML5 games with it (Hello Chromebooks in schools!).

If you are interested in more technical details, I would recommend the article "Lua is so underrated" by Noë Flatreaud, which inspires me to write this post.

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (3)

Collapse
 
iampraveen profile image
Praveen Rajamani

I can totally relate to this post! When I was a fresher, I joined a CAD-based software company where Lua was their primary language. Like you, that was my first encounter with Lua. I agree that it is easy to understand just by reading the code, and the documentation is indeed well-structured. While it has fewer libraries compared to Python, you are right that it makes up for it by being lightweight and efficient. It is great to see others appreciating Lua's simplicity and effectiveness in game development and scripting.

Collapse
 
valentin_briukhanov profile image
Valentin Briukhanov

I think also Luau (roblox lua upgrade) should become Lua 6 as they introduce cool features such as type checking and others without losing performance and simplicity. Type checking is a huge deal when your code base grows more and more.

Collapse
 
iampraveen profile image
Praveen Rajamani

That’s good to know but we were using Lua 5.2 in my previous experience.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay