Yeh there’s certainly a lot of scope for optimising in blueprints. I have taken a very mathematical approach to it, using formulas from research papers and guides, but since I have the full power of Unreal I could start to use more clever tricks for many of the functions. I mean the purist approach is certainly a good way to go, but equally I could be doing collision checks, sphere traces and other such methods for far simpler and cheaper solutions.
I managed to get my pathfinding a lot cheaper now by spreading the iterations across a few frames, technically still takes just as many computations, but the fps hitch is basically gone. The pathfinding in particular could benefit from C++ though as I could take advantage of the PriorityQueue rather than the array sorting im currently using. Im also struggling with the movement radius, once it moves past about 8 tiles the fps hit is extreme. I have an idea for optimising that, it just keeps going wrong on odd rows. If it works though a 8 radius for example will go from 512 loops down to 64, so its a big improvement.
The C++ argument in general is a tricky one though, i’m up to 40 functions making this work, and just for pure tidiness, C++ would allow me just to expose the finished functions without all the internals, and whilst it takes away flexibility, many of the more mathematical functions are the type you wouldn’t be changing anyway. On the other hand, flexibility to iterate quickly, and If i do decide to marketplace this or give it away, it’s much simpler for people to just add it to their project rather than messing with plugins and the potential for having to compile it.