What is Glu?
Glu is a GUI (graphical user interface) for running Lua scripts. It contains a statically embedded Lua interpreter (currently version 5.4.2) as well as additional built-in functions and modules that allow Lua programmers to create everything from simple 2D graphics to quite sophisticated interactive applications. For a quick overview of what's possible, run the CanvasDemo script.
Glu is free and runs on Windows (7+), Mac (10.11+) and Linux (GTK 2.x). It's also open source, so if you'd like to make changes to the code then be our guest! Binary and source distributions are available here:
Example scripts
The Scripts folder supplied with Glu contains a number of example Lua scripts:
Breakout.lua | — The classic Breakout game. | |
CanvasDemo.lua | — Illustrates how to use the canvas functions. | |
CrossCards.lua | — A board game that combines Scrabble and poker. | |
Rubik'sCube.lua | — A Rubik's Cube simulator. | |
Samples.lua | — Creates help window links to small sample scripts. | |
SlidingBlocks.lua | — For creating and solving sliding-block puzzles. |
To run a script, simply click one of the above links or the corresponding button in the main Glu window. You can also select one of the Run items in the File menu.
To abort a running script, hit the escape key or select the Stop Script item in the File menu. Note that the escape key check is only done at the start of each built-in function (or by the print function in a console script). This means that very long Lua computations should call an occasional "no-op" like glu.doevent("") to allow the script to be aborted in a timely manner.