top | item 31065737

(no title)

isaiahg | 3 years ago

As someone who generally hates visual programming and just wants a text editor, I'd say blueprints is actually one of the most enjoyable of these. They really nailed the editor and you can have a lot of fun just playing around.

Also the c++ unreal shouldn't be compared to pure C++. You're working with the unreal framework which adds a lot of quality of life features. I've been working with it for the last month or so and while it's not as easy an experience as c# it's probably the cleanest c++ experience I've had so far.

discuss

order

rtpg|3 years ago

blueprints are pretty great and lower the barrier of entry for people (especially for like game jam stuff), but I do wish they would have a "here you can just write some Lua" block sometimes... kinda hard to do structured programming the times you kinda want it.

But the discoverability stuff along with loads of nice error checking are very nice.

lmc|3 years ago

This is what i was wondering that wasn't explained in the article... does UE offer some guardrails for working with c++ that make the jump from C# an easier decision?

dogles|3 years ago

short answer: yes. If you stay within their uclass/uproperty framework, you have garbage collection, guaranteed initialization of class members, type reflection, etc.

Rare issues come up like: ``` int* Element = &Array[0]; Array.Add(0); *Element = 3; // could be access violation or memory-stomp if array was resized ``` Which can be addressed somewhat by code style policies.

Their garbage collector is also slightly weird in that it most things are deleted when there are no more references to it (as expected) but Actors can be deleted explicitly, in which case all references to them are set to null. This makes a lot of sense for a game engine actually, just perhaps unexpected from a language like C#.

jcelerier|3 years ago

so interesting, as a mostly C++ dev, UE's C++ style feels absolutely awful aha. Of course it mostly has to be like this because c++ used to not have reflection at all but I think that nowadays one could use similar principles as the ones I've tried to develop for audio / media objects in https://github.com/celtera/avendish to implement game objects / UObject in a much cleaner way and with better compile times.

Add a couple custom attributes implemented as a clang plug-in like e.g.

    [[ue::name("Player HP")]]
    int hp{};
which can be done in a couple afternoons by an intern and things would look sooo muuuch better.