I am exploring and learning Unreal Engine 5 (UE5) and also browsing UE4 as well but I am looking for an example plugin (either open source or on the Unreal Engine Marketplace) that will allow me to add a good scripting language to a basic simple game project.
So far I have been able to fine 2 reasonable candidates for scripting InGame languages from what I can tell:
SkookumScript (This one seems to have stopped development for now)
and
LuaMachine
I am trying to figure out where to start for both some good intros to game development with UE5 as well as adding in an InGame scripting language for the players that is very powerful since I do not think that UE5 has one built-in from what I can tell.
Of course, there are Blueprints and native C++but I think that they cannot be called from an InGame console from within a game and are only in the UnReal Editor development, but could be wrong.
What is the best InGame scripting engine that people are using?
Thanks and have a great day
Hey there @LonnieTC! best is super subjective in this regard. Language wise, personally I think LUA or JS have the most built in user base, but it’s going to come down to which plugin has more coverage over Unreal’s functions. I can’t speak for the JS plugin but after using LuaMachine a bit I can say I had no major complaints but I didn’t work with it too deeply.
This is not an endorsement/advertisement by Epic Games, just my opinion
For gameplay purposes? or to let players learn an existing language?
If it is for gameplay I’d just write my own subsystem to parse string inputs from players.
FWIW, you very likely want to use Luau (the Roblox type-checking fork of Lua) rather than LuaJIT. It’s frequently faster, uses less memory, and gives much better error messages.
That being said, if I were to add scripting to a game today, I’d look very hard at some WASM hosting library. WASM allows you to let the user script in whatever language they want, that can generate a WASM assembly. It’s a bit like the idea behind the Java VM, or the .NET CLR, with lighter-weight support infrastructure and more open tooling.
The main question then is what level of API you expose to the developer. You can use the metadata generated by the UnrealHeaderTool to expose the full blueprint-accessible API (I think this is similar to what the Python support does, too?) but for specific gameplay only, you might want a simpler API that you define yourself.
Either way, you should probably wrap the API behind some global object/namespace – something like API.someFunc() or even v1.someFunc() – to allow for a natural evolution in the future, should your game become popular and have a lifetime. I usually don’t recommend engineering for things you might never need, but this is very little extra work right now, and pays off well in the future.