iOS and Android Development with Unity3D

28
iOS and Android development with Unity3D Ralph Barbagallo Founder, FLARB LLC

description

This is my GDCO 2012 presentation.

Transcript of iOS and Android Development with Unity3D

Page 1: iOS and Android Development with Unity3D

iOS and Android development with Unity3D Ralph Barbagallo Founder, FLARB LLC

Page 2: iOS and Android Development with Unity3D

Who am I?

Page 3: iOS and Android Development with Unity3D

The Platform Problem

Page 4: iOS and Android Development with Unity3D

Why bother with Android?

Page 5: iOS and Android Development with Unity3D

The Android Customer

Page 6: iOS and Android Development with Unity3D

Future Platform Shifts

Page 7: iOS and Android Development with Unity3D

Choosing A Solution

•  Most Platforms With Least Code

•  Licensing Model That Won’t Eat Margins

•  Broad Community Support

Page 8: iOS and Android Development with Unity3D

HTML5

•  HTML5 Frameworks •  PhoneGap •  GameSalad •  Game Closure, AppMobi, etc.

•  HTML5 Still Sucks •  Horrible performance •  Gated by mobile browsers

Page 9: iOS and Android Development with Unity3D

Cocos2d

•  Cocos2d-X •  Straight C++ version of Cocos2d •  Great 2D library, widely used •  Amazing updates and support •  No web support

Page 10: iOS and Android Development with Unity3D

Unreal Developer’s Kit

•  UDK •  Don’t need a Mac! •  Much better renderer (As of Unity 3.5) •  Platform-specific features from Epic only •  25% of your revenue to Epic

Page 11: iOS and Android Development with Unity3D

Cross Platform Options: Misc.

•  Others •  Titanium Studio •  Corona •  Flash

Page 12: iOS and Android Development with Unity3D

Why I Chose Unity3D: Tech

•  Best support for critical platforms •  Mobile (iOS, Android) •  Web (NaCL, Flash, Web Player) •  Desktop (Steam, Mac App Store) •  Console

Page 13: iOS and Android Development with Unity3D

Tech

•  Native Plug-ins •  Can support any platform-specific

functionality •  Amazon App Store •  OpenFeint •  Write your own plug-in for whatever you need

Page 14: iOS and Android Development with Unity3D

Support

•  Awesome forums •  Awesome feedback from support •  Twitter!

Page 15: iOS and Android Development with Unity3D

Asset Store

Page 16: iOS and Android Development with Unity3D

Business Model

•  Business Model •  Flat fee per-seat •  No rev-share

Page 17: iOS and Android Development with Unity3D

Brick Buddies

Page 18: iOS and Android Development with Unity3D

Camera Birds

Page 19: iOS and Android Development with Unity3D

iOS to Android with Unity3D

Page 20: iOS and Android Development with Unity3D

Plug-ins

•  Used mostly cross-platform plug-ins •  Access platform specific features (Game Center etc.)

Page 21: iOS and Android Development with Unity3D

Platform Specific Code

•  Only spent a few days of re-factoring

•  Swapped out iOS plug-ins for Android

•  Combination of runtime platform checks and #IF compiler directives

•  AndroidJavaClass!

Page 22: iOS and Android Development with Unity3D

AndroidJavaClass

AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity")!!mWindowManager = activity.Call<AndroidJavaObject>("getSystemService","window");!

! ! ! !!mConfig = activity.Call<AndroidJavaObject>("getResources").Call<AndroidJavaObject>("getConfiguration");!

Page 23: iOS and Android Development with Unity3D

Screen Sizes

•  iOS has 3 aspect ratios to deal with •  Made interface work in “safe zone”

•  For Android’s common 16:10 ratio, scaled NGUI interface to fit

Page 24: iOS and Android Development with Unity3D

Performance and Testing

Page 25: iOS and Android Development with Unity3D

Unity’s Android Test Devices

Unity at SIGGRAPH 2012: •  Nexus One (Adreno 205) •  Samsung Galaxy S 2 (Mali 400) •  Nexus S / Galaxy Nexus (SGX 540) •  Motorola Xoom (Tegra2)

Page 26: iOS and Android Development with Unity3D

Cross Platform Export Tools

•  Per-Platform Asset Settings •  Compression settings •  Filtering

•  Cache Server •  Multi-Platform Toolkit

•  Platform-specific assets •  Build-time asset changes

Page 27: iOS and Android Development with Unity3D

In Summary

•  Best Business Model

•  Widest Platform Support

•  Best Community Support

•  Dead Simple Porting Process

Page 28: iOS and Android Development with Unity3D

Thanks

Email: [email protected] Twitter: @flarb Blog: www.ralphbarbagallo.com Site: www.flarb.com