Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


8. April 2014

 

One of the vaunted features of Unreal Engine 4 is C++ support.  How exactly does that work?  First you need to have an external IDE installed, either Visual C++ on Windows or XCode on Mac.  The Express version will work but the helper toolbar is unavailable.  It’s mostly just a shortcut so it’s not a huge loss.  Integration is pretty solid.  In the Editor in the File menu there are a number of menu options:

 

C++ Coding

 

image

 

By selecting Add Code to Project… you can easily create a new game object using a wizard like sequence.  You select the base class:

 

image

 

Name it and you are done:

image

 

Once you click Create Class, you will be prompted to edit the code:

image

 

You will be brought to your IDE of choice.  From this point on, its just like working with any other Visual Studio or XCode C++ project.

image

 

The result of your project is a DLL file, build as per normal and your game will update in the editor.  It’s only when adding ( like we just did ) a new class do you need to restart the Unreal Engine Editor.  Otherwise a simple refresh should suffice.

 

The actual C++ libraries are fairly massive and far beyond the scope of this brief overview.

 

Building Unreal Engine from Source

 

One of the big advantages of Unreal is you have complete access to the source code.  The code is available in multiple parts, a couple of zip files with most of the external dependencies then the remaining code is available of Github.  You have to associate your Github account with your Unreal account, but the process is basically instant.

 

The GitHub repository is about what you would expect.

image

 

The actual source isn’t that big, about 120MB, while the supporting zips measure in at a couple GB, but they shouldn’t regularly change.  Unreal make a bleeding edge release available for the brave of heart.

 

The actual process is about as simple as it gets.  You do a git pull, download and extract the supporting files into the same directory, then run a script that generates the project or solution file.  Then, in the case of Windows, simply open the SLN file in Visual Studio:

 

As you can see, the solution contains full sources for every tool in the SDK:

image

 

This is nice, when they say with source code, it’s the ENTIRE source, nothing is hidden from you.  On the other hand, have some patience, the build process isn’t exactly fast.  On my machine it took about half an hour, I cant even imagine how long it would take on the MacBook Air, probably a couple of hours.  Then again, I remember the bad old days of all day builds, so this is really a first world problem.

 

Have a fair bit of drive space available too, as building from source is going to require a fair bit of space:

image

 

I’ve only scanned the code but from what I’ve seen it’s pretty clean and well commented.  For the majority of devs, you probably wont ever need to modify the code, but being able to run it in debug mode is certainly invaluable.

 

 

The Documentation

 

A project like this lives of dies on it’s documentation and I am please to say Unreal Engine is well documented.

 

First there are a series of video tutorials.  Even without a membership you can check them out.  As of right now there are 64 video tutorials available.

The documentation is broken down like so:

image

 

Under the Samples & Tutorials some are currently just placeholders.

image

 

The Programming Guide is pretty comprehensive.

image

 

Reference documentation is again detailed:

image

 

They also provide the AnswerHub, a StackOverflow like portal for asking and answering questions.    As you can see from the screenshot below, answers come very quickly and devs are very active in solving problems.  If you run into a problem, you are very well supported:

image

 

In addition to AnswerHub, there is also a full Wiki:

image

Currently it is a bit sparse, but expect it to grow over time.

 

Finally there are the forums.  One of the nice things about having to pay to be a member is it gets the signal to noise ratio way down.  This means the only people on the forums are people that are using or evaluating Unreal Engine.

image

 

The forums are also very active and developers actively participate.

 

Summary

 

This of course only scratches the surface of the functionality available.  There shader support, skeletal systems, etc… all nicely integrated in the editor.  What I will say is I am actually shocked at the level of polish of not only the Engine and supporting tools, but also the community they have fostered and the level of support they are providing.

 

When I first downloaded UDK I was actually somewhat underwhelmed with what was included.  Level level of polish present in UE4 shows they are taking this release very seriously.  Don’t get me wrong, UE is NOT a beginner friendly product, this is some seriously powerful but also sophisticated tech you are being given here.  That said, Unreal have done an amazing job making it as accessible and well supported as I could have imagined.

 

Is it worth 19$ a month?  Most certainly, if only just for the learning experience it represents.

Programming , ,

blog comments powered by Disqus

Month List

Popular Comments