06   html5 and cocos2d-x
Upcoming SlideShare
Loading in...5
×
 

06 html5 and cocos2d-x

on

  • 1,254 views

kun hu (google) and shun lin

kun hu (google) and shun lin

Statistics

Views

Total Views
1,254
Views on SlideShare
1,251
Embed Views
3

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 3

http://www.slashdocs.com 3

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

06   html5 and cocos2d-x 06 html5 and cocos2d-x Presentation Transcript

  • Cocos2d-x & HTML5胡坤 Google Chrome/HTML5 开发技术推广经理林顺 Cocos2d-html5 核心开发者 Google Confidential and Proprietary 1
  • HTML5游戏引擎 之 资源加载 Google Confidential and Proprietary 2
  • Cocos2d-HTML5的设计思想 Google Confidential and Proprietary 3
  • HTML5游戏引擎 之 性能•  Update & Draw•  > 60帧 = Kill Browser•  Inner Timer à Fixed Tick•  Canvas in Canvas Google Confidential and Proprietary 4
  • Cocos2d-HTML5 内部时钟内部时钟的实现,保证固定的步长 Loop1 Loop2 Loop3 Loop n t0 t1 t2 t S =S0+ t *v; Google Confidential and Proprietary 5
  • HTML5游戏引擎 之 兼容性 Google Confidential and Proprietary 6
  • Cocos2d-HTML5的设计思想 Google Confidential and Proprietary 7
  • Cocos2d-HTML5的设计思想 Google Confidential and Proprietary 8
  • 林顺 Sean LinCocos2d-html5 核心开发者Cocos2d-x核心开发者! Google Confidential and Proprietary 9
  • Cocos2d-html5简介•  原生Javascript•  兼容cocos2d-x API•  兼容JS binding API•  MIT license! Google Confidential and Proprietary 10
  • Cocos2d-HTML5框架 Games Cocos2D Box2d Graphic Menu CocosDenshion Physics Audio Canvas WebGL DOM PC Mobile Phone Chrome Safari FireFox ...... Chrome Safari ...... ...... Google Confidential and Proprietary 11
  • 引擎支持的图层结构 Google Confidential and Proprietary 12
  • 游戏的发布 HTML5&GAMES cocos2d&html5For$HTML5,$Canvas$and$WebGL COCOS2D&HTML5cocos2d&js(binding Same%API,%Quick%Publish cocos2d&x(game( CANVAS resources Easy%Por)ng,%Low%cost Google Confidential and Proprietary 13
  • 跨平台性能 iOS Android WP Windows OS X Ubuntu Browser cocos2d-iphonecocos2d-android cocos2d-xna cocos2d-x 2dx lua binding cocos2d-html5 Google Confidential and Proprietary 14
  • Write once, run anywhere Games&Wri*en&in&JS JavaScript SAME&JS&API JS&API cocos2d4html5 JS&Binding cocos2d4? CANVAS Google Confidential and Proprietary 15
  • Cocos2d-HTML5特性•  -x,-iphone开发者的无缝过渡•  cocos or cc 名字空间•  使用、安装简单 Google Confidential and Proprietary 16
  • HelloWorld C++和JS代码对比 Google Confidential and Proprietary 17
  • 代码对比//C++// add "HelloWorld" splash screen" CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png"); pSprite->setPosition( ccp(size.width/2, size.height/2) );//JS// add "HelloWorld" splash screen”var pSprite = cc.Sprite.spriteWithFile(“HelloWorld.png");pSprite.setPosition( cc.ccp(size.width/2, size.height/2) ); Google Confidential and Proprietary 18
  • 俄罗斯方块Demo Google Confidential and Proprietary 19
  • Layer的继承和鼠标消息的处理 Google Confidential and Proprietary 20
  • 游戏的移植和开发C++ API: JS API:CCDirector cc.DirectorCCDirector::sharedDirector(); cc.Director.sharedDirector();CCDirector::sharedDirector()- cc.Director.sharedDirector() . >getWinSize(); getWinSize();CCScene cc.SceneCCLayer cc.LayerCCSprite cc.Sprite Google Confidential and Proprietary 21
  • RoadMap Alpha Beta Chrome Other Mobile Game Browsers Browsers 2012 DOMCanvas JS binding WebGL Menu Google Confidential and Proprietary 22
  • Google Confidential and Proprietary 23