Ways to approach a larger project with limited (but existing) knowledge of C++?

Hello guys!

I know it’s a bit of a random question but I’ve been questionning myself about the development of a personal project that I’ve been prototyping quite extensively using Blueprints only for a while now. For now I’m focused on getting the mechanics of my character done. It has ton of movement capabilities (wallruns, ledge grab, wallclimb, rope balancing, dodge roll, sprint, double jump, dashing, you name it…) and my character blueprint is becoming quite large (probably nearing like 1k nodes).

Now I must first say that I’ve some knowledge of C++ but it’s not that great which is a bit of my concern. Years ago I tried to program the A* pathfinding allgorithm with SDL using a pixelated character seen from top that could move around the world. It was buggy as possible but I managed it, sort of. So yeah not great programming skills but I can read C++ and I’m not necessarely scared of getting my hands dirty. I’m just thinking about productivity right now since I’m trying to tackle a kinda big thing totally alone and am an artist first of all.

  1. I know blueprint is ~10times slower than CPP and there’s nativization tool to help but at this point I’m not sure when, if anytime at all, should someone say “okay, at this point this should probably be done in c++”. Is making a medium-sized solo-game purely with Blueprint viable? (because so far I’ve not encountered anything that I couldn’t do with Blueprints, it’s so fricking good) How much should someone worry about the performance of blueprints vs cpp when targetting higher-ends pc?

  2. I bought books on C++ with UE but in each book I sooner or later stumbled upon a piece or several pieces of code that didn’t work because the API has changed since the book was released (which is totally normal at some point) and I found that quite frustrating and counter-productive. I’m better learning everything myself if every ten pages the book is teaching me something that is broken… So then I thought about utilizing the blueprint nativization to learn how’s my blueprint translated into code to learn C++ with UE. I know the code generated is totally not “reader-friendly” (and it surely is not!) so I’m wondering if it’s a viable option to boost the learning of C++ with UE?

Thanks in advance for the help,
Cheers!

I’m not exactly experienced in these things, but thought I would share a couple of thoughts.

I started developing with UE4 properly last October (had flirted with it before, but nothing serious), and had to jump straight in and develop a VR prototype in 6 months. It was always going to be a tight turnaround, and not knowing any C++ meant that I decided off the bat to use Blueprints. As is often remarked about Blueprints, it’s amazing how quick it is to prototype stuff and get things working. Without BP, I never could have done it. However, despite my best efforts at following consistent practices, keeping my BPs clearly laid out, etc. by the end of development, it’s a pretty complicated project to dive back into.

For the project I’m currently working on, I decided to take a step back and learn some C++. I’ve also looked at some of the books available, but didn’t really vibe with any of them and, as you said, they are not always up to date.

I started by reading through the entire LearnCPP website, which I found to be pretty clear and relatively easy to follow. I didn’t worry too much about some of the more complicated concepts making sense immediately, I just wanted to get a good sense of the language.

Then I bought the Udemy Unreal C++ course, and I’m actually still working through it. It’s great. The first module doesn’t even go into Unreal, just gets you up and running with C++ first. I found combining that module with reading the LearnCPP website to be a really great way to get started with understanding C++. And from the second module on, it’s in Unreal. I personally think just following that course isn’t quite enough, which is why I’ve been using other sources. I had to read about pointers and references from about five different locations until I totally got it. Might just be me though :slight_smile:

And even though I’m still learning massively, I’ve started on my next project, making it as C++ as possible. Still doing various things (input, for example) in BP, but everything else in C++.

For me, the main advantages are (1) the speed, and (2) the organisation of the code. The speed is only going to be noticeable with certain kinds of things. I’m running some pretty massive loops on tick in VR (90 fps) so speed is essential. It blows my mind how fast C++ is. And although I love the visual layout of Blueprint, I find code in many ways easier to navigate. Both inside a single code file and across the whole codebase. Your question about making a medium-sized game being viable in BP alone is probably more a matter of preference than anything else, especially if you’re a solo developer. If you can keep it all well-organised, and you’re not trying to do anything crazy on tick (which might benefit from C++), then why not? I’m sure there are quite a few medium-sized games that have done exactly that.

The other issue is that you may eventually hit something that you can’t do in BP. I’ve got quite a few things in my current project that are impossible in BP (for example, I want players to be able to import FBX files of their own at runtime, so I had to build that from scratch myself). But BP does a hell of a lot, and Rama’s Victory plugin gives you a lot more functionality. Even if you make your project almost entirely BP though, you might want to at least be aware of how to create a Blueprint Function Library. It’s pretty awesome to be able to write a complicated C++ function and have it accessible as a node in Blueprints. Best of both worlds.

I’ve not tried using the BP nativization to be honest, but I’ve heard that the output is pretty incomprehensible. From what I’ve heard, it’s probably not the best way to learn C++ in UE4. I would recommend get comfortable with C++ as a language first, then understanding UE4’s C++ usage and quirks.

The main thing I recommend, from personal experience, is actually having something to create (nothing too complicated), and be constantly trying to figure it out as you’re learning. I’ve read a few comments from people about the Udemy C++ course where they said they did the course, followed along exactly, and came out the other end having no idea what to do next. If you’re trying to create something on your own, you’re constantly coming up with your own set of questions (how do I actually spawn something? how do I do a line trace? how do timelines work in C++?) for things which you may already know how to do in Blueprints. I find this an important part of the process of learning. Years ago, I decided I wanted to develop iOS apps. I had an 18-hour bus journey lined up, so I bought a book on iOS development with Obj-C and read the entire thing on that bus journey. I understood it all as I read it. The next week, I sat down to start making something and, of course, had no idea what the hell I was doing. I hadn’t really learned anything. It sounds like you’re very experienced in Blueprints, so you’re not starting from scratch, you just need to relearn the C++ way of doing things.

Not sure if any of that helps, but good luck!

That’s great to know localstarlight, thanks for taking the time to write such an thorough answer!

I definitely agree with you on all points and you’re right, I’m feeling quite confident with blueprints but they indeed start to become quite hard to manage once they grow quite large. I already know most of the basics of C++ so as you said, at this point it’s mostly about learning the C++ way of doing what I’ve been doing with blueprints which probably will not be that hard but quite long. I really hoped I could make something out of the natavization tool to speed up the process but it appears not haha.

Anyway that Udemy course looks really interesting, thanks for pointing that out. I’ll definitely check it out. Thanks.