As UE4 goes totally opensource , can't wait for UE4 wrapper for nim. Has anyone attemped?
Enabling it will make nim ahead of many other langauges. Nim is very suitable for game/3d development right now.
Hey v3ss0n,
Just to clarify, UE4 isn't open source, it is public source. You still have to sign up for a developer account on the https://www.unrealengine.com website, and you have to accept the EULA containing the licensing terms.
That being said, Nim integration into UE4 would be awesome, and it's something I have been wanting to do for a while. I just haven't had any time yet as I am totally slammed at work and have to get a few other personal projects out of the way first.
There are two ways to integrate Nim into the Engine: as a script plug-in, and into the Unreal build system. Both options are, unfortunately, not coming without a considerable amount of work.
An integration into the build system (aka. UBT) would allow for implementing modules in Nim instead of C++. The main obstacles here will be the automatic generation of the run-time reflection code for things like serialization, network replication, etc (this is very messy for C++, but should be much easier in Nim), as well as the modification of UBT to allow for a different compiler, project file generation, awareness of Nim file extensions, and linking with C++ modules. These kinds of changes will have to be done in a way that is programming language (i.e. Nim) agnostic in order to be considered for integration by the Engine team.
A scripting language plug-in would not require any modifications of the existing code base, and that side of the problem just goes away. However, this, too, will require some tedious work. The main obstacle here will be the grind work to implement some automatic class wrapper generator that will make UE4 types and functions available inside Nim. We do have an implementation for Lua, and some people in the community have started to integrate other scripting languages, but it's not something that can be done over a weekend.
As a first step towards integrating Nim into UE4, I would recommend the scripting language plug-in approach as that will avoid Engine and build tool changes.
I hope to find some time to work on something like this, but it's not going to happen this month, and probably not next month either. If someone wants to start on such a thing, I will be happy to assist with any problems you might encounter on the UE4 side of things.
Thank you very much for this insightful explanation! Wonderful.
Even Plugin-scripting would be very interesting! I believe others will interest in this too.
Sorry for the necro but this posts appears quite high in google.
There is a third approach, which is what NUE does: to reimplement a lean version of UHT at Nim's compile time and to take adv of the reflection system for making the bindings automatically. But @gmpreussner was right, it didnt happen over a weekend. Indeed, a year has pass and still we are not feature complete (although partly is because the aim is high).