What is the current status of C++ and UE4.7 workflow ?

I’m thinking to move from blueprint to c++.
How long doe’s it takes to compile small changes and how fast is the workflow in general compare to blueprint ?
The only reason i’m using blueprint and not getting into C++ is because of the long compile time in compare to blueprint’s almost instant compile time.
However i really want to start with C++ and i hope the engine has proved a lot since the first version of UE4.

Also, i’m using to unity’s C#. I’m using coroutines, and i didn’t really found the same thing for C++ in UE4, how do you deal with actions that require delays? I really hope you don’t need to use Tick because this will make it a lot more messier.

Compile times on my machince take about 20 seconds, sometimes less. And for Coroutines you use Timers.

Timers is like in UnrealScript and Javascript that has setTimeout(function, delay) right ? this can cause code to look very hard to read, Blueprint has delays, Is there no way to implement them via c++ ? Even javascript has generators that can be used to build a coroutine system starting from a certain version :expressionless:

I am not quite sure what you want. The delay node creates a Timer with a lambda expression.

Yeah but visually you see a nice flow of events.

Examples:

Unity’s Coroutine example:


IEnumerator someAction()
{
   do_something();
  yield return new WaitForSeconds(1);
   do_something_else();
  yield return new WaitForSeconds(1);
  do_something_else2();
}

timer example:


void SomeAction()
{
  do_something();
  setTimeout(do_something_else(),1000)
}
void do_something()
{
...
   setTimeout(do_something_else2(),1000);
}


The coroutine example is a lot more neat.

C++ doesn’t have yield that’s true but I believe (don’t quote me on that though) that you could run your “coroutine” in a separate thread and pause that thread.

I think this is just going to come down to personal preference (I personally think yielding all the time makes it hard to follow program flow), no one language/workflow is going to work for everyone.

Here’s your benefit for moving things to C++:

  • Increased performance.
  • Better debugging (breakpoints, callstacks, memory displays, watch variables)
  • Access to low level functionality that may not be exposed to blueprints.
  • Ability to blow your own foot off when writing even the most rudimentary code. :slight_smile:

I suggest just dipping your toes in and trying to find coding patterns/break up of C++ vs blueprints that work for you personally. If you just can’t stand C++ then you can always work in Blueprints and hope that any performance issues don’t rear their heads (which may or may not happen - I have no idea what threshold you would have to meet for BP overhead to start hurting you badly).

I’m not sure if this is what you’re looking for but UE4 C++ has Timers.

https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Timers/index.html

Ups someone already posted about timers. I should probably read first before I comment, sorry.

I guess i will just have to do it with timers then, thank you all for your help :slight_smile:

Timers are really useful once you get the hang on them. Also means you don’t have to ‘tick’ all you’re actors if you want them to do things based on time, because the WorldTimerManager handles all timers on it’s own.

One of the biggest things I’ve learnt this year is that as a programmer, the most valuable commodity to you is your time. If it takes you less time to implement a feature in Blueprint then do it in Blueprint, it’s more than a good enough tool to be able to do that. Unless you’re just doing it for the learning (which I am), then implement things in whatever the easiest manner is for you. Come back to C++ if you’re doing lots of intensive stuff.

If you just want to learn C++ for the hell of it though, carry on :wink:

Yeah, I remember pretty clear, that someone once said:
Everything is possible, everything is manageable, the only problem is time.

Compile times for my project are at the moment <20 sec for a single .cpp file(with unity build off) and 100+ sec for Character.h.

I would like to have faster compile times but I really do not like visual programming at all. I would much more prefer C# over BP.

There is mono for ue4 but it is dated and buggy.

I am currently testing http://skookumscript.com/ but I haven’t made up my mind about it.

I also think about creating a binding for http://dlang.org/ because D seems to be able to interface with most C++ code. I just have no idea how to start.