4 ms·
I would love to tinker with LÖVE, but I don't know the first thing about Lua. Anyone have pointers to good introductory resources they can share?
by smacktoward 11y ago
I would love to tinker with LÖVE, but I don't know the first thing about Lua. Anyone have pointers to good introductory resources they can share?
- AlexeyBrin 11y agoYou can pretty much learn the language in 1 - 2 days if you are an experienced programmer. Try the LUA website, they have some links to good tutorials.
- LewisJEllis 11y agoFrom http://www.lua.org/about.html http://www.lua.org/about.html: > "Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!
- venning 11y agoLÖVE has their own recommendations on resources to learn Lua from here: https://love2d.org/wiki/Main_Page#Lua https://love2d.org/wiki/Main_Page#Lua
- seivan 11y agoHow's the performance compared to say Cocos2d-X in C++? For say something like large scale steering forces and Behavior agents?
- striking 11y agoLuaJIT is fast and Love is minimal. It has threads and can callout to C. So performance is good.
- seivan 11y agoTurns out JIT is disabled on iOS and AppleTV. So might not get that boost.
- striking 11y agoIf you're really interested in maximizing performance, http://lua-users.org/wiki/LuaToCee http://lua-users.org/wiki/LuaToCee can help you turn your Lua code into C code instead. With some skillful manipulation of liblove, you can compile your game down to a 100% static executable. But no one's really bothered because Love is best at prototyping than actually releasing games, and performance is "good nuff" at this point in time anyway.
- Gracana 11y ago"Programming in Lua" is Lua's K&R. It is a very well written technical book. The Lua reference manual is also very approachable. http://www.lua.org/pil/ http://www.lua.org/pil/ http://www.lua.org/manual/5.3/ http://www.lua.org/manual/5.3/
- Franciscouzo 11y agoLöve uses luajit by default, which is Lua 5.1 with some 5.2 sprinkled on top.
- keyle 11y agoLua is really easy to pick up, even without a book. Start using it with LOVE and have fun.
- yareally 11y agoIf you have some experience with javascript, Lua's syntax, scoping and structure are fairly similar to that of ECMAScript 5. That's a very macro and broad comparison of it, but if you have scripting language experience, you'll be fine.
- LewisJEllis 11y agoFor a couple of quick intros, try Learn Lua in 15 Minutes[1] and Learning Lua from JS[2]. For a bit more depth, try the Lua-users Tutorial Directory[3]. For serious depth, the two recommended by Gracana, PIL[4] and the reference manual[5], are fantastic. For an overview of the ecosystem, including some useful gamedev libraries and LÖVE-specific resources, take a look at awesome-lua[6] (my own, shameless plug). http://tylerneylon.com/a/learn-lua/ http://tylerneylon.com/a/learn-lua/ http://phrogz.net/lua/LearningLua_FromJS.html http://phrogz.net/lua/LearningLua_FromJS.html http://lua-users.org/wiki/TutorialDirectory http://lua-users.org/wiki/TutorialDirectory http://www.lua.org/pil/ http://www.lua.org/pil/ http://www.lua.org/manual/5.1/ http://www.lua.org/manual/5.1/ https://github.com/LewisJEllis/awesome-lua https://github.com/LewisJEllis/awesome-lua
- makeset 11y ago[1] is also here: https://learnxinyminutes.com/docs/lua/ https://learnxinyminutes.com/docs/lua/
- kazagistar 11y agoIt is very minimalistic. There are only 8 datatypes: 4 immutable (nil, number, string, boolean), 3 mutable (table, coroutine, function) and userdata which is used for arbitrary opaque "exterior references". The standard library is fairly small. There is a small amount of "metaprogramming" possible that lets you overload operators and do some basic prototype-based OOP, but the whole thing is very approachable. Personally, I think it is one of the better options for a learning language because of how simple it is.