UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 23 Oct 2012 08:00 PM |
How come the devs choose Lua as the language for games? Its not anything bad, I would like to know.
firefeind1 is stuck in my heaaad |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
| |
|
|
| 23 Oct 2012 08:10 PM |
| Lua is fast, portable, and easy to learn (Which is especially important for a children's game) |
|
|
| Report Abuse |
|
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 23 Oct 2012 08:26 PM |
Their not very intelligent. They should've used another oo language. |
|
|
| Report Abuse |
|
|
Merely
|
  |
| Joined: 07 Dec 2010 |
| Total Posts: 17266 |
|
|
| 23 Oct 2012 08:33 PM |
>Their not very intelligent. And who are you to say that? |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 08:34 PM |
>Their not very intelligent.
Oh, the irony. |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 23 Oct 2012 08:36 PM |
> They should've used another oo language. What language do you think they should they have used? |
|
|
| Report Abuse |
|
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 23 Oct 2012 10:11 PM |
| I think Lua was the perfect pick... Either that or Python. |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 23 Oct 2012 10:14 PM |
| But Python is as ugly as a wild troll. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 23 Oct 2012 10:21 PM |
| It ain't all that ugly :P. |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 23 Oct 2012 11:12 PM |
| I think Python is almost overkill for the job... Lua is perfect. |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
| |
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 24 Oct 2012 12:47 AM |
Lua's easy to implement.
Python would have taken a lot more time.
It's not just the language, it's implementing it.
Also, Lua has a faster interpreter, which is very important. |
|
|
| Report Abuse |
|
|
|
| 24 Oct 2012 06:40 AM |
Fast (i guess... at least with the JIT-ing version xD) Lightweight Flexible (you can use lua to code some structures which allow you to write code in a different way. for example metatables and all the various ways of doing stuff like calling functions without parantheses etc.) |
|
|
| Report Abuse |
|
|
|
| 24 Oct 2012 06:56 AM |
Another reason is because a lot of other games use Lua too.
Like WOW, Gmod, etc. |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 24 Oct 2012 07:38 AM |
Lua probably makes the most sense to children. I mean really, the symbols and keywords could easily be converted to English and then any other language or immediatley to another language:
If hax ~= nil then | v If hax isn't non-existing then
Ofcourse there are some things wich do not have a direct translation, for example tweening, but even that could be translated:
GuiThing:TweenPosition(UDim2.new(0, 0.5, 0, 0.25), "InOut", "Sine", 3, false, nil) | v Move GuiThing to UDim.new(0, 0.5, 0, 0.25) with easingDirection InOut, easingStyle Sine, and it will last 3 seconds. (You could leave the last two parameters out so they will turn automaticly turn nil (nil == false (for the override arguement)))
The words being used need to be understood, wich is what the children/people will learn. (such as easingStyle, easingDirection, ...) |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 24 Oct 2012 10:53 AM |
| If mathematics itself pooped out a scripting language, it would be similar to Lua. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 24 Oct 2012 11:45 AM |
"If mathematics itself pooped out a scripting language, it would be similar to Lua."
That makes no sense considering that Lua isn't even heard about for mathematical reasons (not more than any other language... besides Mathematica and some other exceptions.)
If anything, Lua is more widely known for it's string manipulation. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 24 Oct 2012 12:25 PM |
^
Similarities:
-Don't have to declare the type of number -Functions have the name "function" -No semicolons and no forced indentation -No ++/+= operators or similar
Which makes it quite similar to math in comparison to C++ and some other languages.
For example:
#include "iostream" int main() { using namespace std; int x = 1; int n = 2; cout << x + n << endl; return 0; }
is equivalent to:
x = 1 n = 2 print(x+n)
Now, which would make more sense to a mathematician with no knowledge in programming? Lua of course.
Now what would that look like if math "pooped out a scripting language"?
x =1 n = 2 x+n=3
Which is very similar. Functions would look similar, too. |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 24 Oct 2012 05:34 PM |
| I was talking about basic similarities .-. didn't finish your post because the rest was redundant ? |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 24 Oct 2012 05:37 PM |
OH. Thought you were talking about what Lua has to offer math wise and etc, rather than why it compares to mathematics because it's missing some minor things other languages have.
But there are other languages, like Lua, that don't have those nifty implementations, as well :P |
|
|
| Report Abuse |
|
|
Davidii
|
  |
| Joined: 17 Jul 2008 |
| Total Posts: 1282 |
|
|
| 24 Oct 2012 05:57 PM |
| I would have vastly preferred Python. In all of my coding experience, no other language has ever been more fun to use or more intuitive or more straightforward or more satisfying than the one I have using Python. Lua's great too, though. |
|
|
| Report Abuse |
|
|
8SunTzu8
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 8199 |
|
|
| 24 Oct 2012 06:41 PM |
Lua seems like the perfect choice. It's also relatively easy to learn, and once you understand the syntax, as mentioned before, it can be read as easily as English.
All "~=" is is a combination of symbols to mean something. "Not equal to" has the same description.
"Contact me if you are interested in becoming a developer, innovator, or recruiter for CSA." |
|
|
| Report Abuse |
|
|