Download - Adobe AIR and iOS Mobile Games 2016
![Page 1: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/1.jpg)
AIR & iOS Mobile Games
![Page 2: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/2.jpg)
Overview
A little about meMemory saving tipsPerformance bottlenecksDevelopment bottlenecksANEs and what you need to knowApplication XMLQ&A
![Page 3: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/3.jpg)
About me
![Page 4: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/4.jpg)
About me
Currently:Principal Programmer at MovieStarPlanetBased in Copenhagen, Denmark
Previously:Worked on PC, Nintendo DS and PlayStation 2 games
![Page 5: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/5.jpg)
About this talk
Familiar with Stage3D
Familiar with Adobe Scout
Somewhat familiar with iTunesConnect
![Page 6: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/6.jpg)
Memory Saving Tips
![Page 7: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/7.jpg)
Object Pooling
Memory allocation in iOS is very slow
The problem is that it doesn’t show up during PC development
![Page 8: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/8.jpg)
Object Pooling
DragonBones on Mobile
![Page 9: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/9.jpg)
Object Pooling
169 ms in garbage collection
![Page 10: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/10.jpg)
Object Pooling
Use ObjectPooling to prevent garbage collection
Richard Lord’s Object Pooling classGary Paluk’s Object Pooling class
![Page 11: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/11.jpg)
Object Pooling2,897ms down to 695ms
GC No longer #1 concern!
![Page 12: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/12.jpg)
Problems with Built in functions
Array.sort()Array.sortOn()Matrix3D.decompose()
Sergey Gonchar’s implementation
Vector.splice()Adobe’s update with insertAt() & removeAt() in AIRSDK 19
![Page 13: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/13.jpg)
Memory Saving Tips
Stay away from “new” in your game update loop or places that get called every frame
![Page 14: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/14.jpg)
Memory Saving Tips
At look through Scout
![Page 15: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/15.jpg)
Memory Saving Tips
Looking at the code (Main::CheckCollisions)
![Page 16: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/16.jpg)
Memory Saving Tips
![Page 17: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/17.jpg)
Memory Saving Tips
No more allocations :) (sort of)
![Page 18: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/18.jpg)
Memory Saving tips
Using out paramsShows library cares about memory usage
Prevents unnecessary allocations
If you’re writing an API, keep this in mind
![Page 19: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/19.jpg)
Memory Saving tips
Sprite sheetsGood for custom move sets
Good for low resolution devices
Great for performance, UV updates only
Does not scale well with hundreds of animations
![Page 20: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/20.jpg)
Memory Saving Tips
Frameworks such as DragonBones are here to help you
![Page 21: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/21.jpg)
Performance Bottlenecks
![Page 22: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/22.jpg)
Performance Bottlenecks
Bitmap fonts and breaking a draw call
Further reading
![Page 23: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/23.jpg)
Performance Bottlenecks
Bitmap fonts and breaking a draw call
Bitmap fonts are stored in a texture
Your spritesheet is in another texture
![Page 24: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/24.jpg)
Performance Bottlenecks
Same draw call
Potential draw back is limited character set
![Page 25: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/25.jpg)
Performance Bottlenecks
Using TexturePacker, create your SpriteSheet
Use a SubTexture to grab the Font Texture
Pass that into Starling’s TextField.registerBitmapFont()
![Page 26: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/26.jpg)
Performance Bottlenecks
Further reading:Batch, Batch, Batch!
![Page 27: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/27.jpg)
Development Bottlenecks
![Page 28: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/28.jpg)
Uploading Builds
Building to device
Build Types
Provisioning Profiles
![Page 29: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/29.jpg)
Can take a few minutes to compile
Building to deviceNeed to compile ad-hoc builds (from FlashDevelop)
Depending on AIR SDK, no automatic installation on device -> Need additional tools
![Page 30: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/30.jpg)
idb.exe
Can be found at:AIRSDK\lib\aot\bin\iOSBin
You can upload builds directly to your iOS device using this (and other useful things)
![Page 31: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/31.jpg)
Interpreter, Ad-Hoc & App Store builds
Interpreter : Very fast to build, runs slow on device
Ad-hoc : Slow to build, for development only (with device UUIDs registered on Apple Developer account)
App Store Build : Final build submitted to Apple via Application Loader
Pro tip: Build to Android first, much faster iteration times!
![Page 32: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/32.jpg)
Provisioning Profiles
What they do:
Ad Hoc: Install on registered devices
Debug profile: Allows you to use Test Flight
Generating that p12 key
App Store: Profile which app is built to be submitted to App Store
![Page 33: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/33.jpg)
Get an iPad AIR
Runs interpreter builds at an acceptable rate
Bonus: interpreter-debug builds can be debugged if on same Local Area Network! Great for finding exceptions!
![Page 34: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/34.jpg)
ANEs
![Page 35: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/35.jpg)
ANEs and what you need to know
iOS and 64-bit
Recommended ANE makers
In App Purchases
![Page 36: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/36.jpg)
ANEs and what you need to know
iOS and 64-bit
![Page 37: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/37.jpg)
64 bit iOS builds
Your app’s code is duplicated
Found at 0x00DF19D0 and at 0x020CAF80
About 19MB apart in this case.
![Page 38: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/38.jpg)
64 bit iOS builds
Need to be careful with embedded assets, since they will be duplicated in your code
![Page 39: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/39.jpg)
ANEs and what you need to knowWhat does this mean for developers?
Additional libraries needed
Backwards compatibility makes your IPA grow in size (possibly double)
Need to keep up with the platform requirements (Android & iOS)
Highly recommend AIRNativeExtensions by Distriqt
![Page 40: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/40.jpg)
ANEs and what you need to know
In App purchases
![Page 41: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/41.jpg)
ANEs
Low Memory Warnings
![Page 42: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/42.jpg)
ANEs
Low Memory ANE:https://github.com/distriqt/ANE-Memory
![Page 43: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/43.jpg)
Application XML
![Page 44: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/44.jpg)
Application XML
Various compilation parameters
Test Flight on iTunes Connect
AppStore review
![Page 45: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/45.jpg)
Application XML
Various compilation parameters
rendermode : direct
depthAndStencil: true
![Page 46: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/46.jpg)
Application XMLTest Flight on iTunesConnect
No longer need device UUIDs
Can potentially test on hundreds of Beta testers
Additional application.xml parameters needed
More info here
![Page 47: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/47.jpg)
AppStore review
http://appreviewtimes.com/
Updating your app
iOS versions with AIR SDK versions & some examples of what could go wrong
![Page 48: Adobe AIR and iOS Mobile Games 2016](https://reader031.vdocuments.net/reader031/viewer/2022022412/58f09dd71a28abb83c8b4595/html5/thumbnails/48.jpg)
Questions?@jav_dev