Lua Scripting

Is there any hope of the Lua scripting language being implemented into Unity, The reason I ask is because Ive looked at Lua’s syntax and I find it easy to read and write

Thank You

little to no hope I would say unless you implement it for your project.

There is already a partially compatible cut language (JS) and a barely not used beginner friendly one (boo) and the webplayer / mobile players are already large enough thanks to them :slight_smile:

did you try out unity scripting and/or boo already?

Im not a programmer, but I looked at the language and picked it up pretty quick, I just cant code in javascript :frowning:

I’m just starting to learn Lua now after having started with Javascript about 5 years ago. Although I’m still just getting started, I see a fair number of similarities between the two. Same goes with C#. Although I can’t start writing a C# script from scratch, I can understand enough of it to edit an existing script or even convert it to Javascript if I need to. My point is this: I think once you learn one, the other won’t be so hard to pick up.

ok so Im going to learn lua first then javascript
because I find it easier

?

In my opinion, you should directly jump on Unityscript, learning the Lua functions won’t help you in Unity. Plus, Lua syntax is not the same as Unityscript.

okey then ive been trying several different programming languages for beginners but cannot get my head around it

then you learnt them from the wrong side likely.

you first need to learn the basics, then experiment by editing existing scripts and then learn the advanced stuff

that normally works out pretty fine :slight_smile:

see the 2d jump’n’run tutorial on the website for example

Unity-Script is very easy. Learn it.

Ha! I guess I didn’t quite make my point very clear. :lol: What I was trying to say was that if you’ve already started learning Lua, then Javascript shouldn’t be very hard to adapt to. The formatting is different, but a lot of other bits are similar. I’ll ditto the other comments on learning Javascript as well, it’s very easy to learn.

the main time you will invest in learning isn’t the syntax of the language anyway, its the commands and those you must learn within unity, they don’t exist outside

Learning how to program is not as much about language as it’s often made out to be.

It’s like learning to drive. It’s not terribly important which car you learn to drive with, but rather learning how cars in general work, although it can be easier if you stick to one car while you learn the basics.

So regardless of what language you choose, just be sure to stick with it while you learn all the basics, and don’t try to flip flop around too much until you are comfortable programming.

Funny, I am a C# programmer for a long long time since around 2003 or so (i know somewhere around 24 different programming languages, they all look almost the same tho).

And I tryed to learn LUA and it looks so damn ugly and wierd that I found it too much for me, reading some comments on how easy it was, i was thinking “omg what are those people smoking these days, why on earth would anyone wanna learn LUA”.

Maybe its just me, but, are you sure you guys even tried to learn other languages? Maybe you think you like LUA because someone else said so?

/discuss

PS: my advise to starters, start by learning a real programming language first, a strong-typed language, where you are forced to use variable types to declare variables. It may look a bit more dificult at first, but the extra complexity will set you back maybe 2 days, no more, and will save you years later on. Know your ABC before you start spelling, or you will most likely get so confused that any simple thing will become utterly painful.

Learn that each variable type (int,float,object,vector3,quaternion,etc) IS ACTUALLY A CLASS, and a class is a blueprint of how data can be organized. (int, float and some over PRIMITIVE types arent actually classes, but it will help you learn if you think about them as classes and move on later into details)

Example (java) :
The int primitive type has also a normal type that is exactly the same and can be used in the same way (with a few extras)

int is short for integer

int number = 5;
Integer myInt = new Integer(5);
Integer anotherInt = 5;

int r = number+myInt+anotherInt;

print(r); // will print 15

I began programming on Visual Basic and god it couldnt have been a bigger mistake, i thought, since visual basic is more simple than C++, I should go for it first. Then it took me years to understand (now) simple concepts because visual basic made it all too simple, i wish i went for the big guns first, it would be a bit harder (not that much), but its easier to learn something when you know nothing than to learn it after you know a different way of doing it and try to associate stuff you know to the new language, takes FAR much more time and effort.

So, learn your alphabet first, then go for the abbreviations.