Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Recommend a Lua Book? — Gideros Forum

Recommend a Lua Book?

mobileguymobileguy Member
edited September 2012 in General questions
Can anyone recommend a good book on learning Lua?

Comments

  • MellsMells Guru
    edited September 2012
    Hi and welcome,

    Programming in Lua by Roberto Ierusalimschy
    Description :
    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.
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • @Mells: Just curious, have you read it?
  • 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.
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • 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

    http://www.burtonsmediagroup.com/books/

    Hope this helps.
    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
  • john26john26 Maintainer
    Like Mells said, I read "Programming in Lua". I actually read the first edition which is available online

    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

    +1 -1 (+1 / -0 )Share on Facebook

  • 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
  • john26john26 Maintainer
    @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.

    Likes: techdojo

    +1 -1 (+1 / -0 )Share on Facebook
  • @john26 - 100% agree :)
    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
  • Do a google search, there are some new books coming soon... included in the Christmas Stocking perhaps ...

    Likes: atilim

    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    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
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.