lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


This past week a new book[1] for the World of Warcraft user interface
community shipped from the publisher, and I was asked by Luiz to post
about it here.  This book focuses on teaching the reader how to use
Lua and XML to create addons for the popular game World of Warcraft.
This project took almost a year and the final result is a
comprehensive and hefty tome.

The first six chapters focus specifically on teaching the reader Lua
in a simple way.  Admittedly it doesn't delve into some of the more
esoteric features of the language and indeed don't address the C API
whatsoever due to their lack of relevance to addon developers.  Using
a style similar to that of PiL, the reader is lead through examples
that help them grasp the concepts that are being presented.  The
second portion of the book explains how to implement some of the more
complex features in addons, while the final section consists of over
600 pages of API documentation.

As a resource for the book, I've created a simple AJAX Lua
interpreter[2].  In addition to basic single line commands, this
interpreter also supports command history as well as the same
multi-line blocks that are supported by the stock interpreter.  I've
recently added global persistence (each time the page is loaded a
session id is generated, giving you a fresh start each time you
reload) using Pluto[3].  There are currently a few bugs to work out,
and the styling leaves quite a bit to be desired but its functional at
this point.

Interesting enough, Lua factored quite heavily into the development of
both the book, and the companion website.  Over 600 pages of API
documentation was generated via Lua script, from Lua table
definitions.  When we began the documentation process, I needed a
format that was easily changed and parsed, while still being human
readable.  Lua tables allowed us to document over 2200 functions by
simply creating Lua tables that describe the attributes of each.  One
complete, these tables were parsed, markup was generated and submitted
as the reference chapters in the book.

The website is using Sputnik[4] on Kepler[5] in a shared hosting
environment.  Sputnik was extensible enough to allow me to implement
node comments, forums, file uploads, account registration and scores
of other features with minimal heartache.  Kepler has provided an
extremely stable and fast platform for hosting the application and
everyone has been extremely helpful throughout the process.

Thank you to everyone who was involved in the project and have helped
to bring the title and the website to fruition.

- Jim

[1] http://astore.amazon.com/worofwarproag-20/detail/0470229810/105-0720423-4475656
[2] http://wowprogramming.com/utils/weblua
[3] http://lua-users.org/wiki/PlutoLibrary
[4] http://sputnik.freewisdom.org/
[5] http://www.keplerproject.org/en/