Going Mobile by Nate Beck

Preview:

DESCRIPTION

Nate Beck covers some of the hurdles and headaches that Flash game developers encounter when they decide to take their games to mobile devices.

Citation preview

Going MobileBy Nate Beck

ADL, PFI... WTF?ADL - AIR Debug Launcher - Using ADL, you can run an application without first packaging and installing it.

ADT - AIR Developer Tool - ADT is a multi-purpose, command-line tool for developing AIR applications.

PFI - Packager For iPhone - Completely replaced by ADT.iOS - The OS for iPads, iPod Touch and iPhones

The Markets... that support Adobe Flash

$99 / year $25

$99 / year ¹ $0 $0

30% 30% 30% 30% 30%

5 1 3 2 11

~570,000

~395,000 ~30,400 ~3,030 ~4,000

Membership Fee

Revenue Split

Overall Difficulty 1(easy) to 10

(hard)Number of Apps

¹ At the moment, first year is freeSource - Apple App Store - http://148apps.biz/app-store-metrics/Source - Android Market - http://www.appbrain.com/stats/

Case Study – Word Wars

Build Process

ADTExecutable

Assets BAR

IPA

APK

Application DescriptorId

Version NumberRender ModeAuto OrientationAspect RatioFull ScreenOnscreen Keyboard BehaviorIcons PathsDevice ProfilePermissionsiPhone Settings

DEVICES SUCK

Your finger is not transparent

THIS NOT THIS

Devices do not have roll over or

roll out

TouchEvents are different than MouseEvents flash.ui.Multitouchflash.ui.MultitouchInputMode

Let’s not forget about gestures

flash.events.TransformGestureEvent

Use Enter Framenot Mouse Move

Screen Density!=

Screen Resolution

150 x 40 pixel button

Desktop monitor@100 dpi

= 1.5” x 0.4”

Galaxy Tab@160 dpi

= 0.9” x 0.25”

Droid 2@240 dpi

= 0.6” x 0.17”

iPhone 4@320 dpi

= 0.46” x 0.13”

Same pixel count, different physical sizes(Minimum recommended size: 0.25” x 0.25”)

Screen Density != Screen Resolution

3.5 inch diagonal screen

Same physical size, different pixel counts

Screen Density != Screen Resolution

Classification

160 DPI

Devices Most tabletsiPhone 3GS

Motorola Droid Pro

Mapped range

< 200 DPI

Typical range 132 DPI (iPad)to

181 DPI (HTC Hero)

240 DPI

Most Android phones

>= 200 DPI<= 280 DPI

217 DPI (HTC Evo)to

254 DPI (NexusOne)

320 DPI

iPhone 4

> 280 DPI

326 DPI (iPhone 4)

Screen Density != Screen Resolution

Devices have differing aspect ratios

Some devices have additional

stuff...

Capabilitiesflash.system.Capabilitie

s

Devices have orientations

StageOrientationEvent.ORIENTATION_CHANGINGstage.setOrientation( StageOrientation.UPSIDE_DO

WN );

AccelerometersGet your tilt on.

Emulators

Testing on the Device

!FAIL

WiFi Debug OnlyLong Build TimesMobile Provisions

Certificates

WiFi and USB DebugFaster Build Times

WiFi Debug OnlyDebug Tokens

Signing

Full Screen

Permissions(Android / Playbook)

android.permission.INTERNETandroid.permission.WRITE_EXTERNAL_STORAGEandroid.permission.READ_PHONE_STATEandroid.permission.ACCESS_FINE_LOCATIONandroid.permission.DISABLE_KEYGUARDandroid.permission.WAKE_LOCKandroid.permission.CAMERAandroid.permission.RECORD_AUDIOandroid.permission.ACCESS_NETWORK_STATEandroid.permission.ACCESS_WIFI_STATE

CPU vs GPU

CPU - blittingiOS - 20 FPS

Droid - 24 FPS

GPU - DisplayObjectiOS - 34 FPS

Droid - 32 FPS

Playbook is wicked fast

Molehill, Stage3D?“Stage3D for mobile is planned for middle of next year,

but we are working hard on it to make it more like beginning of next year”

- Thibault Imbert, Flash Player Product ManagerOctober 31, 2011

“Adobe AIR 3.2 release candidate is now available for download. This build introduces the Stage3D API to iOS and Android devices, enabling full hardware accelerated 2D and

3D graphics for mobile apps.”- Adobe Labs, compliments of Thibault

February 27, 2012

Hugs For Thibault

Use a Framework

ANT is your friend(or maven if you’re a cool

kid)

Build servers are awesome

+

Hosting your build servers

Your game can (and will) be interrupted,

at any timestage.addEventListener(Event.DEACTIVATE, onDeactivate);

stage.addEventListener(Event.ACTIVATE, onActive);

Piracy can be a problem

Please use Version Control... please

Questions?

Nate BeckPrincipal Architect

@jnbecknate@zaalabs.com

Thanks!

blog.natebeck.net

Recommended