Book Image

Learning Unreal Engine iOS Game Development

By : Muhammad A.Moniem
3 (1)
Book Image

Learning Unreal Engine iOS Game Development

3 (1)
By: Muhammad A.Moniem

Overview of this book

Table of Contents (18 chapters)
Learning Unreal Engine iOS Game Development
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Nodes Database
Index

Getting and building the engine


The first step is to get the engine running. Using Unreal Engine to build iOS games is a little different than using any other tool or engine out there, as Epic took a brave and awesome step by releasing its entire engine source code to its subscribers. We will see two different ways to get the engine running.

Direct download

Downloading UE4 directly will ensure that you have an already compiled version of the engine. All that you have to do is just start using it. You can get it by following these steps:

  1. Access the engine home page.

  2. Press the Get Unreal button and start filling in all your information to make an account with Epic games. Also, you will need to read the engine license and accept it if it works fine with you.

  3. After confirming your e-mail and getting your account running, your dashboard will look different. You will see a confirmation of the successful subscription billing.

  4. Then, you will see the other options to download the engine. In the case of direct download, you have to pick the launcher OS version you want: Windows or Mac. In my case, I've picked the Mac version (keep in mind that it will download a launcher, which is approximately 50 MB only).

  5. When you run the launcher, you will find many useful links to the forums, answer hubs, and marketplace where you can find free projects among other things.

    You can go to the library and select an engine version (the latest should be the best; I'm running 4.3 while writing this book, as it is the latest one and was just released a few days ago) and start installing it. After you finish, you will see a new section called Engine Slots, which holds all the engine versions you are running via the launcher.

  6. Finally, you can run the engine!

GitHub version

The GitHub version is not just a precompiled copy of the engine; it contains the full C++ source code of the engine, which means if you are a ninja coder and you want to add new features or fix the engine bugs and improve it, this is the best way to get your copy. Also, if you are a beginner in the engine world or a student who wants to learn more about the engine constructions, your best bet is to get the GitHub version:

  1. After the first three steps in the previous method (opening the engine page and registering an account with Epic), instead of selecting to download a launcher, you will need to access the GitHub version to get the full source code of the engine.

  2. Follow the link in the GitHub instructions to access the repository.

  3. To be able to access Epic's repository of the engine in GitHub (which is a private repository), you will need to list your GitHub account name (make a new one if you don't have one already) in your account settings. This should be enough to connect your GitHub account with Epic's GitHub group. If you access your GitHub account, you should now find Epic listed in your organizations list.

  4. From the available branches, you can select the version of the engine you want to download, or you can directly access all the release versions from the release tag at the top of the page:

  5. Now, you need to download the files associated with the engine version you chose. Ensure that you download only 4 out of 5: Optional, Required_1of2, Required_2of2, and Source code(zip).

  6. Now, as we have all the required files, we need to extract all of them while ensuring that the files are together in the same folder, without replacement of any of the folders. As all of the ZIP files contain the same folder names (as they are all related to one dependency), you might need to press Alt on your Mac while merging the files/folders and select Keep Newer to add them instead of replacing them.

  7. After finishing the file merge process, you will end up with the final engine source code files, which is approximately 6.5 GB. All that you need now is to run the script that is responsible for generating the project files. If you are using a Mac, which is our case, then you need to run GenerateProjectFiles.command; otherwise you can run it's Windows equivalent, GenerateProjectFiles.bat.

  8. This project file autogenerating process will hold for a few minutes and it will end up adding some files to your engine's folders and directories. However, the only one you can see and the only one you need right now to build the engine will be in the root directory: it will be an XCode project file named UE4.xcodeproj or a Visual Studio solution called UE4.sln on Windows.

  9. Run this project in XCode 5.1 or later. Give it a while to index your project, which might take approximately 30 minutes or less, depending on your Mac speed. Don't be in a rush, as it might break everything if you start building to soon. You should wait till the activity viewer bar at the top of XCode finishes indexing and tells you that it is ready.

  10. Now, it is time for the final step: building and running the engine. We just need to define what exactly we are going to build. In this case, we want to build an Unreal Engine Editor for Mac. So, we need to open the Set the active scheme menu from the top-left corner and select the UE4Editor – Mac scheme. Now, you can click on Build and run, and this will give you a debug build of the editor that could be a little slow and buggy. If you want a final build that is more optimized, efficient, and free from the debugging code, you could easily build using Product, Build For, and finally Profiling.

After building, the Unreal Editor will run automatically. Whenever you want to run the Editor, you don't have to build it again; you just need to browse to the build location and open it. The location for Mac and Windows is as follows:

For Mac: UnrealEngine-4.3.0-release /Engine/Binaries/Mac/ UE4Editor-4.3.0.app

For Windows: UnrealEngine-4.3.0-release /Engine/Binaries/Win64/ UE4Editor.exe

Keep in mind that the final *.app name might be different; it depends on the build type you made. Here, I made a debug engine build and my final engine application file was named Debug.app by default, which I then changed to UE4Editor-4.3.0. Feel free to change it; as long as you have different engine builds running at the same time, you will need to define them to avoid any confusion.