The talk I did for the NimConf is up:
piped.video/watch?v=2uWnsu57…
It's somewhat an adv workflow, if you are new to NUE I wont recommend starting with it :P Although I go over an overview of the third person template in Nim :)
#gamedev#indedev#unrealengine#nimlang
Just implemented a way to specify type traits in the NimForUE DSL when creating uStructs.
By marking the type with `WithNetSerializer` it will gen the TStructOpsTypeTraits below
#unrealengine#ue5#indiegamedev#gamedev
One of the cooler features of Nim that many doesnt know about is static introspection. Imagine you want to know the parent of type at compile time. There is no built in function for it, but no worries, it can be implemented like so:
1/2
#nimlang#gamedev#indiegamedev
ALT proc parent*(T:typedesc): string =
let child = bindSym typeof(T).name
let parent = child.getImpl()[^1][1]
case parent.kind:
of nnkOfInherit:parent[0].strVal()
else: ""
#example:
type
Foo = object of RootObj
Boo = object of Foo
static:
assert parent(Boo) == "Foo"
Seems like in UE 5.3 you can no longer use their bp details view thing in regular widgets. On the right, the code in NimForUE to have it back ;)
#ue5#indiegamedev#gamedev#unity
Speaking of hot reloading, what surprised me in Godot is that script changes are synced to your running game too. And it happens instantly. Which is kinda amazing tbh. Gotta iterate fast 🏎️
Just updated the "Why Nim?" section of NimForUE.
Notice I dont mention ARC/ORC because the plugin doesnt really uses it much :)
#ue5#gamedev#unity#nimlang
The code here, plus my prev tweet is all it takes (1:1 with C++) to have a custom viewport in NimForUE for an UAsset/UObjet.
C++ version would be roughly 8 files plus the need for restarting the Editor ;)
Will add some ad hoc editing next
#nimlang#ue5#gamedev#indiedev
This all it takes in NimForUE to create a custom entry in the menu for your custom Asset.
Still a lot of boilerplate that could be reduced further with metaprogramming, but this is 1 to 1 with the C++ API, which usually takes 4 files btw
#nimlang#gamedev#ue5#indiedev#unreal
There is an insane amount of work behind this but it is coming along:
Now uClasses can be produced without recompiling at all, and yes it applies to functions too.
If anyone know a faster way to produce a new type in UE, please let me know ;)
#ue5#gamedev#indiedev#nimlang
This is all it takes to create a native blueprint async node in Nim.
Of course you could easily make a macro that takes the params from the signature of the actual function that implements the logic, but thats for another day ;)
#nimlang#ue5#gamedev#indiegamedev
There you go a native node in Nim:
(last one was the Bp's way, which is a bit convoluted IMO)
Needed to add support to a few more things, between them the class macro which allows you to define regular cpp classes and override their funcs.
#nimlang#ue5#gamedev#PCG
Started to add experimental support to UE 5.2 so I can play with PCG.
You can create nodes in a similar fashion that you can create them in Blueprint but will add a native hook so it's easier to create PCG nodes from Nim
#UE5#nimlang#indiedev#gamedev
En cuanto al code no, son conjeturas mías xD Pero en general si usan reinforcement learning, lo comenta Sam aqui: piped.video/watch?v=L_Guz73e…
Es como muy de cajon, no?
Started to add experimental support to UE 5.2 so I can play with PCG.
You can create nodes in a similar fashion that you can create them in Blueprint but will add a native hook so it's easier to create PCG nodes from Nim
#UE5#nimlang#indiedev#gamedev
My entry for #notGDC is up
"NimForUE current status + a new game changer dev workflow for UE"
I go over the current status of things really quick and showcase which I think it's a new cool feature!
Go watch, it's just 10 minutes :)
Link below
#NimForUE#NimLang#UE5#GameDev
This is somewhat crazy. I was worried because the compilation times may increase on NimScript after the engine bindings are there, so I did a test:
I generated 10k simple functions with this (see the img)
Log them into the UE log and copy and pasted it into the script. 1/2
A step closer to replace C++ in NimForUE, with the meta `EarlyLoad` you can hook into UE before the Engine gets initialized which allows you to replace "low level" engine classes.
Below an example of one of the most common, the Asset Manager
#ue5#gamedev#nimlang#indiedev
It was a difficult task but got a POC of Nim running at *runtime* in NUE (yes it will work in games). Which means not compile time at all.
#UE5#nimlang#indiedev#unrealengine#gamedev
Some Nim awesomeness, just like that you can introspect your own code at comp time to see what types are defined.
In this particular case I want to traverse NimForUE so when generating the bindings I can skip those types that are manually bound
#ue5#nimlang#indiedev#gamedev
Now NimForUE automatically binds the full reflection API (+ manually imported C++).
Did a stress test with the Lyra project and it generated ~165k modules. Being engine the largest that went from 60k LoC to 200K.
#nimlang#ue5#unrealengine#gamedev#indiedev
Some progress on supporting virtual fns.
The const modifier is fully supported, needed to introduce a constcpp pragma in order to do so. It's a bit bloated but hey, you can override fns!
#unrealengine#ue5#gamedev#nimlang
Someone asked about an example of NimForUE async programming. It's pretty straightforward, the engine loop is connected to Nim's dispatcher so you can use Nim futures.
More down the road I will add support to UE dynamic delegates
#NimForUE#unrealengine#ue5#gamedev#nimlang
Someone asked on discord if @nim_lang has something similar to #FSharp type providers.
Well, in Nim you can just roll your own. Here is a naive json type provider in a few lines :-P
Just implemented the basics of virtual function overrides for uClasses.
This is a big step because most of the UE APIs are extended using v fns.
AFAIK there was no way around C++ for heavily extending UE until Today.
I bet Verse cant do it ;)
#gamedev#ue5#verse#unity
Just added support for implementing existing interfaces in NimForUE.
AFAIK NimForUE is the only plugin that has it. For now only reflected interfaces but I expect it to work with pure C++ interfaces in the future
#unrealengine#ue5#gamedev#indiedev#unity#madewithunreal
Blutilities are now supported too. Meaning you can create editor UIs
The coolest thing there is when you compile Nim, the editor auto updates itself without intervention.
Who want to builds UI with cpp or bp after this?
#ue5#unrealengine#gamedev#indiedev#unity#madewithunreal
Just added support for constructors in the #NimForUE DSL. They behave just like in cpp, you can set your CDO props there
Will be adding more sugar into comps soon so you dont even have to define a constructor to init them.
#gamedev#unrealengine#ue5#indiegamedev#indiedev