Download

I 'know' C++, but have never worked within an engine. Where do I start?

Hey guys,

So I’ve mostly been using my own kind of ‘engine’, which was just some shaders I wrote, openGL render stuff, using an FBXLoader SDK implementation, and writing out AI stuff by hand (own behaviour tree, steering behaviours, etc), and I feel like I’m not bad with C++, although of course I have a lot to learn (don’t we all!). I have also used Unity, and of course its approach isn’t intimidating at all (however I did have trouble adapting to not having my onCreate functions for my main application, my own custom loading code, etc, as well as C++, although that’s definitely more my own problem).

However, when I try to start out learning this beast of an engine, I get swamped. There’s not many tutorials that actually explain how we start from an empty project and hook everything up, with explanations of what everything does. I keep opening up the editor, and VS2013, and just staring at it, occasionally flicking through and being horribly intimidated.

Where can I actually start? What does the basic UE4-specific stuff do when we make classes, Actors, etc, and why? I’m reading through the UE4 docs but I feel like my demographic isn’t really covered - I don’t need to be taught what C++ is, nor do I instantly get how to ‘properly’ work in an engine of this size.

Any help would be greatly appreciated.

Hi. Start with this Tutorial. It will give you the basics of engine entry point, creating objects, user control.

If you already ‘know’ C++, then a good way to get started might be to just read the code of some of the available projects. Create a new project from the C++ FPS template for instance and read the implementation of the character, game and projectile classes. This is what I did and it really helped getting started.

You can read the engine source or documentation all you want, but if you don’t know what you’re looking for you’ll be sitting there for a long time. But once you get a feeling for the architecture, how UObject, UWorld, UActorComponent, USceneComponenet or AActor relate to one another, it will become easier to find the relevant part of the engine source or documentation that you’re looking for.

I would say first play with blueprints, learning from bps is faster, there is no wait for compile etc.
You have instant feedback from editor about what you can connect where.

When you get idea how this whole engine works you can start C++. You maybe “waste” 2 weeks on blueprints, but you save it up when you know what C++ code does and how by watching at familiar (from blueprints) api names.

Also new idea for programming “pipeline” here is to make tiny tasks in blueprints, and anything that in more complicated than single loop or 1d array in C++.
So you wire simple tasks in bp then make game logic in C++. And learning BPs is not wasted time you need to use them anyway, unless your project does not involve artists, and you code everything in C++ by yourself.

This is also a good idea. Then you can create the same template in both version (C++ and BP) and try to understand how BP translates to C++. You can also just search or read through the BP node library on the right, to get an idea of the basic possibilities.

In some cases there is no direct translation from BP nodes to C++ methods. A lot of the BP nodes are defined in the kismet library classes and it helps a lot to read the implementation of some of these, more complex nodes.

Currently I’m not aware of a simple way to display the C++ implementation of a built-in BP node, which is unfortunate. What I usually do is to hover over a node, and search the engine source for the tooltip comment that shows up. This usually is the comment right above the C++ implementation of that node. I asked during the previous “Tools” stream, if they could add a “Go to implementation” option to the BP graph editor, but I think they misunderstood it as “go to implementation of collapsed BP graph / BP function”. Maybe I’ll ask in tomorrow’s “Blueprints” stream again.

Dam and i hoped that i can just jump into C++ soon.

Btw. Whole thing (unreal + editor) compiles for around 1 hour on my PC. Will my project have same **** long time to compile?
Is there a way to compile just plugin? For now all i need are blueprint nodes with some bits of custom C++ inside.

Anyway blueprints help a lot with understanding how things work.

There is nothing stopping you from that. If you’re familiar with C++, go ahead. If you’ve worked on larger projects before, it should be a big problem. Just start reading the codes of the templates or any of the C++ projects from the Marketplace. I think the Shooter Game is C++.

But Blueprints are really not hard to learn either. Watch the BP tutorial series on Epic’s youtube channel, if you didn’t already.

You don’t need to compile the engine source, if you don’t intend to change it. You can just download the editor binary, and get started with coding your game in either BP or C++. Compiling a simple game shouldn’t take longer than a few minutes. Then, when you recompile after some simple changes or tweaks it’s really just a few seconds (~8 seconds for me currently).

About the “Go to implementation” option I mentioned earlier, it looks like this will actually already be part of the next release:

Cool, that goto will make everything simple. I know C++ but I rather learn blueprints first.
This way i know limits of BP system and have idea how to work with unreal when i get to C++.
Good to hear it does not require recompiling whole thing. I just have few things left to sort out in BPs.