So now it begins! Within just a few short pages you will take your first few steps towards becoming an iOS developer with UDK. But before we dive in head first, let's take a moment to learn just how UDK came to be in the first place and get everything set up to make your experience the best that it can be.
In this chapter we will:
Learn about the Unreal Engine and what we expect to create
Install UDK on our computer
Go through an overview of UDK's directories
Download and install UDK Remote
Match the Mobile Previewer settings with your iOS device
Describe the project we are going to be creating
Now that we have a firm grounding in what it is that we need as well as an overview of what the whole book is about, let's get started with the first thing we need to do, installing the program.
This first chapter is dedicated to offering a brief overview, from a beginner's point of view, of the exciting world that is UDK development for iOS.
During this chapter, we will be covering exactly what UDK is and how it came to enjoy its current popularity, including its evolution from prior versions of Epic Games' proprietary games development software.
Additionally, we'll be looking at what not to expect if you complete all the work showcased in this book. If you think you will be developing the next Gears of War game on your phone, for example, then I am afraid you're in for a bit of a surprise!
We will also be looking at how to install and run UDK on your machine and then make certain you are ready for iOS development. A key part of this is the Unreal Remote/Mobile Previewer functionality UDK offers, which we will be looking at in all its illustrated detail in this very chapter.
Finally, we'll be looking at the basic concept of the prototype game we will develop called Urban Warrior, which, yes, as mentioned previously, is not the next Gears Of War sequel, but at the same time will carry a lot of characteristics of a typical third-person shooter title which we all know and love!
First developed in 1998 to power the original Unreal game, the engine (which is C++ based) has gone from strength toï»¿ strength, and has not only formed the backbone of household-name Epic Games titles, such as the very popular Gears Of War series, but has also been very successfully licensed out to third-party developers. Consequent titles range from Batman: Arkham City to Mass Effect 3, many of which are as equally successful as the games developed by its parent company.
Currently, the Unreal engine itself is in its fourth iteration and is considered to be a top of the range visualization tool. It is not only used in the gaming industry, but has also been used for doing any kind of work that demands real-time computer graphics. UDK uses Unreal Engine 3, but it is still a powerhouse in itself and is quite capable of delivering amazing experiences on iOS software.
The offering of UDK as a concept has evolved from Epic Games content generation tools very early on with Unreal titles; tools which proved to spawn a very healthy and thriving modification (modding) community. Originally, tools like these, such as UnrealEd (the editor tool with which a user can create their own in-game level), were available to anyone who bought the game.
In 2009, however, Epic turned that logic on its head by making their tools available to anybody, whether they owned an Unreal game or not. This proved to be a very successful move which expanded the Unreal developer user base thoroughly.
More recently Epic Games, as part of their constant and persistent updates of UDK, have added iOS functionality (in 2010), making sure that UDK can provide games for the ever-expanding mobile customer base that the iPhone/iPad/iPod Touch devices by Apple introduced. This was first demonstrated to the public by a live tech demo called Epic Citadel; a freely available download on the iTunes store which played like an interactive walkthrough of a medieval town. This attracted a record number of downloads as at that time it was truly groundbreaking to experience high quality real-time graphics on a mobile device. Take a look at the following screenshot:
In fact, although it is not within the scope of this book, very recently certain demos have surfaced highlighting a potential UDK / Adobe Flash Player pipeline, showcasing the very impressive penetration this games development application has made to a number of different platforms.
Of course, we are interested in iOS here, and we'll be covering that extensively in this book, starting from the bare basics and moving on to some more advanced concepts.
So what is it that we need to know about UDK and its mobile iOS limitations? Does it have any?
Let's start with a fairly realistic statement; we can't make an AAA gaming title as seen on a contemporary console or PC, such as Gears of War, on iOS using UDK! It is a general limitation of doing mobile development using UDK.
The main reason for this is rather obvious; we just do not have access to the same hardware. The problem is not the software! UDK can deploy the same game on a PC or an iOS device, but it is the end-hardware specification that has the final say in what can be handled in real-time or not.
Mobile devices (and this of course includes iOS devices) have progressed by leaps and bounds over the last few years, and after many false starts mobile gaming today is a force to be reckoned with, both commercially and technologically. That still, however, does not change the fact that as an iOS UDK developer, you will work with more restricted hardware as opposed to, for example, someone developing for an Xbox 360 platform.ï»¿
960 x 640 pixel display
16 GB, 32 GB, or 64 GB Flash drive
Dual-core 1 GHz Cortex-A9PowerVRSGX543MP2GPU
512 MB RAM
The newest iPad released in early 2012 has the following specifications:
While these specs are fairly impressive compared to both mobile devices of the past, and also the fact thatï»¿ we are talking about what is essentially a pocket gadget, they cannot really compare with the specification of a top-of-the-range gaming PC or even a current generation console.
This, of course, does not mean we can only develop poor or second rate games with UDK. Indeed, some of its contemporary examples highlight the huge potential it has in delivering AAA gaming experiences, even with its current limitations, borne, as described previously, from the hardware limitations of a mobile device.
The best example by far has got to be Chair Entertainment's and Epic Games' Infinity Blade, an epic third-person sword-fighting game which came out in late 2010 and is considered the ideal showcase for UDK's technical prowess on the Apple devices.
Already spawning sequels and with huge commercial success behind it from its iTunes Store business model, Infinity Blade was, and is, a big eye-opener for all aspiring games developers who want to use Unreal engine technology for a successful iOS title with a very modern feel and visuals.
1. Start up your choice of Internet browser and visit UDK's website, http://www.udk.com. This is shown in the following screenshot:
We will discuss how to download UDK in the next step, but for those just getting started with UDK, Iï»¿ would also urge you to take some time and explore this website further. It has a very thorough explanation of UDK and the features it has, regularly updated showcase projects (including commercially available games), information on licensing, and in short, it is a must-visit site (on a regular basis in fact) for any self-respecting UDK developer as here you can also find the latest up-to-date version of UDK for your use.
Epic Games also has a very active forum as a part of their community. For those tackling iOS development like we are, there are also community forums for us. You can find it by either hitting the Community tab at the top or then selecting iOS Development or just visit them directly at http://forums.epicgames.com/forums/396-iOS-Development.
3. Download the latest release on the left-hand side by right-clicking on it and selecting Save link as.....
First of all, remember that you are now installing the full UDK application, not just the iOS-oriented one. There is in fact no such thing; UDK adopts a very holistic approach when it comes to multi-platform development.ï»¿
Remember as well that Epic Games releases updates of UDK on a fairly regular basis.
However, as there can be incompatibility issues with older and newer versions, they have made every single update (its installer file) available with its release date clearly visible, from the very first one released (November 2009) to the current one (May 2012).
Please note that the May 2012 UDK Beta is the version we will be using in this book and while everything that we are doing in this book should work with later versions, UDK is constantly evolving and in months to come, there may be certain quirks in the engine that may not work until Epic will fix it in a later version.
4. It is likely that you will also get a prompt for a Microsoft .NET installation, please install that too. This shouldn't take as long as the UDK download (as you can see in the following screenshot).ï»¿
However, please note that this step may also trigger a restart of your PC, so save your work in any other applications beforehand.
5. Once the UDK installer hasï»¿ finished downloading, open the file and select to Run the file, if a security warning comes up allow the installer to make changes to your computer, if your computer asks.
Typically, particularly for free applications downloaded from the Internet, people tend to disregard this bit and not read these in any great detail, and merely sign them by clicking on the I Accept buttonï»¿.
I would, however, strongly urge you to read this, particularly if you have aspirations towards becoming a professional UDK developer. You need to understand the agreement you are entering into for a number of reasons.
In general, using UDK for educational use or for non-profit reasons for the most part is completely free, but if you intend to charge for your game or make revenue off of it for any reason, you will have to pay Epic $99 up front as well as a percentage of revenue after the game has made over $50,000. For more details on licensing, take a look at the section Commercialization in Chapter 8,Publishing and Monetizing Your Game.
7. Next, install the program to your directory of choice. I used the default location. The installation process typically take a few minutes to complete (remember the large file size of the executable file you downloaded!).
8. Upon installation, you will have the option to Launch UDK. Do so, we will be using it later in this chapter.
9. Go to the directory that you installed UDK in (the one you selected in step 6). The default directory is
C:\UDK\UDK-2012-05, as shown in the following screenshot:
Epic Games provides a number of example maps and files which are worth exploring (including mobile ones), before setting off on the development of your own game. Now that the software is installed, let's take a look at what exactly the directories we created are holding.
The Binaries folderï»¿ holds a number of executable files, including the main UDK program and tools for artists and animators. Besides the UDK executables, we probably won't be touching anything here, but I'll briefly go over what the other folders hold.
iPhone/Macï»¿: It contains Packager programs used to export your game to be published on either the iOS or Mac platforms, respectively. This will be discussed in detail (on the iOS side) in Chapter 8, Publishing and Monetizing Your Game
Development holdsï»¿ the UnrealScript files of different classes created for the game. We won't be looking at it in this book, but feel free to look there some time to get a feel for how the gameplay logic works. For those comfortable with coding, you should feel free to read and extend things that were already created, but it is incredibly important to mention that you should never alter Epic's code.
Engine is whereï»¿ the engine files, holding resources, and configuration files are located. We won't be touching them in this book, but of special note is the
iPhone folder, which can be used to set specific iPhone functionality for your game.
UDKGame will include following directories:
Autosaves: This folder does not exist yet,as we haven't used UDK yet, but when you are working on levels later, this folder will be created in order to create backups of files you are working on. This isn't a replacement for you saving your work yourself, but in case UDK unexpectedly shuts down, you may have a chance to recover most of the work you did.
Build: This folder contains assets that are required for publishing on different platforms.ï»¿ Of note is the
iPhonefolder which contains Resources that we will be using later in the book such as music and graphics for the App Store.
Config: This folder contains
.inifiles, which we can use to change how the game itself functions. While we won't be touching this in the book, we will be using knowledge contained in the files, such as the key bindings which are found in the
Contentï»¿: This is the folder where all of the assets that we create will go into. The file organization doesn't matter too much, as long as it makes sense to you. As long as it's in here, UDK will be able to find it. If you go into the UDKGame folder, then in Content | Maps | Mobile, you will be able to find a number of iOS-intended levels, including the aforementioned Epic Citadel, but also a very cool version of one of their earliest games (recreated lovingly on UDK); Jazz the Jackrabbit. This was originally a 2D platform game and it is a great nod to Epic Games' history to see it remade with a modern tool like UDK.
Flashï»¿: For those of you interested in integrating Scaleform into your projects, here are examples of files created just for that purpose. You will need to have Flash in order to open the files and they will not work unless you set it up correctly. For more information about that, check out http://udn.epicgames.com/Three/SettingUpScaleformGFx.html.
Movies: Any cut scene movies that you would like to use would be placed here, if you were developing for PC/Mac. We will not be using this folder for iOS development or in this book at all for that matter.ï»¿
While we will go into detail about deploying your game on the actual device with all the issues this entails in a subsequent step-by-step and illustrated chapter, there are still some very important initial topics that need clearing up in terms of becoming a UDK iOS developer.
First of all, the devices currently supported by Epic Games for UDK iOS games production, according to Epic Games, are the following:
iPod Touch third generation (other than for 8GB capacity third generation devices)
iPod Touch fourth generation
If you have an older iOS device, then unfortunately you won't be able to carry out UDK development for it. Also worth noting is that the iPad third generation currently works in UDK by using the iPad 2's system settings, and will most likely be fully supported with its own system settings by the time you have this book in your hands.
Additionally, you will need to be running iOS version 3.2 or higher on your device, plus iTunes installed on your PC in order to do UDK development. However, in order to publish your game to the iOS App Store, you will be required to use a Macintosh computer which we will be using in Chapter 8, Publishing and Moneti zing Your Game.
We will, however, come back to this area in the last couple of chapters to cover topics such as the Unreal Frontend and iOS provisioning which will be paramount in post-production to the game's deployment and its eventual distribution.
So, with the practicalities out of the way, let's get our first taste of what it's like to develop for an iPhone with UDK!
The first foray we will be undertaking in this section and chapter will be a modest one indeed, but it is still a good showcase of the capabilities of iOS game development with the Unreal engine, particularly in terms of interacting with the player.
It uses two important concepts that we will be utilizing later on in this book; UDK Remote and the Mobile Previewer.
UDK Remoteï»¿ is an application designed by Epic Games to push, touch, and also tilt controls - essentially everything you need to control an iPhone or iPad game - from the mobile device onto your development machine (PC).
Theï»¿ Mobile Previewer is an option that can be triggered inside the main UDK executable, which can be used to run the mobile UDK game on your PC. It is created for minor testing in much the same way that playing in the editor itself is an option in the main UDK executable. Think of the option as an emulator of what your game may look like on a specific mobile device. The option is not an entirely perfect one though, remember that the graphics processing unit on the PC will be more powerful than your iOS device's which could result in it being much faster in rendering content. Some visual effects results may be different too, for example, anti-aliasing. A good idea would be to very occasionally deploy the game on the mobile device just to make sure you are not exceeding its technical capabilities and also that everything looks the way it is supposed to. We will learn how to do this in a later chapter.
Both of these applications (UDK Remote and Mobile Previewer) can work in conjunction - as we will see!
The example in this section will not work without both your PC and your iOS device being connected to a Wi-Fi network; it is not enough for the device to be connected on a 3G network. Please make sure your device has its Wi-Fi settings on and is on the same network otherwise the following example will not work.
The first two chapters of this book will be using an iPhone 3GS for examples, while the later chapters will be using an iPad 2.
1. Before you do anything else, fire up the UDK editor. Then, go to the iTunes Store, which, as an iOS user, you should be fairly familiar with by this stage. Type in
udk remote, as shown in the following screenshot:
2. Click on the Free button to change it to say Install. Click on the button again to install the UDK Remote application on your iOS device.
3. Sync your device with the new app. Make sure your iOS device is properly synced by disconnecting it and looking at the menus of your device till you find the application installed.
4. Start up the UDK Remote application by tapping on its icon. You will be prompted to fill in details about your machine.
The only setting you need to change in order to get UDK Remote to work is typing in the IP address of your computer so that your iOS device can communicate with it. Let's leave the other ones as they are for now.
You can, however, before we resolve the IP address issue, quickly click on the Done button on your iOS device to check out UDK Remote.
You should now be taken to the UDK Remote runtime screen which as you can see is very basic.
Of course, there is no way this could work without setting up a communication between this and a host machine (your computer), as you can see from the error message.
So, 'what is my IP address?' you may ask. There is a quick way to find this out in case you do not know it.
6. On your computer, click on the Start menu and select All Programs | Accessories | Command Prompt, as shown in the following screenshot:
7. Type in
ipconfigwhen you reach the command prompt and make a note of the IPv4 address that comes up. Go back to UDK Remote on your iPhone, click on Computer Addr and put in the value of the IPv4 address shown in the command prompt,and then click on the OK button to finish.
10. Your IP address and port will also be highlighted in yellow color as this means you have not hooked up with UDK yet, so let's do that next.
11. Open up the UDK editor that we launched in the previous section. Along the main toolbar, you will see an icon that looks like an iPhone with a play button next to it in the top-right corner. This is the Play on Mobile Previewer button.
12. Alternatively, you can also select Build | Play on Mobile Previewer from the top menu above it. This is shown in the following screenshot:
13. Wait till this fires up (it will take a few moments even for a very basic scene such as the default one) then look at your iPhone. The previously mentioned Waiting for connection... will have changed to Connected to... as shown in the following screenshot:
You will be prompted with the settings of UDK Remote (most of which are quite self-explanatory).
Look at your computer screen while dragging your finger(s) on your iPhone, you can now navigate around the basic UDK scene in a three dimensional space on your computer using your iPhone over the wireless network!
Use the multi-touch functionality to play around with this and get a feel for what you can do with the interactions provided.
The circular touch pad on the left-hand side, as shown in the following screenshot, can be used for movement while the one on right-hand side for strafing.
Spend some time experimenting with your first attempt at iOS game development!
Now that we have our interactions working between our iOS device and our PC, let's make sure that it is being created for the specific device that we are using. Thankfully, it's very simple to do that.ï»¿
1. Before we move on, you should be aware that you can change some of the options on the Mobile Previewer, and indeed you should, in order to suit your device. Click on the Edit mobile previewer settings button as shown in the following screenshot:
2. As in this chapter we are using an iPhone 3GS, I changed it to allow for that, you can also change the orientation of your display from landscape to portrait if you want. This really depends on the type of game you are developing.
No matter which iOS device you have, you are now ready to use the UDK Remote and Mobile Previewer to test out all ideas and ultimately our prototype game in subsequent chapters, so already the step we have made towards this is a very important one!
Speaking of the prototype game, what exactly will we be developing?
We have talked about Gears Of War earlier and how difficult it would be to try to recreate it, with the same level of detail and complexity on an iOS device with UDK (which is based on the same engine, remember, that Gears of War was developed on).
How about we have a stab at that then and see how close we can get?
Rather than trying to produce a more casual, basic game with UDK, it would be of more interest to approach the work carried out in this book as small building blocks towards creating your own AAA title!
It is a very typical single-player third-person shooter game, very much in the Gears of War style
The playable 3D environment will be (mostly) a large open area of a city that will have interactive elements, such as doors that open when you walk up to them
The player will traverse the game world getting involved in different scenarios depending on the path that he makes as he moves along towards his goal
We will be creating our own custom AI system for enemies
There will be custom assets of our own creation added into it to provide a unique experience for players
For now, despite being very broad, this brief is good enough for us to make a start on as we can begin exploring the very vast UDK functionality to accommodate some of the preceding goals and work our way towards some of the finer details of the game.
I will be returning to this key game idea throughout each subsequent chapter to discuss what progress we have made and, more importantly, how it is all fitting together into one cohesive gaming experience.
Let's see if you can answer these questions, you should be able to answer all of these just by reading this first introductory chapter.
1. Which of the following iOS devices are NOT supported by UDK?
b. iPhone 2G
c. iPad 2
d. iPad (third Generation)
2. How do we find our IP address?
a. It's already provided for us in the UDK Remote
b. The IPv4 address that we got from the ipconfig output earlier
c. Type in random numbers until it works
d. Use the Command Prompt to use the Link-Local IPv6 address
3. Where and how can we find example/sample maps that Epic Games has provided us with on UDK?
a. Epic doesn't provide examples
b. Download them separately on the UDK website
c. Look at tutorials on the Epic Game's Community Page
d. They are located in the Content | Maps | Mobile folder of our UDK install
4. How do we make sure the Mobile Previewer is customized to our own iOS device or change the screen orientation for our iOS game?
a. It is done automatically when we play the game by how it is held
b. It is a setting on the UDK Remote app we set up
c. It is found in the Edit mobile previewer settings
d. We cannot change which device is used
Hopefully you've enjoyed taking the first few steps towards becoming an iOS games developer with UDK!
There's still plenty to do, but we have already managed to cover the following in this chapter:
Learned about what UDK is
Seen what can/cannot be achieved with UDK using an example
Explored Epic Games' dedicated UDK website and download and install the application
Downloaded and installed the UDK Remote
An overview of what you will need to develop games with UDK on the iOS platform
Interfaced your device with UDK on your PC and used it for basic interaction with Mobile Previewer
Discussed the brief outline/concept of a basic, prototype game that we will be looking at in subsequent chapters
In the next chapter, we will delve deeper into using the UDK Editor (and doing a lot more than just playing with the UDK Remote and Mobile Previewer!), from learning about the basics of the interface of the application to adding the basic building blocks for your first shooter game.