Is there a Garry's Mod SDK I can download? I need one because I need to make addons in c++ so they are more optimized than lua ones.
Also, if there isn't a SDK, is there Gsrrys mod source code I can use? It doesn't have to be on the latest version, I can update it myself.
I dont think you can make garrys mod addons in c++ code
[QUOTE=The Gaben;50536255]I dont think you can make garrys mod addons in c++ code[/QUOTE]
Well, technically, you can... but why would you? C++ is best reserved for doing something that you can't do with Lua. Usually, that means adding a Lua binding to something so that you can then do it in Lua.
[QUOTE=Jcw87;50536504]you can[/QUOTE]
So would it be possible to make an entire gamemode out of a C++ module[s]?
[QUOTE=Jcw87;50536504]but why would you?[/QUOTE]
OP says so his addons are optimized than lua addons
[QUOTE=RonanZer0;50536986]So would it be possible to make an entire gamemode out of a C++ module[s]?[/QUOTE]
Possible, yes. However, every time you need to call a function that is defined in the game dll and not in one of the many engine dlls, you will have to call them through Lua, as the native method is a royal pain in the ass, involving reverse engineering, signature scanning, and your function signatures breaking on every garrysmod update. With all of that dipping into Lua just to call these commonly used functions, will the performance gains outweigh the costs? Probably not.
[QUOTE=The Gaben;50537022]OP says so his addons are optimized than lua addons[/QUOTE]
I'm willing to bet that the performance problems aren't being caused by Lua. He should try a [url=https://github.com/FPtje/FProfiler]profiler[/url] first before deciding that he needs to use C++ to make it 'faster'.
Sorry, you need to Log In to post a reply to this thread.