Scripts / [SOLVED] Intro to Lua pdf

Author
Message
benjiboy
7
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 21st Jan 2020 08:25
The 'Scripting With Lua' pdf distributed with GG is long overdue for an update, but it contains this :-
Quote: "GameGuru operates within one Lua state.
It is often useful to have your scripts in the form of text files. However, when you distribute your game, it is preferable to have all scripts in a compiled, non-human readable form. Using the Lua Compiler, “Luac”, it is possible to precompile your scripts.
The main advantages of precompiling are: faster loading, protecting source code from user changes, and off-line syntax error detection (so no errors are detected at run time).
To compile a script, simply run Luac.exe with a single argument – the file name of the script to compile:"


Now luac.exe isn't distrbuted with GG, but assuming I install it, is there any point? Can I point the stand-alone builder at a compiled scriptbank or is the engine only ever going to use the text versions, or does it, (I hope it does) precompile scripts as part of the build process?
You can't teach an old dog.

The author of this post has marked a post as an answer.

Go to answer
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Jan 2020 20:39
Never saw that before. Great find, good question. Old data?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Jan 2020 22:58 Edited at: 21st Jan 2020 22:58
This post has been marked by the post author as the answer.
Lua files are already precompiled in GG so no need to use Luac anymore.
Been there, done that, got all the T-Shirts!
PM
benjiboy
7
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 22nd Jan 2020 06:21
Good news. Thanks Amenmoses.
You can't teach an old dog.

Login to post a reply

Server time is: 2024-04-25 08:55:05
Your offset time is: 2024-04-25 08:55:05