I gone through alot of codes from react, node, laravel, etc… but this one makes me feel dummy I feel I can not get Unreal C++
C++ is a difficult language. It’s considered fairly low-level compared to the others you mentioned.
However, because of the fact that it is low-level is what makes it so powerful compared to things like Java, node (JavaScript) which are at the other end of the scale and are high level languages.
If there are concepts you are struggling with, share in the community or in discord. There are always people who are willing to help.
I feel struggle with all. I used Delphi and C# also they are not that difficult. Wish if Unreal chose another language.
Yes, Delphi and C# are considered high-level languages. I use C# and C++ daily and have used Delphi in the past and given the choice, I prefer C++ for most things where possible and C# for quick and dirty projects or applications that require cross-platform support (.net core) or web development/apps.
Aside from the need to use pointers however, C# and C++ are similar enough. Unreal does then layer on extra stuff on top but that’s less C++ and more libraries that C++ uses.
C++, C#, and C:
If I remember correctly, is not the base of C# and C++ simply C? Correct me if I am wrong.
The afore mentioned are the library “addons” so to speak, which give us the differences, but since it is at heart the same code, that is why there are similarities.
Then you have this Unreal code. It is C++ Library modified with an Unreal library: C + Addon + Addon. In my mind you get a sort of U++ code. It is C and C++, but there are a fair bit of differences because of the library, and it is built for a specific purpose, mainly that of using UE. Like in the above paragraph, if you learn U++, you will learn C++, and C base, but the differences will be there among all three.
Advice:
Time, experience and exposure will slowly bring the disparaging pieces together. Don’t limit yourself by setting a time frame for yourself- take the time you need, and after awhile things will begin to come together. One good motivator is to go back to a previous lesson and see how well you understand it. You may find that you know more now than you did then.
Your first course is always groundbreaking, so the most difficult. There are a lot of strange concepts and ways of thinking involved in most cases. Once you proceed to the next course you will find that it is now not so much as learning something new, but rather understanding how to utilize those tools you learned. As you become confident with your tools, you will be “copying” less and creating more. Any art starts with mimicry, even the art of language (look at children).
Hang in there
The core language is the same and even shares common syntax with javascript or Java but C++ is not the same as C and C# is miles away from them too. One big difference is C is a functional language vs C++ which is an object-oriented language. C++ classes are part of the language specification and newer features like auto and nullptr are as well. C never had nulls, only a (void*)0 usually or like earlier versions of C++ #define NULL 0
Some of the libraries exist in C for C++, but that’s about it. Pointers, looping, functions and types are basically similar.
Where any language comes into their own is the libraries, like the STL in C++, which has file handling, strings and so on. C had these things but they were sometimes tightly coupled to OS calls - there were common libraries suitable for unix, PC or other platforms as well.
I learned C on an Atari under the GEM operating system and then learned more on unix before moving to smalltalk then to C++.
The TripleX part of the course is designed to get you to learn the basics of the language - it pretty much teaches you everything aside from pointers and classes that you need for unreal development.
The libraries for UE are vast and that’s usually the stumbling block
As Zangk says, stick with it. watch videos a few times, ask questions and take it slow. I’ve been coding with C++ for over 20 years and still find I get stuck with Unreal so don’t worry if you do…
I love Delphi so much but no jobs for it now. I though to learn Unreal C++ and since I love both coding and gaming maybe I will find a job in the future.
Thanks guys for encourage
That is very informative, Thanks.
My father liked Delphi and I believe he worked with C, C++ (which he likes), and java/ java script as well. And talked a little of the A and B coding systems and the old punch card coding. He considered himself part of the “old Pioneering” coders- you learned things on your own and created whole systems from scratch for companies, no one to hold your hand. I believe he was a database programmer.
He also talked of a time when the “Destruction Key” was the most amazing thing: press a button called “delete” and the words on the screen would delete without having to code in your delete. He also mentioned a time when you could see the refresh rate… for Net-Hack.
When I was a kid in elementary school he threw down infront of me a C programming book and told me to learn. It never happened, which is why I am now trying to muddle over coding now .
Those days when a programmer read the manuals and help files. I started with DOS and GW-Basic. Someone want to bother me so he deleted some lines of my code and told me I ruined your code now it is not saved. I replied you are stupid it is still in memory and I hit the list command all code returned
finding a computer book in Egypt at this time like finding a gem
That’s really interesting that you have a family background in computers. I’m the only person in my family who’s involved in IT so no learning from anyone. I got my first computer when I was about 12 and before that I hadn’t ever seen one before or knew they were actually real. I spent all my time coding after that. And by 18 I had graduated from college with a computing higher diploma and went on to university after that. Scottish education was different as you could leave qualified for university at 16 which is what I did.
Anyway, keep at it as it is worth it. These course teach you enough to get started if you can keep at it.
I suppose it is. While I never learned about coding, I learned about some of its logic and hierarchy by his explanations. It was really useful in University courses, including note taking.
Out of his computer habits, the only thing that really passed down was choice of games. Older RPG(Fallout 1), strategy (X-Com Original), or puzzle games (Myst Original).
My dad has quiet a few still kicking about that he does not know what to do with: Historically significant, to be sure, but to who at this time?
Computer Book:
I heard, if you can get one, that Bjarne Stroustrup’s The C++ Programming Language is a decent book. It is also built to be a reference book. Something like that might aid your C++ transition? You might be able to order one.
There’s also a few good books you can get digital versions of which may be easier.
Professional C++ published by Wrox, now Wiley ( [Professional C++, 4th Edition | Wiley]
(Professional C++, 4th Edition | Wiley)) and is $40 USD to buy the PDF version. I have third edition somewhere and it’s a decent book.
Books by Ivor Horton - C++ 20 is the latest standard and can be found here: Beginning C++20 - From Novice to Professional | Ivor Horton | Apress
Note these are not free and am not promoting these books. You might not find them useful, only I know I’ve used Professional C++ in the past more as a reference to standards changes in C++
Also there’s great resources out there online for C++ and this is one of my go-to sites for information: cplusplus.com - The C++ Resources Network
This is free and they offer a tutorial.
Hope this helps
I think the way it is organized in the example is a little confusing.
I put FCollisionObjectQueryParams and FCollisionQueryParams both directly in the arguments (rather than one defined in the arguments and one defined prior to the function) and I thought this made it make more sense to me.
FHitResult Hit;
GetWorld()->LineTraceSingleByObjectType(
OUT Hit,
PlayerViewPointLocation,
LineTraceEnd,
FCollisionObjectQueryParams(ECC_PhysicsBody),
FCollisionQueryParams(FName(TEXT("")), false, GetOwner())
);
AActor* ActorHit = Hit.GetActor();
if (ActorHit)
UE_LOG(LogTemp, Warning, TEXT("Hit %s"), *ActorHit->GetName());
Alternatively you could define both prior to the function
FHitResult Hit;
FCollisionObjectQueryParams ObjectParams(ECC_PhysicsBody);
FCollisionQueryParams TraceParams(FName(TEXT("")), false,GetOwner());
GetWorld()->LineTraceSingleByObjectType(
OUT Hit,
PlayerViewPointLocation,
LineTraceEnd,
ObjectParams,
TraceParams
);
AActor* ActorHit = Hit.GetActor();
if (ActorHit)
UE_LOG(LogTemp, Warning, TEXT("Hit %s"), *ActorHit->GetName());
Yep, It’s not an easy language.
That’s what makes it fun
Thank you for the helpful links I will definitely use them.