Going Mobile - Flash Gaming Summit 2012

45
Going Mobile By Nate Beck

description

Nate Beck's slides for Going Mobile at Flash Gaming Summit 2012

Transcript of Going Mobile - Flash Gaming Summit 2012

Page 1: Going Mobile - Flash Gaming Summit 2012

Going Mobile By Nate Beck

Page 2: Going Mobile - Flash Gaming Summit 2012

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

Page 3: Going Mobile - Flash Gaming Summit 2012

The Markets ... that support Adobe Flash

Page 4: Going Mobile - Flash Gaming Summit 2012

$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 free Source - Apple App Store - http://148apps.biz/app-store-metrics/ Source - Android Market - http://www.appbrain.com/stats/

Page 5: Going Mobile - Flash Gaming Summit 2012

Case Study – Word Wars

Page 6: Going Mobile - Flash Gaming Summit 2012
Page 7: Going Mobile - Flash Gaming Summit 2012
Page 8: Going Mobile - Flash Gaming Summit 2012
Page 9: Going Mobile - Flash Gaming Summit 2012
Page 10: Going Mobile - Flash Gaming Summit 2012
Page 11: Going Mobile - Flash Gaming Summit 2012

Build Process

ADT Executable

Assets BAR

IPA

APK

Page 12: Going Mobile - Flash Gaming Summit 2012

Application Descriptor Id Version Number Render Mode Auto Orientation Aspect Ratio Full Screen Onscreen Keyboard Behavior Icons Paths Device Profile Permissions iPhone Settings

Page 13: Going Mobile - Flash Gaming Summit 2012

DEVICES SUCK

Page 14: Going Mobile - Flash Gaming Summit 2012

Your finger is not transparent

THIS NOT THIS

Page 15: Going Mobile - Flash Gaming Summit 2012

Devices do not have roll over or roll out

Page 16: Going Mobile - Flash Gaming Summit 2012

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

Page 17: Going Mobile - Flash Gaming Summit 2012

Let’s not forget about gestures

flash.events.TransformGestureEvent

Page 18: Going Mobile - Flash Gaming Summit 2012

Use Enter Frame not Mouse Move

Page 19: Going Mobile - Flash Gaming Summit 2012

Screen Density !=

Screen Resolution

Page 20: Going Mobile - Flash Gaming Summit 2012

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

Page 21: Going Mobile - Flash Gaming Summit 2012

3.5 inch diagonal screen

Same physical size, different pixel counts

Screen Density != Screen Resolution

Page 22: Going Mobile - Flash Gaming Summit 2012

Classification 160 DPI Devices Most tablets

iPhone 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

Page 23: Going Mobile - Flash Gaming Summit 2012

Devices have differing aspect ratios

Page 24: Going Mobile - Flash Gaming Summit 2012

Some devices have additional stuff...

Page 25: Going Mobile - Flash Gaming Summit 2012

Capabilities flash.system.Capabilities

Page 26: Going Mobile - Flash Gaming Summit 2012

Devices have orientations

StageOrientationEvent.ORIENTATION_CHANGING stage.setOrientation( StageOrientation.UPSIDE_DOWN );

Page 27: Going Mobile - Flash Gaming Summit 2012

Accelerometers Get your tilt on.

Page 28: Going Mobile - Flash Gaming Summit 2012

Emulators

Page 29: Going Mobile - Flash Gaming Summit 2012

Testing on the Device !FAIL

WiFi Debug Only Long Build Times Mobile Provisions

Certificates

WiFi and USB Debug Faster Build Times

WiFi Debug Only Debug Tokens

Signing

Page 30: Going Mobile - Flash Gaming Summit 2012

Full Screen

Page 31: Going Mobile - Flash Gaming Summit 2012

Permissions (Android / Playbook)

android.permission.INTERNET android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE android.permission.ACCESS_FINE_LOCATION android.permission.DISABLE_KEYGUARD android.permission.WAKE_LOCK android.permission.CAMERA android.permission.RECORD_AUDIO android.permission.ACCESS_NETWORK_STATE android.permission.ACCESS_WIFI_STATE

Page 32: Going Mobile - Flash Gaming Summit 2012

CPU vs GPU

CPU - blitting iOS - 20 FPS

Droid - 24 FPS

GPU - DisplayObject iOS - 34 FPS

Droid - 32 FPS

Page 33: Going Mobile - Flash Gaming Summit 2012

Playbook is wicked fast

Page 34: Going Mobile - Flash Gaming Summit 2012

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 Manager

October 31, 2011

Page 35: Going Mobile - Flash Gaming Summit 2012

“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

Page 36: Going Mobile - Flash Gaming Summit 2012

Hugs For Thibault

Page 37: Going Mobile - Flash Gaming Summit 2012

Use a Framework

www.smash.io

Page 38: Going Mobile - Flash Gaming Summit 2012

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

Page 39: Going Mobile - Flash Gaming Summit 2012

Build servers are awesome

+

Page 40: Going Mobile - Flash Gaming Summit 2012

Hosting your build servers

Page 41: Going Mobile - Flash Gaming Summit 2012

Your game can (and will) be interrupted, at any time

stage.addEventListener(Event.DEACTIVATE, onDeactivate); stage.addEventListener(Event.ACTIVATE, onActive);

Page 42: Going Mobile - Flash Gaming Summit 2012

Piracy can be a problem

Page 43: Going Mobile - Flash Gaming Summit 2012

Please use Version Control... please

Page 44: Going Mobile - Flash Gaming Summit 2012

Questions?

Page 45: Going Mobile - Flash Gaming Summit 2012

Nate Beck Principal Architect

@jnbeck [email protected]

Thanks!

blog.natebeck.net