is c++ mandatory for VR development? since has been stated to be 10 times faster than blueprints

the source (well is a little old now): Blueprint Performance Benchmark? - Blueprint Visual Scripting - Unreal Engine Forums
(btw is that ‘Blueprint Profiler’ already done?)

even if that’s not totally right, is there some good practices to be used when you are developing for VR using blueprints in order to avoid bad performance?

could a 80% c++ project be ruined in performance for the 20% blueprint part of it?


Build your actor and component classes all in C++; use Blueprints for basic commands, never for long/complex code.

Yes and no. Depends on how experienced the blueprint scripter is. A Blueprint designer will always make better performant Blueprints if he also can program in C++ and understand how both systems work together.
However better documentation is needed to clarify things, if you look around the forums for blueprint code you’ll see most people are writing (and selling) Blueprints that are very bad in performance and doing systems that should’ve been done in C++ classes.
Ticking everywhere when you could simply use events, using “Get All Actors of Class X” all the time, casting types in loops, etc and etc… Such things can destroy a game’s performance, not just on VR; they are the easy route to get stuff done quick, but are not the answer to everything like some think.

Practically, your gameplay code its NEVER going to be the bottleneck. Graphics and animation take a LOT more than gameplay.
If you are bottlenecked by gameplay code, you are doing something really, really, really wrong. Maybe you are doing tens of pathfind requests per tick, or iterating in odd ways.
If you code it properly, there is little practical difference beetween c++ code and blueprints. Just make sure the design its properly done. As little code on Tick as possible, and try to get the stuff going in events, If you need some code to execute a lot of times, think on making it on a timer. You dont need to do AI every Tick, but you could make it twice a second with a timer, decreasing CPU usage massively. Tick should be avoided like the plague, specially in VR, becouse VR needs high framerates, and tick is run once every frame, if do calculations on a timer, then thats not tied to framerate, and will run the same at 120 fps than at 30. Also, remember there is some calculations that dont need to be done in sync, and you could use multithreading, but thats an extra thing. UE4 has fairly poor multithreading for graphics right now, until C++12 and vulkan are done, so in a quad core cpu you have at least 2 cores being idle a lot of the time. If you have really huge calculations to do, you could offload them into other threads, using that performance that wouldnt be used otherwise.
Allways try to be GPU bound, not CPU bound. Take a lot of care with animations, in the game im making, animation takes HALF of the total cpu time, wich is massive(working on optimizing that atm).
In short, dont worry about doing blueprint code, if you get slowed by blueprint execution speed, then you are doing really wrong that will also be slow on C++ ( just less).

thanks for the answers!

It’s not so much about performance, it’s about restrictions (just try to compose blueprints and configure them). Working with binary assets (=Blueprint) which can’t be handled (and merged) by version control systems like Git is a pain … But so is C++ in general. It’s a little bit of Catch-22. :wink:

I find that blueprints have almost no performance impact in VR (unless you want to do a O(N*N) or polynomial time stuff, but that’s bad whether you use blueprints or C++).

What DOES have a huge performance impact though is translucent particles. Press F5 and try to avoid having red in your scenes.
Toggle between lit and unlit modes and watch your framerates very carefully. Also, watch the number of triangles you put into your scene. If you have to, take advantage of level streaming and levels of detail to reduce poly counts.