Search public documentation:
- Unreal Engine 3: Mobile Overview
- Mobile Platforms
- Getting Started
- Streaming on mobile
- New Input Subsystem
- System Settings for Mobile
- Saving data on mobile
- Mobile Audio
- Mobile Textures
- Mobile Materials
- Network File Loader
- Basic Workflow
Developing games for mobile devices using Unreal Engine 3 requires tailoring certain aspects of the game's design and creation to fit within the guidelines, advantages, and limitations that are inherent to the mobile form factor. This document provides a general overview of some of the features of, and considerations that must be accounted for when developing on, mobile platforms.
Unreal Engine 3: Apple iOS Overview page. Unreal Engine 3: Android Overview page.
- Android support is available to full UE3 source licensees. If you are developing a UDK title and wish to explore moving from UDK to UE3 in order to target additional platforms, please contact the sales team at Epic to discuss our competitive terms and licensing options.
Information on setting up your development environment for compiling for mobile devices including hardware and software requirements, as well as general workflows for deploying and debugging an Unreal project that runs on a mobile platform can be found on the Getting Started: Developing Mobile Projects page.
Asynchronous level streaming is supported on mobile devices. See this page about the current state of texture streaming.
See this page for information about the whole new input system needed for multi-touch and tilt support.
Mobile devices are much more varied for a given platform than others. There is one single Xbox 360. There are 5 (and counting) iOS devices that will run a UE3-powered application. As such, the .ini-driven SystemSettings concept had to adapt. It is still .ini driven, but there are multiple sections in your Engine.ini file, and the appropriate section will be used for the device that is being used. Additionally, the mobile previewer can be directed to use a particular device's settings, so you can see the effects of your changes very quickly. BaseEngine.ini contains defaults for iOS devices for all games. Your game's DefaultEngine.ini can override these as usual. You can see in BaseEngine.ini, in say the [SystemSettingsIPhone3GS] section, that the SystemSettings now have a "BasedOn" tag. This creates a hierarchy of settings so that you can easily apply a change to all devices for your game, and then override only particular settings for each platform. Currently, the all platforms except the iPhone 4 (which has double the memory) has reduced texture sizes, using the [SystemSettingsMobileTextureBias] section. There are many mobile-specific SystemSettings. See this page for a guide to mobile system settings.
With Epic Citadel, we aimed for 30 fps in the general case. It is possible to run at 60 fps, although you'd have to make content tradeoffs. There is an Engine.ini value that controls the max framerate:
[Engine.Engine] MaxSmoothedFrameRate=35 bSmoothFrameRate=TRUEFor 60 fps, change
MaxSmoothedFrameRateto 62. You can also disable
bSmoothFrameRateto let it go as fast as it can, but we do not recommend this, as the framerate may tend to bobble between to different framerates (20, 40, 20, 40, etc), which generally looks very bad.
There are currently three ways of saving data/game state on mobile devices:
MyObject = new SomeClass; MyObject.Value = 5; class'Engine'.static.BasicSaveObject(MyObject, "SaveGame.bin", true, 1);
MyObjectis the object variable to save.
"SaveGame.bin"is the name of the file to save.
truespecifies that FILEWRITE_SaveGame will be passed to CreateFileWriter (this must be true for iOS to be able to load the file later).
1is a game-specified version number, that can be used to not load older version files. To load the object later (to load save game, etc), you would do something very similar to the save case:
MyObject = new SomeClass; class'Engine'.static.BasicLoadObject(MyObject, "SaveGame.bin", true, 1);After this, MyObject.Value will now be 5. Note that only basic properties (ints, floats, strings, names, etc) and arrays/structs of basic properties will be saved. You can save an object pointer, but when loading, the object must already be in memory (it uses StaticFindObject on the pathname of the object, since object properties are stored as strings).
mobile SaveSetting <SettingName> <Value> mobile LoadSetting <SettingName> <DefaultValue>With this method, all settings are saved and loaded as strings. It will be up to the code that runs the console command to do any necessary conversion to/from a string. When loading, you specify a default value that will be returned if the setting has not been set yet:
local int SavedValue, LoadedValue; SavedValue = 10; ConsoleCommmand("mobile SaveSetting TestSetting " $ SavedValue); LoadedValue = int(ConsoleCommand("mobile LoadSetting TestSetting 1"));Mobile Kismet Reference for information on the Save/Load Values Kismet action.
See this page for information about sound effects and music information.
See this page for information about texture handling and processing on mobile platforms.
See this page for information about creating and modifying materials for mobile platforms.
Fog is controlled on a per-level/map basis. Fog volumes are not used. See this section for information on setting up fog.
The mobile framework introduces a cross-platform networked file loading system for the mobile devices. It greatly speeds up content iteration (as well as commandline modification). Once activated, all the user has to do is quit the game, rerun it, and it will copy over new files to the device.
- Run Unreal Frontend
- Go to the Game tab
- Ensure that "Use Networked File Loader" is set to true
- Perform a Sync one time.
- This will put a file in the app that has the IP Address of the machine running UFE
- Boot the game on the device
- This will copy files over the network to the phone
- It is not super fast copying over the network, but the Sync/install time is much faster
- If you change content:
- Cook as normal
- Quit the game
- Run the iPhone game (no need to touch iTunes)
- Newly updated files will be copied over
- If you only change the game's commandline:
- Go to Game tab
- Click the "Make Commandline" button
- Quit the game
- Run the game
- The new commandline will be applied
- This will be fixed via code in the future (if not using the file loader, the app could delete the cached files)
mobile previewer is the best option to quickly preview your game without needing to cook and sync to your device. Note that many shading effects such as mobile fog, mobile specular, and materials created using mobile switches will not display in the editor. This is because the editor uses Direct3D and mobile devices use OpenGL ES2 and require different shaders to display the effects.