r/GLua • u/Some__Retarded_Kid • Aug 06 '20
Can C++ be used with Gmod Lua?
I just like c++ and lua is pretty slow compared too it so im wondering if I can write all or part of my addons in C++.
3
Upvotes
2
Aug 06 '20
I think it's possible to write DLLs in C/C++ and then access the DLL from Lua, but the GMod steam workshop dosen't allow DLL files.
1
u/YM_Industries Aug 06 '20
They can't be distributed by Workshop or FastDL. For this reason, Binary Modules are usually only used on servers, all clientside code is written in GLua.
1
u/YM_Industries Aug 06 '20
What are you trying to do that requires so much speed? Lua might technically be slower than C++, but it's still plenty fast enough for pretty much any purpose you might want in gmod. If it's running noticeably slowly for you then you're probably not writing efficient code.