Hello World

Hello World for Unreal Engine 4 - Page 1


This is a twist on the usual Hello World tutorial which is printing words to a console to introduce someone to a new language. Since Unreal Engine 4 combines logic, 3-D graphics and a sophisticated editor - this is a multi-disciplinary exercise. This just introduces creating and importing a 3-D assets, creating a material and material instance and creating logic for a revolving camera. This will give you a start so that you can create your own unique version like the one below.

Otter dancing with a fish

You will need to install the latest version of UE4 4.25.x by downloading the Epic Games Launcher. You will also need a GitHub account which is free to sign up for as we will be using version control. You will also need a mac or PC that is powerful enough to run unreal. If you are on a PC you will have to download and install git (on a mac it may prompt you to install git as well but you can do it through the terminal). We will also install Github Desktop as it provides a GUI interface so you don't have to worry about command line. Once git is installed you will also need to download and install the Git LFS (Large File System) as well for both PC and mac. For this simple introduction that is all that is needed

1. Setting up Unreal & Github

Before we can start we want to set up our development environment. This includes downloading Unreal as well as setting up GitHub as our version control so we can backup and maintain our project safely. Make sure you have lots of hard drive space as the engine and various downloads can take a lot of room. I recommend around 100 gigabytes free would be suitable.

1-1

Install the Epic Games Launcher

Download the Epic Games Launcher and install it on your mac or PC. You will need to get an Epic account if you don't already have one. Go to the Unreal Engine and Library tab then press the + button to install Unreal the latest version of engine. Make sure it has a 4.25 in front of the version.


1-2

Get the Latest Version of Unreal

Press the Install button to install this version of Unreal on your mac or pc. The latest version of 4.25.XX will do.


1-3

Start Unreal Engine

Now after 15+ minutes when it is installed you can finally launch the Unreal Engine editor. Press Launch button to open up the Select or Create New Project screen


1-4

Create New Project

You can pick from different starting templates with Games, Film/TV, Architecture and Design as options. Lets start by selecting Games and then press the Next button.


1-5

Select Template

Unreal then allows us to have various starting point template for different genres of games. We will be looking at these in later tutorials. For now lets just start with a Blank template then press the Next button.


1-6

Select Project Settings

This now takes you to the Project Settings screen. The first settings on the top left is set to Blueprints. You can select between C++ and Blueprint. Since we will not be doing any C++ programming in this exercise we will leave it with Blueprint. I am leaving the quality settings to Maximum Quality as my computer is powerful enough to handle it. If you feel your computer is not at a gaming level select a lower quality. We will leave Raytracing off as we will not be using it at the moment. We set the paltform to Desktop as we will be on a PC or Mac playing the game and not on a game console or on mobile. Then you can load up the project with some basic content and we will NOT be loading this to keep our project file sizes down.

Select a folder to put it in (I suggest Documents/github/ and then assign a project name and I am calling it HelloWorld. Press the Create Project button to start the new project.


Version Control

There are some potential problems developing with a complex engine:

  • The engine can crash and you can lose your work
  • You can forget the data on another computer
  • Your hard drive can die and all the data can be lost

All of these problems can be avoided if we use version control to back up our data. This way we can recover lost work, clone the data on another computer and collaborate as a team. It is a good idea to get used to using version control as all large projects use them. The good news is that you have the tools integrated right in Unreal.

1-7

Install GIT on PC

If you are on a mac git comes ready to go (it might need to install xcode when first running the command). On a PC you will need to install git. Double click and keep all the default suggestions


1-8

Install GitHub Desktop

Now so you don't have to use command line prompts for git it is a good idea to install a GUI and the one I like best is Github Desktop](https://desktop.github.com) as it integrates with GitHub perfectly. Download and install the software.


1-9

Instal Git LFS

Now since game projects can get very large and graphics, and 3-D models can take a lot of space it is best to use the Git LFS (Large File System) extension for games. This way only assets that are currently being used are downloaded to your system speeding up your workflow and allowing you to hold larger files in GitHub.


1-10

Turn on Source Control

In the editor select the Edit menu item then from the drop down menu select Editor Preferences. Select Loading & Saving tab from the left hand side. Go to Source Control and set Prompt for Checkout on Asset Modification to true and Add New Files when Modified to true. Leave the other two settings at false and accept their default editor to deal with merge conflicts.


1-11

Activate Version Control

We will turn this folder into a git repository. We can do this inside of Unreal. Right click on the bottom left in the Content Browser the icon next to Filters. This opens up a menu that shows your Content folder. Right click on the folder and select Connect to Source Control. Then in the menu select Git (beta version) as the source control you will be using.


1-12

Create new GitHub Project

If you are in my class you will have an invite to a project. Otherwise you can just go to GitHub and create a new project and call it Hello-World. This will take you to a screen with a link to the repository. Now we just need to include our Unreal project in this which we will do next.


1-13

Paste Directory in Unreal

Paste the directory for your GitHub project into the Url of the remote server 'origin' in Unreal. Then make sure you add a .gitignore file, a README.md file, a .gitattributes for Git LFS file and finally Make the initial Git Commit file. Then press the Intialize project with Git button and on the next pop up press the Accept Settings button. You should see message pop up saying Connection to source control was successful!


1-14

Turn on Hidden Folders

Lets make sure it installed GitHub in our project. First we need to turn on hidden folders. On the PC follow these Windows 10 Turn on Hidden Folders directions. On the Mac it is a bit more involved so go and turn on hidden folders on Mac.


1-15

Confirm Git is Installed

We always need to test our work. We never assume that software will do what we expect it to do and always need to confirm. Go to the folder that you created the project and with hidden folders turned on you should see a .git folder. If you do git is installed properly.