views:

424

answers:

4

There are some very good books about Lua. What they cannot cover is the big picture, when it comes to real applications (doc/view-type of applications). The interesting things are around those questions:

  • Use C++ in Lua or Lua in C++?
  • Who gets the main-loop?
  • What plays where?
  • How are model (document) and Lua-State kept in sync? Should the model be translated to lua-data and passed to the state and get back?
  • Or should the Lua-state act directly on the model by lots of access-functions?
  • ... probably much more.

Hence my Question: Which open-source-progams are worth to be studied in order to learn about those aspects?

+2  A: 

The Ogre3D game engine is open source and uses LUA for scripting. It also has a pretty vibrant community of both developers and users so would be a good source of answers to any questions you have about its relationship with LUA.

Andrew Grant
+1  A: 

TA Spring http://spring.clan-sy.com/

Its also a really fun game =D

Alex Lim
A: 

Wireshark uses it for custom dissector

total
A: 

Depends of your application.

A "large" game engine could be implemented in C/C++, and just some parts controlled by Lua scripts (C/C++ would "own the main loop").

In my work, I develop a program that are implemented in Lua, with some modules implemented in C (I do my "main loop" in Lua, and use some libaries implemented in C, not just for speed, but to code reuse).

As having a structure that's shared between a Lua state and an "external" entity, you could use Lua metatable features, such as __index and __newindex, to make your userdata just a "proxy" to the access functions.

Kknd