I typically spend most of my programming time in C++ and Python. From college courses to personal projects. In those languages I find it very easy to find a good structure to follow to learn. I’m also very confident in my abilities with those languages.
My second question is how do you know how good you are with Lua? For example, once you understand OOP, are you still in the beginner stages? Where does the beginner concepts begin and end?
I’m only curious about these kinds of things because I’ve spent the last 2-3 years 3D modeling and building on Roblox. I’m kind of tired of being dependent on commissioning people to script and want to learn it myself. I was wondering how quickly I’d be able to translate my skills from other languages.
Lua is not a very difficult language to begin working with. Since you come from python as I have, the learning curve will be much less than for some other people. Python and Lua have relatively Similar syntax with mainly different functions. You should be able to pick up beginner concepts very quickly coming from those languages.
If you’re proficient in C++ and Python then you should find Lua a breeze. Apart from minor syntactic differences, the biggest changes are in the fact that the OOP systems are marginally different - including slightly different methods. The different types of storage available in C++ and Python also don’t exist in Lua, which only has tables - a weird array/dictionary hybrid.
There isn’t anything conceptually harder than Python or any other OOP language. The most challenging parts would probably be OOP and weak tables, but realistically depends on your programming ability.
I wouldn’t consider Lua an OOP language since a lot of it’s fundamentals around objects are more similar to that of structs.
There’s no explicit way of doing inheritence or creating an object. The only thing Lua has that comes even close to OOP is custom datatypes with metamethods, but just doing something like this is similar to using the struct keyword in C++
local function Car()
local Car = {}
Car.Speed = 0
function Car:Honk()
print("honk")
end
return Car
end
It’s worth noting that knowledge of Lua is not the only aspect of scripting mastery. The best scripters on the platform have a deep understanding of the engine, its optimizations, and Roblox’s own implementation of various features. You should seek, at all times, to gather as much information as possible regarding such interworkings. Roblox’s documentation unfortunately has its occasional faults; question the validity of promising guarantees, and make a habit of doing your own testing. A scripter who does not understand the implications of their practice, is effectively coding blind.