Training Livestream - Getting Started with C++ in UE4 - April 18 - Live at Epic HQ

This would be nice but who in the world is available at 2pm on a Tuesday? :confused:

There’s a Udemy course that covers C++ in Unreal and it goes through not one, but multiple c++ projects.

But they use blueprints too, of course, because any good project will. Blueprints are not some weak point that you should try to avoid. They are an integral part of the engine and if you don’t like them, I would advise using another engine.

I think you totally forgot to give an argument why Blueprints are good for ANY good project. I’m not trying to avoid them, I just don’t see why they make a tutorial about this well documented stuff instead of basic stuff that is long overdue. I’m reading Programming on Discord and I’m fascinated that even the pros I look up to suddenly get confused with basic stuff and argue about code they are writing everyday.
I know the ups of Blueprints, but if you are working alone on a mobile title, you can ignore all of them and write your whole game in C++ (yes, such people are the minority, I know, but you could technically add every other guy who works alone to this). Hard references are negligible if you read 's Style Guide, follow it and make full use of it. To be fair, I prototype a lot in Blueprints, they got their place but in the end I convert everything into C++. I don’t need any nativize Blueprints to see how my game actually performs and my executable stays as small as possible.
Thanks for not thinking ahead and already giving me the advise to use another engine instead of arguing first, but I will stay with Unreal even though I don’t like the decisions they make, I can fully understand why they are doing them.

Something that I would like to see more documentation of is some of the fundamentals of the gameplay framework. Most tutorials give the same old camera logic, movement code, etc… Whereas some games require more logic for those areas. The problem is: pretty much everything can be done so many different ways that it’s overwhelming.

Some examples of things I’ve had trouble understanding:

  • Camera actors/components vs CalcCamera, how to do more flexible camera systems for sidescrollers (e.g.: forward focus, fixing axes, zooming in or out based on what part of the level you are, etc)
  • Switching between cameras
  • Custom movement logic that’s not physics based and doesn’t derive from Character. Such as grid based movement or custom retro-platformer type of jumping physics, etc
  • Input logic, handling in the controller vs the pawn, (for example, for awhile I was confused why a pawn would handle input when pawns can be possessed by AI and AI doesn’t have input)
  • More specifically for C++, I’d like to see some best practices for organization and setting up components.

These are all things I pretty much understand now but they really slowed down my learning process because I feel like the documentation on them is not super clear. It tells you you CAN do things in all these flexible ways, but not why you would choose one or another or how you would actually do it.

Really looking forward to this stream! I hope more advanced lessons will be planned, too.

Could you share any tips on debugging code with Visual Studio? Is there a way to make changes to code in VS as it’s running (“Edit and Continue”)? I could also use some pointers on debugging multiplayer games, beyond relying only on the output log.

I’m also curious how Epic decides where to draw the line between C++ and Blueprints. I understand that each has its place, but based on other streams and some of the discussions here it sounds like code is ultimately preferred. I’ve been sticking almost entirely to code, but started blending in some Blueprint for HUD and animation work.

Hello,
I have question about today’s popular topic
This is deep learning and machine learning algorithms.
There is some plan in this field in UE4?
Thank you for answerer.

I think you totally forgot to give an argument why Blueprints are good for ANY good project. I’m not trying to avoid them, I just don’t see why they make a tutorial about this well documented stuff instead of basic stuff that is long overdue. I’m reading #programming on Discord and I’m fascinated that even the pros I look up to suddenly get confused with basic stuff and argue about code they are writing everyday.
I know the ups of Blueprints, but if you are working alone on a mobile title, you can ignore all of them and write your whole game in C++ (yes, such people are the minority, I know, but you could technically add every other guy who works alone to this). Hard references are negligible if you read 's Style Guide, follow it and make full use of it. To be fair, I prototype a lot in Blueprints, they got their place but in the end I convert everything into C++. I don’t need any nativize Blueprints to see how my game actually performs and my executable stays as small as possible.
Thanks for not thinking ahead and already giving me the advise to use another engine instead of arguing first, but I will stay with Unreal even though I don’t like the decisions they make, I can fully understand why they are doing them.
[/QUOTE]

This, what has said.
I do the same convert everything to C++, no nativized Blueprints. I could careless for Blueprints. The reason I chose Unreal Engine 4 is because of C++ and not Blueprints. They are nice to handle the GUI framework for C++, but I could do without them.

really hoping for YouTube as well

Just checked the time this is on and I’ll be at work. Is this gonna be tube’d, vimeo’d or whatever as well?

-Sy

I am ashamed to say this because I am not really good at coding, so here is a list:
-I would really like to see examples that will help me understand Pointers and references in Unreal Engine. (Basic stuff)
-I also would like to be able to create a struct that is usable across the headers and functions, with proper methods of handling comparisons of structs (Overloading binary operation). (Had some issues with this)
-How would I be bale to connect unreal engine to a live database. (Raising the bar a bit)
-If someone wanted to implement an Augmented realty library, how would one approach it. (I am in the deep end here)

Woohoo,

A day without C++, is like a day without sunshine :stuck_out_tongue:

I would like to know more about making data visible in the editor:

Arrays of uobjects/aactors, how to decide if they should show up as pointers/references to other objects and how to get the uobjects parameters visible so you can change them

Why do you have to have a separate pointer to components if you want to edit them in editor? If they are spawned and then put into an array, it won’t work? Same goes for root component, it needs to be assigned to both a variable in the class and to the rootcomponent in the base?

It would also be nice to know how to make your classes work properly with the undo/redo system.

Please add some examples with:

  1. using UObject
  2. using a Base Class and replicate it
  3. how does abstract class works in C++? can you provide an example?
  4. Move Configuration data from the Editor to C++ (I have a DataTable that contains how much damage each spell should do, I pass that DataTable to a C++ Init method, how to properly implement it and what if I want only the server to be able to do that).
  5. Example of common array usage: search for an item, order by, filter by, make a subarray based on a filter, etc…
  6. How to make static utils
  7. How to load some settings and save it for later usage (load a txt file with some settings once, and then use the settings later in the game)

Would like to see example of a code plugin. If I write a function outside of the engine in c++ how do I create a plugin such that I can create blueprint nodes and then send and receive data from the engine to/from the plugin. I would like this so I can extend the functionality of the game environment by communicating with outside programs/devices.

That would be really nice.

Thanks for your time.

wow! again epic has came up with something great and interesting, thanks epic

@UE4 employees: Would it be possible for these announcement pages to be emailed to people. I always receive a link to the streaming video but it is usually over by the time I check my email. Advanced notice would help with that. :slight_smile:

Can I see the replay of the video on youtube?

Anyone looking for the recorded stream can catch it on Twitch: Twitch

This was very helpful, thank you! It’s great to get a clearer understanding behind how the engine handles code, versus “well this compiled soooo… 'kay”.

I hope to see a whole series of C++ sessions. The more analogies the better, to help beginners hold something concrete in their mind until the concept really clicks. Before, I had a basic understanding of how garbage collection and memory management worked, but now I will forever picture it as a poor stressed out parent following a ruthless paper-shredding toddler. :slight_smile:

Thanks for watching, everyone! Just a quick post about the physics formula we discussed for calculating initial jump velocity based on desired height:



float InitialVelocity = FMath::Sqrt(2.0f * -World->GetDefaultGravityZ() * FMath::Abs(Height));


That’s it. It’s the inverse of the usual formula you see in physics. I’ll read through the thread tomorrow, I just wanted to get that formula posted tonight.

I think you totally forgot to give an argument why Blueprints are good for ANY good project. I’m not trying to avoid them, I just don’t see why they make a tutorial about this well documented stuff instead of basic stuff that is long overdue. I’m reading Programming on Discord and I’m fascinated that even the pros I look up to suddenly get confused with basic stuff and argue about code they are writing everyday.
[/quote]

I’ll get to “why are BPs good for any project” at the bottom of this post, but yes, that’s how it often is. There are a lot of different ways to solve the same problem in C++ (or other languages). Sometimes you’ll find a better/worse difference. Sometimes it just depends on your personality, or the way your teammates think, or the particular restrictions of your game.

I know the ups of Blueprints, but if you are working alone on a mobile title, you can ignore all of them and write your whole game in C++ (yes, such people are the minority, I know, but you could technically add every other guy who works alone to this). … To be fair, I prototype a lot in Blueprints, they got their place but in the end I convert everything into C++. I don’t need any nativize Blueprints to see how my game actually performs and my executable stays as small as possible.
[/quote]

I personally do use some BPs, with nativize, when working on my own. But if I have so much as one designer or artist, I use more BPs. In any case, if a tool is useful to you at some times but not others, then definitely use it only where it helps.

Hand-converting BPs to C++ may result in slightly faster/smaller code than nativizing BPs, but the nativization process as it stands gets most of the performance back, and I’m talking “good enough for high-performance AAA games” here. For example, Paragon uses nativized BPs, and running a game like that - highly complex visuals, ten players, hundreds of AIs - at the framerates it hits leaves little room for slack. However, if you really prefer C++ exclusively, it’s fine to use it. For a long time, that was my personal preference, and I learned to expose things to data-driven, editor-based sources only because I had non-programming team members. In other words, it was something I did for others, not for myself. I’ve noticed that my output in small, personal projects looks better if I use BPs for some things. Usually it’s just minor stuff like custom things I want to put in only one or two places in my game, or special events that happen in just one level, but overall, I find that the freedom to hook up “art” type stuff just somehow comes out better when BPs are used. But overall, “not on the team is a C++ programmer of the caliber we want writing code in our game” is a great reason, and you should use the tool that works best for your situation on a case-by-case basis.