Am I an idiot?|When to use C++?

So i’ve come this far into this course, i know this is archived and no longer updated, but i was so far into this course it really didn’t make sense to start the new course.

Anyways, because of the immense length of this course i’ve had to really be doing this course on and off the past couple years, and only now have I been able to find some time to really dedicate some time into this course. But with this Battle Tank sections i found it extremely difficult to do any of the suggested challenges (actually i don’t think i have been able to do 95% of them) because i would be so lost as to what is being asked by Ben to do or what he’s talking about with the Mathematics/Physics part.

And from what I’ve been seeing I would assume that everything we have been doing so far can actually be done purely in the Blueprint editor with basically 0 coding needed. And what I am guessing is because i still dont really have a great grasp of how Unreal works as a whole and its relationships between classes/component types. When i SEE it being done I some what understand, but I personally felt like there weren’t enough repetition of creating/dealing with these issues for me to actually remember any of these things. Honestly i’ve merely been typing in exactly what Ben has been typing, and there were a few times where I identified a problem before he called it within a Lecture video, but really thats the extent of my abilities so far.

So my two main questions are:

  1. When do you actually use C++ classes and things you can do entirely within Blueprint Editor?
  2. Has anyone else felt this way? Or am I alone on this?

Up until the Building Escape game I felt like i had a grasp of everything. Now it just feels like information overload. Before I am understanding whats happening on the C++ end I’m more just confused at what is happening on the Unreal side. Maybe I am just lacking further practice or something like developing more into the game (although it’s not like i have any new ideas in particular with this tank game).

Just like to get some input and if i will be okay going forward into finishing this Battle Tank section and later the First Person Shooter section…

1 Like

No you are not an idiot. I find Coding especially difficult. Just keep at :wink:

Hi,
I don’t know if my answer helps you but I’ll give it a shot :slight_smile:

Q1. “Am I an idiot?”
A1. You are not an idiot. Coding is hard. If someone tells you otherwise, they are wrong. I feel that if you don’t have some theory background it’s harder to understand everything. I don’t say it’s impossible to understand, it’s just harder.

Q2. “When do you actually use C++ classes and things you can do entirely within Blueprint Editor?”
A2. In my limited experience in game dev in Unreal Engine, I learned that it actually comes to the developer and the efficiency of the implementation. Like, I it’s better to create and declare C++ classes for, let’s say, Character class, Enemy class, Item class where you construct everything in C++.

Let’s take for instance a Character Class in C++:

  • you construct the Character in C++, in the Constructor (SpringArm, Camera, Meshes whatever)
  • you give it basic movement and bind the key inputs
  • your character is done in C++.
  • now you create a Blueprint out of it and work from there.
    I finished 2 Unreal courses on GameDev and now I am half way through the 3’r one, after that I’ll hot to the multiplayer courses.
    Everywhere, it’s basically the same, construct in C++ and derive to BP. If something is easier for you to implement in BP, do it. Declare it in C++ and construct it in BP. It’s up to you, as long as the end result is what you expect.

Q3. “Has anyone else felt this way? Or am I alone on this?”
A3. You are not alone in this. It’s hard for me to believe that everybody here understood everything and now all are “guru’s” in game development. Especially if you do not have a programming background it’s even harder.

This courses from GameDev are excellent point of let’s say “entrance” in the game development world. They offer you the basics, the fundamentals of understanding how game development works. From here on, it’s up to you how you expend your knowledge.

First of all, if you want to be the next “Wonder developer” you need to know C/C++ like the back of your palm. You need to understand the theory behind all, what pointer are, address, how OOP works in C++, Operator Overloading, Inheritance, Polymorphism and most importantly, how to search for answers by asking the right questions. Every game developer needs to research for solutions, examples, why not, tutorials. There is to much information to learn for one person.

But, to understand all of this, you should go to the roots, like “GetRootComponent()” and understand Algorithms.
Algorithms are the fundamentals of any programming language in the world. They are syntax independent from any programing language. It’s just plain pen and paper algorithm graphs and pseudo code.

PS: I have no idea how Battle Thanks are, but Toon Tanks in the remastered course almost made me give up on the course :slight_smile:

Keep coding and stay healthy.

1 Like

If you are an idiot, then so am I. I watch, rewatch and rewatch to try to understand how the code works. And I don’t know if I will understand blueprints, I am just beginning to see them in the course. But, like Unity before, I know that if I try and try again, someday it will all pop up in their place, and I will be able to make a game on my own. So, no, you are not an idiot and you are not alone in this.

1 Like

Thank you guys for the responses so far, it is relieving to see i am not the only one finding difficulties understanding this as a whole. Again, of course the C++ elements can be hard to grasp, but for me it is mainly the Unreal side that I am having troubles understanding.

Now with your comment, something I still don’t understand is it still is technically possible to create custom Blueprint classes right inside of Unreal (as also seen in a later lecture of the Archived course: 216 Creating Physics Constraints). And i am not certain, I am sure you are able to add custom properties/attributes in these custom Blueprint classes as well. So it still does raise the question of when is it appropriate to be utilizing C++ classes…?

Hi there.
It’s up to the programmer if he wants to use a C++ Class or a BP to construct something.

I don’t think there is a standard “regulation” or a convention if you want which says that one thing should be constructed in C++ and the other in BP.
I feel the in this Video it was easier to explain what Physics Constraints is with quick and simple BP for “prototyping”.

Of course, C++ opens and gives access to the Core of UE4 unlike BP.

I just watched the Video you are mentioning, the Creating Physics Constraints video in the Archived course and replicated the exact same construction in C++. The result is just the same.

I quickly constructed the same simple Physics Constraint in C++ and the C++ looks like this: (it’s unpolished but it’s ok for a quick demonstration)

  1. ConstraintTest.h:
UCLASS()
class SANDBOXP1_API AConstraintsTest : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AConstraintsTest();

	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Physics Test | Physics Constraint")
	class UPhysicsConstraintComponent* PhysicsConstraint;

	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Physics Test | Mesh")
	class UStaticMeshComponent* StaticMeshA;

	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Physics Test | Mesh")
	class UStaticMeshComponent* StaticMeshB;
  1. ConstraintTest.cpp
#include "ConstraintsTest.h"
#include "Components/StaticMeshComponent.h"
#include "PhysicsEngine/PhysicsConstraintComponent.h"

// Sets default values
AConstraintsTest::AConstraintsTest()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	PhysicsConstraint = CreateDefaultSubobject<UPhysicsConstraintComponent>(TEXT("PhysicsConstraint"));
	RootComponent = PhysicsConstraint;

	StaticMeshA = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshA"));
	StaticMeshA->SetupAttachment(GetRootComponent());

	StaticMeshB = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshB"));
	StaticMeshB->SetupAttachment(GetRootComponent());
	
}

The end result is the same:

So basically, it’s up to you how you want to construct, C++ or BP. The end result is the same. :slight_smile:

Keep safe and stay healthy :wink:

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms