Cant understand Unreal Engine 4 Programming.

Hi,

i am watching tutorials for a couple of days now, but i can not understand how the programming with c++ in Unreal really works ^^ (Very confusing with header and source file and the whole Ustuff in there).

I have previously used the Unity engine where it is very simple :slight_smile: (i am able to develop a complete game) but unreal engine is so much different.
If i search for some sampels i only found someone who is modify some existing content, but i want to learn it from scratch to understand it better how it works.

Can someone give me a sample for spawning a Gameobject like a cube and control the cube with the WSAD keys in c++ ?
I didnt found anything like this.

In Unity this is very simple i only need to define a Transform using a command ā€œinstantiateā€ and then use if sentence for keyinput,
if one sentence gets true i can use thespawnedobject.translate(vector3) in this if-sentence.

Thank you very much for your help :slight_smile: .

You should check out the new c++ tutorials on that Epic put up on youtube.
https://www.unrealengine.com/blog/new-videos-for-learning-unreal-c

That said depending on how quickly you learn it can take anywhere from a couple weeks to a couple months to be up to speed. Stick with it though, its totally worth it ! :smiley:

Hi and welcome!

First of all, if you come from Unity, welcome to real world.

Before starting you should read the documentation and watch some videos from Unreal Youtube channel to make an idea. Also get familiar with Blueprints, you can do everything with them with out touching a C++ line.

Unity gives you some false ideas about game development and development in general, thatā€™s why you have trouble now to understand Unreal. You just need to familiarize a bit with Unreal.

A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums Check out this guide if you are familiar with Unity
Programming with C++ | Unreal Engine Documentation Explore and have fun :stuck_out_tongue:
A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums Specifically C++ tutorials
My advice - donā€™t ignore blueprints. They are powerful tool and works very well alone and with c++

Thank all very much for the nice help, i will check out the links :wink:

Edit: That is exactly what i need, thank you ^^ Very helpfull. Thank you again. :slight_smile: :slight_smile:

Emā€¦I think pretty much everyone forgot to say that Unreal uses C++ while Unity uses C#ā€¦how do you expect to code for Unreal when you donā€™t know C++? Also, if you have no idea why we have headers and stuff like thatā€¦you should either just use blueprints, or buy a c++ book.

@noatom: Thank you for you comment, i know that unity is using C#, but that should be no problem. I learn programming language by doing some stuff, and look at some examples, that is the reason why i like samples and tutorials. :D.
Yesterday i have learned what headers are, and i was able to test some stuff.

But now i am confronted with another problem. I am using Visual Studio and the intellisense is very very slow :frowning: and sometimes it didnt work, what can i do to fix that?
The Monodevelop(Programming Editor) from unity when using monobehaviour is very fast i only need to press the first letters of the command and press return and get the complete command, does this works with C++ Unreal Engine ? :confused:

Thank you all again. :slight_smile:

Intellisense doesnā€™t work very well with large C++ Code-Bases, which UE4 definitely is.

There are some plug-ins that exists if you have VSPro though, though their name escapes me right now. If anybody does have ay methods for radically speeding up the Intellisense, Iā€™m eager to here it as well.

Try Visual Assist X (also known as VAX by in the Unreal Engine 4 documentation) for better intellisense in C++. Itā€™s not free, but I feel itā€™s a must-have if youā€™re serious about exploring a large codebase. It has better auto-complete, better syntax highlighting, the ability to switch between a .cpp and a .h for a class with a keypress (you have to setup shortcuts yourself in Visual Studio), and if you press ā€˜.ā€™ at the end of a pointer, itā€™ll automatically turn it into a ā€˜->ā€™. There are a lot of other features, but those are just a few off the top of my head. I suggest you try the trial and see how it works out for you.

You want VisualAssist by Whole Tomato.

Edit: Somehow didnā€™t see the above post!

I didnā€™t try myself, but it seems that using QTCreator is a viable and free alternative : Guide to use QtCreator for Unreal Engine 4! - C++ - Epic Developer Community Forums!

I you are coming fromUnity (as I am) check this out.

http://staraban.com/en/unreal-engine-4-key-consepts-of-cpp-programming-and-comp-with-uniy/

Also my suggestion is donā€™t get scared by C++, as UE4 C++ is a simplified form of C++, just try to modify the examples to create your own actors, do the rest in blueprints.

Remember also Unity looked complex with the Transform/component architecture, vs Inheritanceā€¦

What helped me is realizing that coding everything isnā€™t the way to go. Almost every C++ tutorial ends up turning the values into Blueprint Ready nodes (UPROPERTY, UFUNCTION) anyway. Familiarize yourself with Blueprints, then when you need additional functionality, try your hand at the C++.

Emmm itā€™s normal C++ compiled by normal C++ compiler, you can do everything that C++ can, UE4 APIs and UHT simply makes things easier :stuck_out_tongue:

Exactly. When I started using the unreal engine, I said : ā€œI want to do only the coding, I donā€™t want to touch to blueprint, this is for lowly level designerā€ (just kidding, level designer out there :D)

Then I also realized that the blueprint are pretty awesome if correctly used. So donā€™t hesitate to try some blueprint tutorial :smiley:

Agree I was thinking about memory management, string manipulation etcā€¦ imho those are the biggest hurdles for someone coming from C# and Unity