@Shr1mpsy Thanks!
@Niels C++ in UE was very difficult for me at the beginning. The major problems was how to set up the project and to learn Unreal’s flavor of the language. There’s a lot of macros and requirements - if you got some of it wrong, the thing won’t compile at all. On UE Answerhub you can find a lot of advice like that:
Change to DevelopmentEditor configuration, compile; Change to DevelopmentGame configuration, compile. This gets IntelliSense to recompile and rescan headers and everything works fine again.
I have years of work experience with Python and I didn’t expect such a hard learning curve. But one day I rolled up my sleeves and decided to burn through it, no matter what. After 4 days things started to work, which doesn’t seem long at all in retrospect I must admit that generally I like how UE’s code is organized for performance. I learned a thing or two from just working with the TArray class or FVector.
There’s this popular Udemy course - but to my surprise, I found the formula was not suited for me (what’s a variable etc. etc.) So then I bought Tom Looman’s course for $15 (sales are frequent on Udemy) - and it was perfect. He shows a working example first, encourages you to dissect the code and play with it. Only then he proceeds into details. I’d definitely recommend this course instead of Wiki in the beginning.
However, I’m glad I started with a Blueprint prototype. Firstly, I knew that the algorithm works. It was easy to test and iterate. BP has also this great advantage of showing you the functions that work with a given object - and a search field I was able to learn the API this way.
Secondly, with a working Blueprint organized into functions, I was able to gradually replace pieces with C++ code. Just a UFUNCTION macro and it’s there, in Blueprint, as a node. I love it.
The last thing I did - writing to a texture - was actually much harder then everything else. There were two articles on the Wiki, which helped, and a couple of Answerhub comments. One of them got 31 upvotes, meaning that a lot of people ended up there. Finally I found a proper method in Isara Tech’s tutorial. There are places in Unreal where, it seems, without the good people from the Internet you’d be completely helpess.
To end this long post - one more thing about C++ itself. The language opens you up to an abundance of fundamental, time-tested techniques and sources of knowledge. For example I watched a talk from Mike Acton - it’s about the importance of the data, their layout, and organizing the code around them. My mind immediately started to think how I could use that. The next day I refactored the voxel grid from an array of structs (PropagationCell) to multiple linear arrays of floats (Temperature, Conductivity, etc.). Now whenever I need to read or write to temperature, I don’t need to carry the other properties along.