Hacker News new | past | comments | ask | show | jobs | submit login

Lua is a multi paradigm programming language that is very popular with game makers. There's also an engine written in Lua for making 2d video games called Love http://love2d.org/.

Lua is the dominant language for AAA console games. If you are serious about making games, you absolutely should learn Lua. It's a language usually "learned on the job", which is why the industry is so incestuous and it's so hard to break in.

Lua is a tremendously well-designed language, IMHO, and it would be pretty sad if people write it off as a serious programming language because the first thing they associate it with is WoW.

It developed primarily for use as an embedded language, so the Lua authors have kept the core very small. It's easy to use it with C, and to extend the core with libraries written in C or Lua. Many things that other languages require in the core can just be loaded as libraries. This means that (much like Scheme) it makes for a clean foundation for interesting CS projects -- LPEG (http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html) is a novel parsing/pattern matching system, there's a new library to add Erlang-style concurrency (http://concurrentlua.luaforge.net/), LuaJIT (http://luajit.org/) is a cutting edge JIT compiler, etc.

It's trivially portable to anywhere C is used, and is quite fast. It's also distributed under a BSD license, if your company wants to use their own fork internally (it's ~500k of source). You can also deliver executable files with byte-compiled Lua embedded in them.

Stylistically, it's probably closest to Python, but with more Scheme influence (tail-call optimization, coroutines, non-crippled "lambdas", etc.). It's idiomatic to make heavy use of tables, which are very similar to Python dictionaries.

The standard intro is _Programming in Lua_ (http://www.inf.puc-rio.br/~roberto/pil2/). The first version (covering Lua 5.0) of the book is free online, but there were some significant changes to the language with 5.1, particularly the module system.

It has some downsides as a Language (the community, while nice, is rather small, so sometimes documentation is sparse or scattered; it's generally assumed you're already using C or C++, so the standard libraries have gaps when using Lua on its own; the module system is still maturing (LuaRocks (http://luarocks.luaforge.net/rocks/) is an attempt to fix this); etc.), but picking any particular language always involves trade-offs. I've been quite pleased with it.

It's crazy that Lua gets a bad rap. At the end of the day, it's a key language for the industry, and not just for MMORPGs.

I don't think it gets a bad rap so much as that it's just not well-known outside a few niches. (FWIW: I'm not in the game industry. I work with high-performance rendered graphics, though, so there are similar concerns.)

(Also, MIT license, not BSD.)

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact