Jump to content
  • Advertisement
SillyCow

Unreal Learning Unreal C++ development

Recommended Posts

Hi,

I am trying to build a small POC in Unreal. I consider myself a pretty good C++ dev.

I have a pretty good knowledge of Directx/Opengl, and have programmed my own game engines before.

I have also developed projects of various sizes using Unity. I would gladly keep using Unity, but cannot due to licensing issues.

So I am trying to learn Unreal to overcome the licensing issue.

However, I cannot find decent docs and tutorials for programmers.

Most tutorials use Blueprints, which as a "coder" I find very hard to read (not to mention no copy+paste).

Also the editor UI evolves rather rapidly, thus making alot of tutorials outdated. ( I often find myself searching for submenus that no longer exist )

While my project is very small, I am trying to do something which is at an intermediate level:

I want to download images from the internet and dynamically load them onto 3d meshes.

I have only found some partial solutions on Unreal forums. And have only found 2 very basic C++ tutorials on the official unreal site.

I guess what I am asking is:

Regardless of my specific project, can you recommend a comprehensive "coder" oriented tutorial or book ?

I am not looking to create complicated scenes or effects. I just want to instantiate a mesh, and play around with it's attributes at runtime.

 

Share this post


Link to post
Share on other sites
Advertisement

I'm a long-time developer, and I've written a fair bit of code, including C++.  Blueprint isn't terribly harder to read than anything, once you're used to it.  If your BP is hard to read, you're doing it wrong ... though unfortunately BP makes maintaining terrible code rather easy.

However, what made me comment here is "no copy and paste".  Not only is this wrong (you can easily copy and paste BP), if you're copying and pasting, you're probably doing it wrong.  You should be following conventional coding norms of modularity when writing BP; you can actually get some very nice results if you're strict and self-disciplined.  Of course as noted, BP makes it easy to not do this, which is a bit unfortunate.

That said if you are reasonably experienced with C++, you should have no trouble jumping into the official docs ... create a C++ project, read the code to see how it does stuff, use it as a jumping-off point into the API reference, and search the web a lot, just like everything else.  It also doesn't hurt to start with BP and get familiar with the engine, before seeing how that all translates into C++.

As to out-of-date tutorials, it's an unfortunate byproduct of the breakneck pace of UE4 development.  On the other hand, if you read and understand their basic approach, it's rarely difficult to find updated functionality to cover your needs.

Share this post


Link to post
Share on other sites
Posted (edited)

I'm not clear about how to copy paste blueprints from online tutorials. From what I see they are just JPEGs of blueprints. As such, I cannot even copy paste the names of the fields. It's just a picture...

As mentioned I have already had a look at many of the official tutorials, but they seem to be very poor. Take this one for example: https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Actors/index.html. It is very short, and barely contains any code samples. Some of the links that you follow only contain small fragments of code. In C++ this is doubly problematic, because questions such as "which *.h file should I #include for this class/function" are not trivial in C++ . Beginner tutorials should contain entire files/classes. Prefereably, they should also contain the "click heirarchy" when you have to click through very complicated submenu heirarchies. 

The only "complete" tutorial that I found on their site was: https://docs.unrealengine.com/latest/INT/Programming/QuickStart/index.html . But this one is really short, and does not teach anything beyond "hello world".

When ever I want to learn a new framework/programming language online, I usually work by example. I follow someone along as they slowly build a sample project (as in the Quickstart tutorial). However the official Unreal site seems like it is trying to provide something more like a reference guide. This leads me to believe that the official site is not suited for my learning style.

That's why I am looking for some more "by example" programming tutorials.

Edited by SillyCow

Share this post


Link to post
Share on other sites

When working with UE4, you practically have to use Blueprints. They're not an alternative to code, they're the backbone of the system. Even if you went the hard route and made all your logic in code, you would still almost certainly be interfacing with the Blueprint system for object instantiation, not to mention all the other parts of the visual scripting system. UE4 is not a code framework with some free graphical tools thrown in - it's a full development environment with hooks for you to add code, with C++ almost considered a scripting language.

So unfortunately my answer to you is to get used to Blueprints. You can still work from examples but instead of copy and pasting you will need to re-create example Blueprints. This is actually very quick to do given that each node can be created in about 10 seconds and joining 2 nodes together takes under a second.

Once you're more comfortable editing Blueprints, you could then practise extending the system - perhaps create a new component and add it to an actor, giving it some UPROPERTY values so you can set them in the editor. Then create a Blueprint-exposed function, and then call that function from within a Blueprint, e.g. from an Event. Maybe give the component a Tick and have it perform some game-loop processing, altering other components. Etc.

Once a programmer is very familiar with the Unreal object model, when events are called, and how each part of the system interacts with other parts, it's possible to start converting a lot of the logic away from Blueprints and into code - but nobody is expected to start with a 'code only' approach.

Share this post


Link to post
Share on other sites
Posted (edited)
7 hours ago, SillyCow said:

I'm not clear about how to copy paste blueprints from online tutorials. From what I see they are just JPEGs of blueprints. As such, I cannot even copy paste the names of the fields. It's just a picture...

OK, so, obviously you can't copy and paste these, but ... how often do you just copy and paste other code?  I can only think of a handful of times I've had to copy and splat some code rather than just read and learn.  This is a bit of an annoyance, but blueprintue makes sharing code much easier.  It may not be perfect, but it's getting there.  You probably won't find a ton of use beyond some point, though

As to full code samples, that's what new project templates are. They cover or come close to just about any genre you want.  They have core BP or C++ and show you how to get the basics up and running.  Beyond that, you can look in the SDK docs and go from there.  Read the code, watch Youtube starter tutorials to get a handle on the editor, and go.  There are a lot of solid tutorials on Youtube and if you're looking for "by example," that is it.

But, as Kylotan said, BP is very integrated and you really should start there and get used to it.  It's got some really nice facilities, it's a full language, and nothing to scoff at.

Edited by Ryan Pavlik
pressing ctrl?-enter should not submit a post :p

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!