Native Code is Dead AKA Cross Platform Development with Unity 3D
-
Upload
ralph-barbagallo -
Category
Technology
-
view
780 -
download
1
description
Transcript of Native Code is Dead AKA Cross Platform Development with Unity 3D
Na#ve Code is Dead AKA Cross Pla2orm Development with Unity3D
Ralph Barbagallo Founder, FLARB LLC
2001
2007
2008
The Pla2orm Problem
20XX…
Choosing A Solu#on • Most Pla9orms With Least Code
• Licensing Model That Won’t Eat Margins
• Broad Community Support
HTML5 • HTML5 Frameworks • PhoneGap • GameSalad • Game Closure, AppMobi, Ludei
• HTML5 SHll Sucks • Horrible Performance • Gated by mobile browsers
Cocos2d • Cocos2d-‐X • Straight C++ version of Cocos2d • Great 2D library, widely used • Amazing updates and support • No web support
Flash / Adobe AIR • Flash isn’t dead! • Use Flash, FlashBuilder, etc. • AIR NaHve Extensions • Flash game engines • Starling
Unreal Developer’s Kit • Don’t need a Mac! • Top of the line renderer • 25% of revenue to Epic • Weak pla9orm-‐specific support
Other Op#ons • Titanium Studio • Corona • GameMaker • Stencyl • Marmalade
Why I Chose Unity3D: Tech • Best support for criHcal pla9orms • Mobile (iOS, Android, etc.) • Web (NaCL, Web Player, Flash) • Desktop (Steam, Mac App Store, Win8) • Console
Tech • NaHve Plug-‐ins • Can support any pla9orm-‐specific funcHonality • Amazon App Store • Google Play Game Services • Write your own naHve plug-‐in
Support • Awesome forums • Awesome feedback from support • Twi]er!
Asset Store
Business Model • Flat fee per-‐seat (‘perpetual’) • Monthly SubscripHon • No rev-‐share
Brick Buddies
Camera Birds
iOS to Android with Unity3D
Plug-‐ins • Used mostly cross-‐pla9orm plug-‐ins
• Access pla9orm specific features (IAP, etc.)
Pla2orm Specific Code • Only spent a few days of re-‐factoring
• Swapped out iOS plug-‐ins for Android
• RunHme pla9orm checks and #IF compiler direcHves
• AndroidJavaClass!
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");!!
Screen Sizes • iOS has 3 aspect raHos to deal with
• Made interface work in “safe zone”
• For Android’s common 16:10 raHo, scaled NGUI interface to fit
Android Fragmenta#on
Performance and Tes#ng
Cross Pla2orm Export Tools • Per-‐Pla9orm Asset Sehngs • Compression sehngs • Filtering
• Cache Server
• MulH-‐Pla9orm Toolkit • Build-‐Hme asset changes
In Summary • Best Business Model
• Widest Pla9orm Support
• Best Community Support
• Dead Simple PorHng Process
Thanks! Email: [email protected] Twi]er: @flarb Blog: www.ralphbarbagallo.com Site: www.flarb.com