Learning Unreal Engine Android Game Development - Sample Chapter
Learning Unreal Engine Android Game Development - Sample Chapter
Learning Unreal Engine Android Game Development - Sample Chapter
$ 44.99 US
29.99 UK
"Community
Experience
Distilled"
Nitish Misra
C o m m u n i t y
D i s t i l l e d
E x p e r i e n c e
Nitish Misra
late 2014, he was one step closer to realizing that dream after he completed his BA
(Hons) in game design and production management from Abertay University. He is
currently working in a start-up based in New Delhi, designing games on mobiles and
working toward breaking into the game industry.
His areas of interest include concept development, systems design, and level design.
With 3 plus years of experience in Unreal Development Kit, Unreal Engine 4 was
the most logical go-to option for him, and he has been using it for the past 1 year,
experimenting with the various features offered by UE4, to see what can be achieved
using it.
Preface
The first Unreal Engine was launched in 1998 by Epic Games. A great feature about
this engine was that, because of UnrealScript, the engine became quite popular with
the community, as it made modding quite easy and accessible. Then, in 2002, Epic
released their next engine, Unreal Engine 2, which was a great improvement over
the first engine. It came with something called UnrealEd 2 (and later, UnrealEd 3),
which was essentially a level editor that you could use to create levels for Unreal.
This, along with UnrealScript could be used to create entirely new games. The engine
offered better rendering, better physics, and better collision than its predecessor. It
also supported the then current generation consoles, namely PlayStation 2, Xbox,
and GameCube. In 2006, Epic released their next, and, probably, their most popular
and widely used engine, Unreal 3. It was a giant leap in terms of technology. This
is where Unreal Engine started picking up steam. However, perhaps the most
significant feature offered by Unreal Engine 3 was Kismet. Kismet is an extremely
powerful visual scripting tool. The way it works is that there are various nodes,
which can be connected to form a logical sequence, kind of like a flowchart. The
best part about Kismet is that you do not require any programming knowledge.
You can make an entire game without writing a single line of code using Kismet.
It is an extremely handy tool for artists and designers, since they can make quick
prototypes or experiment with a certain feature on their own and not have to rely
on programmers.
We now come to a more present time. In February 2012, Epic unveiled Unreal 4,
which was finally released on March 19, 2014. Unreal Engine 4 had been in the
works since 2003. This Engine was a huge step up from the previous one. For one, it
totally removed UnrealScript and replaced it with C++. In earlier versions of Unreal,
if you wanted to modify the engine to develop your game, you had to do so using
UnrealScript, which meant learning a new language. But now, if you wish to modify
the Engine, you can do so with C++. This was a huge improvement for engine
programmers, since this meant they could modify and tweak anything they wish
using a language they already know and love.
Preface
Not only that, the engine's source code is also available for developers and can be
downloaded from the GitHub repository. This means that developers have full
control over the engine and can tweak virtually anything, including the physics,
rendering, and UI.
It also offers something called the Hot Reload function. Normally, when you want
to make changes in the code of a game, you have to stop the game, make the desired
change, and then run it again to see how it affects the game. However, with the hot
reload function, you can make changes in the game without having to stop or pause
the game. Any change you make in the game's code is instantly updated and you can
see its effect in real time.
You can also develop games for a wide variety of platforms on Unreal 4, including
Xbox One, PlayStation 4 (including Project Morpheus), Windows PC, Linux, Mac OS
X, HTML 5, iOS, and Android. It also offers support for Oculus Rift.
Another major change made by Epic is the licensing model, aimed at smaller,
indie developers. To be more specific, to license Unreal Development Kit (UDK),
which was the previous version of Unreal Engine, the developers had to pay a $99
licensing fee and 25 percent of the royalties made after the company had earned
at least $50,000 from sales. In Unreal 4, however, they have changed the structure.
As of early 2015, Unreal Engine 4 is now completely free to download and use. No
licensing fee, no subscription, nothing. You can download it, develop a game on
it, and publish it, without spending a single penny on the engine. You only pay 5
percent of the royalties after you have earned more than $3000 in revenue.
Another great feature that Unreal 4 provides is the Marketplace. The Marketplace is
a great place to buy and upload assets. These assets can be Animations, 3D Models,
Materials, Sound Effects, Premade Games, and so on. This is also good news for
aspiring developers, who do not have the resources or manpower to develop these
assets. They can simply buy the required assets from the Marketplace and use them
in their game. Developers can also upload their own work onto the Marketplace and
earn some money.
This book is aimed at beginners who have little to no knowledge regarding Unreal
Engine 4, and it covers how to develop games for Android using it. This book will
cover all that you need to know in order to get started. From the very basics, such
as how to download and install the engine, to the more advanced, such as how to
upload your finished product on to the Google Play Store, are going to be covered.
We will do this by making a game of our own using UE4, step-by-step. Each chapter
can be thought of as a step in making our game. The book has been structured in
such a way that each subsequent chapter is a continuation of the previous chapter to
give a sense of flow to the readers.
Preface
This book will also not use any other software (apart from the Android SDK), so that
the readers do not have to first download dozens of software in order to get ready,
and focus solely on the engine. All of the assets, such as materials, static meshes, and
so on, will be the ones available in the Engine itself.
Chapter 1
What to expect
Learning how to use a game engine can be a daunting task; you just do not know
where to begin, and UE4 is no exception. However, once you get the hang of it, you
will quickly find out how extremely powerful and intuitive it really is. And what better
to teach you how to use a game engine than by actually making a game in it? This
book will teach you all that you need to know for you to be able to develop games on
Android platforms using UE4, and make an actual functional game in the process.
The reason behind this is simple; just talking about the features offered by UE4 and
demonstrating them one at a time is not very effective when learning how to develop a
game. However, if one were to explain those very features by implementing them in a
game, it would be much more effective, since you would get a better understanding of
how each feature affects the game and each other.
[1]
The game we are going to make in this guide is called Bloques, which is a first
person puzzle game, wherein the main objective of the player is to solve a series of
puzzles in order to progress. As the player progresses, the puzzles get progressively
more complex and complicated to solve. As for the scope of the game, it will contain
four rooms, each with a puzzle that the player has to solve in order to progress to the
next room.
The rationale behind picking a puzzle game is that puzzle games have more
complicated systems, in terms of scripting, and level design. To put it in the context
of the guide, things such as scripting with blueprints and level design will be much
better demonstrated through a puzzle game. Although the game will be explained
thoroughly in the subsequent chapters, a high-level breakdown of the game's
features are as follows:
The player has to solve a series of puzzles in each of the rooms in order to
progress to the next. As the player progresses, the puzzles get more complex
and harder to solve.
This guide aims to set the foundation of UE4, upon which you can build your
knowledge further and be in a position to actually develop that game you always
wanted to make!
A final word of advice is practice! Tutorials and guides can only do so much. The
rest is up to you. The only way to truly master UE4, or anything for that matter,
is practice. Keep experimenting, keep making small prototypes, keep yourself
up-to-date with the latest developments and news, and keep interacting with
the community.
System requirements
Before you jump in and download UE4, you first need to ensure that you have a
system capable of running it in the first place! UE4 works on both Windows and Mac
OS X. The following are the system requirements for each:
.NET 4.0
[2]
Chapter 1
8 GB of RAM
Everything you need to know regarding UE4, you can find hereincluding the
latest news, the latest version of the engine, blog updates, latest Marketplace
entries, and so on. As of 2015, the engine has been made free to download.
In addition to the UE4 homepage, it is recommended that you visit https://
docs.unrealengine.com/latest/INT/. It is full of documentation and
video tutorials on how to use UE4. Epic boasts a large, active, and friendly
community, always willing to help anyone facing a problem via the forums.
[3]
2. From the home page, click on the GET UNREAL button on the right of the
screen. Clicking on it will bring you to the subscription page, shown here:
[4]
Chapter 1
5. Now that you have your account set up, you can download UE4. You can
download either the Windows version or the Mac version, depending upon
your setup. To download, under Latest Download, click on the Download
button and you will download the Engine Launcher.
6. To run the installer, simply double-click on UnrealEngineInstaller-*version
number*.msi if you are using Windows or UnrealEngineInstaller-*version
number*.dmg if you are using a Mac. Follow the steps to install the
Engine Launcher.
7. After the installation is complete, run the Launcher. You should encounter
the following screen.
[5]
This is the login screen. Just type the e-mail address you used to subscribe
and your password, then either click on the arrow button next to
PASSWORD or hit the Enter key, to log in.
8. Logging in will open the Engine Launcher. We will discuss it and its
functionalities in detail later on, but for now, all you need to do is click on
Library and click on the Add Versions button next to Engines. Doing so will
create a slot. You can select a version number using the version dropdown in
the version slot you added, then you can click on the Install button and the
version of UE4 that you selected will begin downloading.
That is it! You have now downloaded and installed UE4 on your PC (or Mac). To
launch the engine, simply click on the Launch button on the top-left corner of the
Launcher, below the account name, and you are good to go. You can also launch
previous versions of the engine if you require. Clicking on the downward arrow next
to the Launch button will open a menu, with all of the versions of the engine listed,
and to launch them, simply click on the version which you wish to run.
Alternatively, you can also click on the Library button, and select which engine to
run from there. All of the versions installed on your system will be listed, and you
can simply launch any version from the list by clicking on the Launch button.
[6]
Chapter 1
But hold on! We have a few more things to discuss before we are ready to start using
UE4. Let's take a quick look at the directory structure.
Each version of the Engine gets its very own folder. Apart from that, there are two
other folders, namely DirecXRedist and Launcher.
[7]
Windows DirectXRedist
DirectXRedist is where the DirectX files are located. The folder also contains the
installation file, from which you can install DirectX.
Launcher
The Launcher folder contains all the files for the Engine Launcher. The Launcher
folder contains the following subfolders:
Backup: UE4 has an excellent feature that lets you create backups of your
work. Should a developer make an unfixable or difficult-to-fix mistake or
if the Engine crashes mid development, instead of having him/her do all
the work all over again, a backup of their work will be stored in the Backup
folder, so they can pick up where they left off.
Engine: This folder contains all of the code, libraries, and content that makes
up the engine.
PatchStaging: Every now and then, Epic will release a new version of
UE4. As of 2015, the latest version out is 4.7.6. (The preview version of 4.8 is
available at the time of writing). When you are in the process of download,
all of the data of the currently downloading version/versions of UE4 gets
stored in the PatchStaging folder.
VaultCache: As will be explained later in the chapter, all that you need
to know right now is that everything you purchase in the Marketplace is
contained in the Vault. The VaultCache contains all of the purchased items'
cache files.
4.X folders
Before we talk about the 4.X folders, you should know all versions of UE4 (4.1, 4.2,
4.3, and so on) work independent of each other. This means you do not require the
previous version to run the later versions. For example, if you wish to run version
4.4, then you do not need to download versions 4.0, 4.1, 4.2, and 4.3 in order to run
it. You can simply download version 4.4 and use it without any problems. This is the
reason why there is a separate folder for every version of Unreal 4, each version is
treated like a separate entity.
[8]
Chapter 1
All of the 4.X folders, although separate, contain the same set of subfolders, hence
they are grouped together. The following are the subfolders:
Engine: Similar to the Launcher's Engine folder, this contains all of the
source code, libraries, assets, map file, and more that make up the Engine.
Samples: UE4 has two sample maps, Minimal Default, and Starter Map. This
Templates: UE4 offers templates for various genres of games, for example
folder contains all the content including assets, blueprints, and more.
first person, third person, 2D side scroller, top down, and many more. All of
the content for each of these genres and the source code are contained here.
[9]
At the top left, there are three tabs, Unreal Engine, Unreal Tournament, and
Fortnite. The Unreal Engine tab is open by default, and contains what you see in the
preceding screenshot.
The Unreal Tournament tab is where you find information and links regarding the
latest Unreal Tournament game.
[ 10 ]
Chapter 1
At the time of writing, the Alpha version is available. You can sign up for it, give the
developers feedback, and access the official Facebook page, Twitter page, Instagram
account, and Twitch streams from this tab.
At the top-right corner, on the panel with the tabs, are two buttons, the friend list
button, and the Settings button. When you click on the friend list button, it opens
a window, where you can manage your friend list, like adding and removing
friends, seeing who is online, and so on. You can also set your status to either
Online or Away.
The next button is the Settings button, wherein you can find certain options
regarding the Engine Launcher, such as accessing the support page, viewing the
launcher logs, exiting the launcher, and so on.
On the top left, is the Launch button which, as previously discussed, launches the
engine. Below it are several panels; each containing something different. Let's look
at each of these panels individually.
[ 11 ]
News
The News panel contains all the latest news and updates regarding UE4 and Epic in
general. From here, you can access the latest articles regarding the current/newest
version of UE4, the latest content that has been released in the Marketplace, the latest
tutorial series that are out regarding a specific topic, Twitch recaps, and much more.
This is the place to be, to stay up to date on the events surrounding Epic and UE4.
The news section is updated regularly, so checking the news section
every once in a while is highly advisable.
Learn
As the name suggests, this is where you can find all the tutorials and documentation
regarding UE4. The Learn section offers video tutorials, such as how to use
Blueprint, written tutorials, which have step-by-step instructions on how to use
UE4, and finally there are Gameplay Content Examples, which are project files with
everything already set up, such as the level, lighting, assets, as well as the Blueprint
scripts so that you can personally see what does what and can experiment.
At the top of the Learn section are three buttons, namely, Documentation, Video
Tutorials, and Community Wiki. Clicking on Documentation will send you to
Epic's official Unreal Engine 4 Documentation page, covering various topics such as
how to use the Editor, Blueprint, Matinee, and so on.
The Video Tutorials button will take you to Epic's video tutorial page, where
everything is neatly categorized. Each category has a certain number of series.
A series contains a set of video tutorials covering a certain topic. For instance,
the Blueprint category currently has six series, including introduction, how to
create an inventory, third person game creation, and so on.
Finally, the Community Wiki is a living, breathing wiki page, where the people can
post tutorials, code, projects, plugins, and more. It is a great way of getting user
content and finding tutorials created by other developers. It is also worth mentioning
here that Epic is currently in the process of developing their latest project, Unreal
Tournament. A great thing about this title is that they are also accepting and
implementing content created by the community. This includes developing the core
game functionality, levels, characters, guns, HUD graphics, and so on.
[ 12 ]
Chapter 1
Marketplace
The Marketplace is where developers can purchase assets. Developers who lack the
manpower or resources to create assets can purchase and use them in their game.
These include meshes, materials, animation sets, rigged characters, audio files, sound
effects, projects, and tutorials, to name a few. Certain items in the Marketplace, such
as the ones by Epic themselves are free. They are mostly tutorial project files, with
a sample level already setup to showcase various features offered by UE4. These
project files also have all of the level blueprints set up and implemented, so that
users can see them, and experiment with them until they get the hang of it. Other
items in the Marketplace, created by users, cost money. The assets you can purchase
are neatly categorized, based on the type of content, for your convenience.
Apart from buying assets, you can also submit your own content in the Marketplace
and earn some money from it. Clicking on the Submit your content hyperlink on
the top-right corner of the Marketplace screen will open up Epic's Call for
Submission page. The Call for Submission page has all the information regarding
submitting content.
It also has the Marketplace Business Terms, which has all the information regarding
things like how the revenue from the sales will be split, how you will get paid, when
you will get paid, and so on. It also has the Marketplace Submission Guidelines,
which explain things like the submission process, what you need to submit, the
resolution for the screenshots, and more. You can also get more information on the
submission process and get feedback on your content by posting on the Forums.
[ 13 ]
Library
The Library is where all versions of UE4, all your projects, and all the items you have
purchased from the Marketplace are listed. Let's look at it a bit more closely.
Library has 3 sections, Engine Versions, My Projects, and Vault. The Engine
Versions section displays all versions of UE4 currently installed on your system.
You can launch any version of the Engine listed from here. Additionally, you can
also download the latest version or previous versions. To do so, simply click on Add
Versions at the top of the panel, right next to Engines Versions. Clicking on it will
create a slot for the version you wish to download.
[ 14 ]
Chapter 1
As you can see in the previous screenshot, clicking on the Add Versions button
created a slot for the latest version of Unreal 4, which in this case, is 4.8.0 (although
it is only the preview version). To download, simply click on the Download button
and it will start downloading.
Additionally, you can remove versions of UE4 that you do not require. For example,
if you have the latest version, it would be understandable if you wish to remove
previous or older versions of the engine to make space on your hard drive. To do so,
simply hover your cursor over the top-left corner of the version slot until you see an
x. Once you see the x, simply click on it and the corresponding version of UE4 will
be uninstalled. Another way of uninstalling is by clicking on the downward arrow
button next to Launch, which opens a drop-down menu; from this, select Remove
and the Engine Launcher will uninstall that version.
The second part of Library is the My Projects section. In this section, all the projects
you have created are displayed.
The projects are categorized alphabetically. At the top-right corner is the search bar.
In the preceding screenshot, there are relatively few project files; therefore, it is easy
to find a specific project. However, if you have lots of projects, it might be harder to
find the project you are looking for. In that case, you can type the name of the project
you require in the Search Projects tab and it will find it for you.
[ 15 ]
At the bottom-right corner of a project's thumbnail, you can see in which version
of the engine the project was created. For instance, in the previous screenshot, the
project Effects was created with version 4.0 of UE4. If you open that project file,
the Launcher will launch the version 4.0 of UE4. If, however, you do not have the
corresponding version, then upon launching the project, you will be asked to select
which installed version you wish to launch the project file in. After you have made
your choice, it will then convert the project to be compatible with the version you
selected and launch it. However, always be careful when converting a project, as
some unexpected issues might occur. It is advisable to create a backup copy of the
project before you convert it.
To launch a project, double-click on the thumbnail. Apart from opening a project,
there are other operations you can perform with the projects. Right-clicking on
the thumbnail opens a menu. Clicking on Delete will delete the respective project.
Clicking on Clone will create a copy of the project file, and clicking on Show in
Folder will open the folder where all the project files are stored on your system.
Finally, there is the Vault. All of the items you have purchased in the Marketplace
are contained in the Vault.
The preceding screenshot demonstrates what Vault looks like and how the items are
arranged. On the left is the thumbnail of the item, followed by the name of said item.
Below the name is the amount of space occupied by that item. The blue i icon below
the name is information regarding compatibility. Hovering the cursor over i will
show you which versions of UE4 that item is compatible with.
[ 16 ]
Chapter 1
UE4 Links
The final element in Launcher's user interface is the UE4 Links, located at the bottomleft corner. UE4 Links unsurprisingly contains hyperlinks to different web pages.
Forums: UE4 has a large and active community. The forum is a great place
to meet other developers, share your ideas, show your work in progress and
get feedback, team up with other members and develop a project, and so on.
The forum's discussion board is neatly categorized, based on the topic you
wish to discuss. There is the Development Discussion section, where you can
talk about Blueprints, Animation, Rendering, C++ Gameplay Programming,
and so on. Then, there is the Community section where you can showcase
your work in progress and get feedback, and also see other people's work
and give them feedback. Following that is the UE4 for Schools section, which
is dedicated to students and teachers to discuss UE4 and the education
program. Finally, there is the International section, where you can interact
with developers from your demographic. Recruiting and teaming up with
people for a project is easier and much more convenient since almost all of
the members are from the same general area.
[ 17 ]
Epic's social icons are at the very bottom. From left to right, they are as follows:
Instagram: You can follow Epic's Instagram profile, where they post photos
and videos regarding UE4, such as environments, events, materials, and so
on. Their Instagram link is https://instagram.com/UnrealEngine/.
Facebook: Clicking on this will take you to Unreal Engine's official Facebook
page, where, as with Instagram, all of the updates regarding UE4 and Epic
are posted. The link to their Facebook page is https://www.facebook.com/
UnrealEngine.
YouTube: This will take you to the official Unreal Engine YouTube page,
where you have access to all of the previous Twitch streams, Tutorials, and
so on. The link to their YouTube page is https://www.youtube.com/user/
UnrealDevelopmentKit/.
Twitter: This will take you to the official Twitter page, should you want
to follow them on Twitter. The official Unreal Engine Twitter handle is
@UnrealEngine
[ 18 ]
Chapter 1
Summary
You have now taken the first step towards becoming an UE4 Android developer.
This chapter was just the tip of the iceberg; there are still plenty of things to cover.
In this introductory chapter, we covered what UE4 is and the features UE4 provides.
You also learnt how to download and install UE4. Now you're well versed with the
Engine Launcher, its UI, and functionality
All these topics provide a nice segue to our next chapter, where we will be covering
the Editor. Before we start using it, it is important that you know and understand
what it is, how to navigate through it, and its UI and functionality. The next chapter
is dedicated to just that. So, without further ado, let's move on to the next chapter.
[ 19 ]
www.PacktPub.com
Stay Connected: