PDA

View Full Version : Good Book on LUA?


Sybixsus
10-21-2006, 04:37 PM
I've seen a few threads around here where people are using LUA ( often with XML ) on their GUI's, which is precisely what I want to do ( in fact, that's how I found the threads, because I was searching to see if it was another stupid idea I'd had or something other people did too! ) and I may well want to use it for AI, level-loading and other stuff too.

I've found two books so far, this one :

http://www.amazon.co.uk/Programming-Lua-Second-Roberto-Ierusalimschy/dp/8590379825/

Which is a general purpose guide by the guy behind LUA, so I guess that's a good thing, but it's not specific to games, of course, so it won't really help me with application, whereas I can probably learn most of the technical stuff from the manual.

And this one :

http://www.amazon.co.uk/Game-Development-Lua-Paul-Schuytema/dp/1584504048/

Which is much more oriented towareds games, but has some very patchy reviews.

I have a lot of books I need to buy over time, and this project is already going to cost me a fortune ( all my own money too! ) so I'm trying to keep a handle on my spending and avoid buying both if possible.

So I'm wondering if anyone's read either - particularly the latter since reviews for the former are almost entirely positive - and can comment, and also if anyone knows of any other books or reading material they can recommend.

I've bookmarked the World of Warcraft modding wiki, as this seems to have lots of good information on XML and LUA for gui's, and a quick introductory tutorial on FlipCode, but that's about all.

I'm a complete noob to LUA and scripting in general, and I don't plan on using it with C, so anything which jumps in at the deep end is probably not for me.

soniCron
10-21-2006, 05:49 PM
You can read the first edition of Programming in Lua for free:

http://www.lua.org/pil/

That's what I used to learn Lua and I was able to create an entire game engine that utilized the language at its core. It's a fantastic read that'll get you up to speed in no time! :)

Sybixsus
10-22-2006, 05:54 AM
That looks good. It's mainly the C API side of things I've had trouble finding good tutorials on, and at least the first few pages of that book do a good job of explaining how it all works, so this might well be all I need. Thanks!

HalfLucifer
10-24-2006, 12:05 AM
I've read both books a while ago.
The first one is a must read as a Lua programmer while the second one is enojoyable to read too.
It goes to real application for game development covering many useful topic to utilize the power of Lua.

Mainly, Lua can be used as data description language, game logic or both in game development.
What I get most in the book is the design concept that how to integrated it with C/C++ code and main program flow.
Personally I don't much like the way it implements GUI and game logic,
but I guess it's sufficient for a simple game implementation and for book content.
In my opinion, the book is worth a read if you are new to Lua game development.