2

I've been reading a bit about Lua scripting here and there to know what it is about exactly but I didn't get quite the answer I was looking for.

As I have Logitech Gaming Software program here for gaming support, I noticed I could do Lua scripting and got interested by it.

The program offers to rebind keys and make sort of macros. Now I wondered if the Lua scripting was actually the Manual way to do these macros. (The same idea as the Macro making tool for MS Access that is actually VBA.)

If the answer is yes, I'd like to try and make something out of it for a game I'm playing.

pnuts
  • 58,317
  • 11
  • 87
  • 139
Senerio
  • 35
  • 1
  • 9
  • 6
    [Lua](http://en.wikipedia.org/wiki/Lua_(programming_language)) is a *general purpose* programming language and is often used in embedded markets - especially games. It is *much* more fitting to compare [VBA](http://en.wikipedia.org/wiki/Visual_Basic_for_Applications) (another programming language) with Lua than it is to compare "Excel Macros" to Lua. Exactly *what* can be done depends on the hosting environment. – user2864740 Oct 25 '13 at 20:27
  • 1
    An even better comparison is TCL. TCL and Lua have nearly the same origin story. Bigger software needed to be configured, then needed to be extended. Both use cases have large numbers of non-programmers. In both cases, a general purpose language grew out of the need. Where they diverge is the flavor of the language. TCL feels very much like a shell script with programming nailed on. Lua feels more like a real language. Both are still alive and well today, with large user communities, although TCL is far more visible to general users. – RBerteig Oct 25 '13 at 20:49
  • You may find [this answer of mine](http://stackoverflow.com/a/19182835/2633423) relevant. – LorenzoDonati4Ukraine-OnStrike Oct 26 '13 at 09:31

1 Answers1

2

Quoting from the creators of Lua:

Lua is a powerful, fast, lightweight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

You will find it used as a standalone language much like Perl, Tcl, or even Visual Basic. You will find it embedded as a configuration and scripting language in applications such as WireShark, the Awesome Window Manager, Adobe Lightroom, or World of Warcraft. You will find it used as an implementation language that glues core components together in many video games, Adobe Lightroom, and at least six other Adobe products. You will find it as the level scripting language and non-player character (aka AI) scripting language in the implementation of many video games. You will find it as the implementation language of many mobile apps on both iPhone and Android. In many cases, you would never know that Lua was there without noticing it mentioned in a credit screen, or in documentation of the configuration or scripting. A long list of uses is Where Lua Is Used, maintained by the Lua user community.

Personally, I use it to write test harnesses and control panels for the embedded devices that are my primary work. Using Lua together with a decent GUI toolkit, I can throw together a test harness faster than it would take otherwise, and the result is lightweight and relatively easy to deploy for other users.

RBerteig
  • 41,948
  • 7
  • 88
  • 128