Upload
actionvn
View
1.526
Download
3
Tags:
Embed Size (px)
Citation preview
CROSS-PLATFORM DEVELOPMENT ON MOBILE DEVICESTakaaki Mizuno
DeNA
Takaaki Mizuno• 15 years experience in Engineering.• Works to DeNA Co., Ltd and Oceans Inc.
How to develop the app both for iOS/Android ?
There are 2 options:
• Develop for both separately with different languages ( Objective-C / Java )
• Use cross-platform development environment and develop for both platform at once
Cross-Platform development environments
Are cross-platform dev denelopment envivonments workable ?
• Not good at least now• It’s ok for simple apps
Business Apps
• Not so badGames
Most important thing is…
To know the characteristics of each environment
Native Layer
Cross-platformEnvironment layer
Your code
Erase the differenceBut limit the capability sometimes
Business Apps• Pros
• Write once, run on both devices• No need to pass Apple’s review
• Cons• UI of both environments are totally different• Really slow
UI of both environments are different• Android have “hardware back key” and “Menu”• Positions of Tab Bar are different• Android devices have so many aspect ratios and screen
sizes.• You have to care about such differences in your code
Difficult to catch up with interface trends.
• Pull to refresh• Side menu
UIWebView based application for iOS
Really Slow
Why ?• Apple doesn’t allow to use JIT strategy
Chrome iOS version is SLOW
Facebook Application for iOS
Facebook will return to native
Game• Pros
• Write once, run on both devices• No need to pass Apple’s review
• Cons• UI of both environments are totally different• Really slow• Use JavaScript
User Interface• You don’t need to use native-like user interface
Speed• Compiling code to native ( Unity )• Preparing alternative Canvas ( appMobi )• Use OpenGL directly ( ngCore )
JavaScript• JavaScript for mobile application is totally different from
web app’s one ( such as using jQuery ).• JavaScript is not suitable for large scale development.
• Because it is difficult to find a bug.
But if you want to use JavaScript still…
Closure Compiler• Google’s answer for large scale JavaScript development• It optimizes the code and finds error in code.
DeNA’s answer
ngCore• JavaScript based Game development environment.
• Try https://developer.mobage.com/⇛
JSX• a faster, safer, easier alternative to JavaScript• JSX compilers compiles JSX code into JavaScript
interface Flyable {abstract function fly() : void;
}
abstract class Animal {function eat() : void {
log "An animal is eating!”;}
}
class Bat extends Animal implements Flyable {override function fly() : void {
log "A bat is flying!”;}
}
JSX
we are observing 4% to 27% increase in performance
Try it
http://jsx.github.com/
Arctic.js• Game engine for smartphone web browsers written in
JavaScript with HTML5 Canvas.• It provides ActionScript3 friendly APIs which Flash
developers are familiar to.
var keyFrame = new arc.anim.KeyFrameAnimation(12, 5, [new arc.anim.Timeline(this._yellowImg, {
1 : {visible:true},3 : {visible:false}
}),new arc.anim.Timeline(this._orangeImg, {
1 : {visible:true},5 : {visible:false}
}),new arc.anim.Timeline(this, {
1 : {scaleX:0.5, scaleY:0.5, transition:arc.anim.Transition.SINE_OUT},5 : {scaleX:3, scaleY:3}
})]);
Try it
http://denadev.github.com/Arctic.js/
ExGame• Converts Flash Lite 1.1 SWF into JavaScript and make it
executable on iOS/Android devices.
How to use ExGame• DeNA provides ExGame to the partner developers.• Please access to our development sites:
http://developer.dena.jp/mbga/en/