This book is a detailed and authoritative introduction to all aspects of Lua programming, by Lua's chief architect.
Programming in Lua gives a solid base for any programmer who wants to use Lua. It covers all aspects of Lua—from the basics to its API with C—explaining how to make good use of its features and giving numerous code examples. The book is targeted at people with some programming background, but it does not assume any prior knowledge about Lua or other scripting languages.
I have read parts of it while I was dissecting large amounts of lua code samples/projects available on the internet. It helped me a lot, but there are many things that I skipped.
Also "Beginning Lua Programming" by Kurt Jung & Aaron Brown (published by Wrox). It's been an invaluable reference to me - especially the chapters on the table and string libraries.
I'd also recommend the 2nd Edition of Programming in Lua - it's closer to the version of Lua that's used in Gideros.
There's also a PacktPub book called "Corona SDK Mobile Game Development" by M. Fernandez - obviously it's directed at the Beer SDK, but it's closer than you think!
Finally Brian Burton has written a couple of books about Corona - that again will probably point you in the right direction
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
It describes Lua 5.0 (most recent is 5.2) but I don't think there are many differences.
If you are just starting Lua, I would recommend avoiding closures and don't worry about tail recursion. Keep all functions global and avoid nested functions. With this simple style you will avoid 90% of Lua "gotchas". (IMO)
It describes Lua 5.0 (most recent is 5.2) but I don't think there are many differences.
Mostly to do with things like...
table.insert(t,data)
vs
t[#t]= data
Still a good (free) reference though
If you are just starting Lua, I would recommend avoiding closures and don't worry about tail recursion. Keep all functions global and avoid nested functions. With this simple style you will avoid 90% of Lua "gotchas". (IMO)
Damm Straight! - Best advice I've heard all day (other than @Scouser saying put the kettle on you Brittany loving freak!)
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@techdojo Thanks very much. Lua is a powerful and beautiful language but its so flexible and powerful people can really tie themselves in knots. When I started, I used all the fancy tricks and got a lot of inexplicable behaviour so I reverted to a C-like style and found that kept me out of trouble.
I think there should be some sort of style guide: perhaps one for beginners, one for intermediate and one for advanced users. The beginner style might just use global variables throughout while intermediate would be a C-like style.
For example, a child could learn Lua as his/her first programming language provided s/he sticks to the beginner style.
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Comments
Programming in Lua by Roberto Ierusalimschy
Description :
It helped me a lot, but there are many things that I skipped.
It's been an invaluable reference to me - especially the chapters on the table and string libraries.
I'd also recommend the 2nd Edition of Programming in Lua - it's closer to the version of Lua that's used in Gideros.
There's also a PacktPub book called "Corona SDK Mobile Game Development" by M. Fernandez - obviously it's directed at the Beer SDK, but it's closer than you think!
Finally Brian Burton has written a couple of books about Corona - that again will probably point you in the right direction
http://www.burtonsmediagroup.com/books/
Hope this helps.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
http://www.lua.org/pil/#1ed
It describes Lua 5.0 (most recent is 5.2) but I don't think there are many differences.
If you are just starting Lua, I would recommend avoiding closures and don't worry about tail recursion. Keep all functions global and avoid nested functions. With this simple style you will avoid 90% of Lua "gotchas". (IMO)
Likes: techdojo
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
I think there should be some sort of style guide: perhaps one for beginners, one for intermediate and one for advanced users. The beginner style might just use global variables throughout while intermediate would be a C-like style.
For example, a child could learn Lua as his/her first programming language provided s/he sticks to the beginner style.
Likes: techdojo
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Likes: atilim
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps