SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
Put People First 以人为本




基于cocos2d-x for XNA的
Windows Phone游戏开发


全新 ・ 全易
徐玉涛 Tory Xu
技术平台合作经理
开发工具与平台事业部
微软(中国)有限公司
toryxu@microsoft.com
微博:@徐玉涛Tory Xu         欢迎
以人为本 —— 联接消费者与开发者"
     不同的设备,⼀一致的体验




       统⼀一的开发平台
Windows Phone
  全新 · 全易
游戏开发者的 全新 · 全易 "

              90%
       市场机会



全新     设备规格



       工具体系



全易     游戏框架
Cocos2d-x for XNA"

 Hello World
                      C# with XNA                50%

               Windows Phone 7.5                工作量




                http://download.cocos2d-x.org
                                                   MIT
                                                 License
               开放下载                             开源
春”Phone”
           开发者计划



8个第三方开发者
SDK版开放下载
张小明"
Cocos2d-x核心开发者
xiaoming.zhang@cocos2d-x.org   走进
                               cocos2d-x
                               for XNA
主要内容"

Ø Cocos2d-x for XNA与cocos2d-x的关系
Ø Cocos2d-x for XNA提供哪些功能,怎么用
Ø Cocos2d-x          cocos2d-x for XNA
Cocos2d-x for XNA与cocos2d-x关系"

class Engine: public API                class API
{                                       {
 public :                                   virtual void
    string language;                    addChild(CCNode*)=0;
    string supportPlatforms;                 …
};                                      };

// language = “c++”
// supportPlatforms = “iOS Android …”   // language = “c#”
class cocos2d-x: public Engine          // supportPlatfroms = “windows
{                                       phone7”
public :                                class cocos2d-x_for_xna : public
      virtual void addChild(CCNode*);   Engine
};                                      {
                                        public :
                                              virtual void addChild(CCNode*);
                                        };
Cocos2d-x for XNA提供的功能"

Ø 显示图片
Ø 动画效果
Ø 粒子效果
Ø 显示文本
Ø 添加菜单
Ø 播放音乐音效
…
显示图片"
// c++
CCSprite *pSprite = CCSprite::spriteWithFile(“helloworld.png”);
pSprite->setPosition(ccp(100, 100));
addChild(pSprite);



// c#
CCSprite sprite = CCSprite.spriteWithFile(“helloworld”);
sprite.position = new CCPoint(100, 100);
addChild(sprite);
动画效果"
// c++
CCMoveTo *moveTo = CCMoveTo::actionWithDuration(2, ccp(50, 50));
pSprite->runAction(moveTo);


// c#
CCMoveTo moveTo = CCMoveTo.actionWithDuration(2, new CCPoint(50, 50));
sprite.runAction(moveTo);
粒子效果"
// c++
CCParticleSystem *particle = CCParticleFlower::node();
particle->setTexture(pSprite->getTexture());
particle->setPosition(ccp(100, 100));
addChild(particle);


// c#
CCParticleSystem particle = new CCParticleFlower();
particle.texture = sprite.texture;
particle.position = new CCPoint(100, 100);
addChild(particle);
显示文本"
// c++
CCLabelTTF *pLabel = CCLabelTTF::labelWithString(“hello”, “Arial”, 20);
pLabel->setPosition(ccp(100, 100));
addChild(pLabel);


// c#
CCLabelTTF label = CCLabelTTF.labelWithString(“hello”, “Arial”, 20);
label.position = new CCPoint(100, 100);
addChild(label);
添加菜单"
// c++
SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“bg.mp3”);
CCMenuItemLabel *pItemLabel = CCMenuItemLabel::itemWithLabel(“item”);
SimpleAudioEngine::sharedEngine()->playEffect(“effect.ogg”);
CCMenu *pMenu = CCMenu::menuWithItems(pItemLabel, NULL);
pMenu->setPosition(ccp(100, 100));
// c#
addChild(pMenu);
SimpleAudioEngine.sharedEngine().playBackgroundMusic(“bg”);
SimpleAudioEngine.sharedEngine().playEffect(“effect”);
// c#
CCMenuItemLabel itemLabel = CCMenuItemLabel.itemWithLabel(“item”);
CCMenu menu = CCMenu.menuWithItems(itemLabel);
menu.position = new CCPoint(100, 100);
addChild(menu);
播放音效"
// c++
SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“bg.mp3”);
SimpleAudioEngine::sharedEngine()->playEffect(“effect.ogg”);


// c#
SimpleAudioEngine.sharedEngine().playBackgroundMusic(“bg”);
SimpleAudioEngine.sharedEngine().playEffect(“effect”);
Cocos2d-x移植到cocos2d-x for
XNA
相同点:
1.  接口相同
2.  引擎框架相同
3.  同样的社区支持


不同点(语言差异):
1.  内存管理
2.  成员变量访问
3.  资源访问
4.  微软、诺基亚的大力支持
徐玉涛
toryxu@microsoft.com


张小明
xiaoming.zhang@cocos2d-x.org




谢谢 Thanks

Más contenido relacionado

Destacado

Catàleg d'Ofertes BEEP Març 2015
Catàleg d'Ofertes BEEP Març 2015Catàleg d'Ofertes BEEP Març 2015
Catàleg d'Ofertes BEEP Març 2015Beep Informática
 
Morocco mgf - open data
Morocco mgf - open dataMorocco mgf - open data
Morocco mgf - open dataRichard Kerby
 
Public Administration Counrry Studies
Public Administration Counrry StudiesPublic Administration Counrry Studies
Public Administration Counrry StudiesRichard Kerby
 
Ramesh Krishnamurthy, CTO at World DevOps Summit 2016
Ramesh Krishnamurthy, CTO at World DevOps Summit 2016Ramesh Krishnamurthy, CTO at World DevOps Summit 2016
Ramesh Krishnamurthy, CTO at World DevOps Summit 2016Indium Software
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonHamed Hatami
 
Real estate management solution for new age
Real estate management solution for new ageReal estate management solution for new age
Real estate management solution for new ageEmil Garipov
 
[Stp]노스페이스바람막이
[Stp]노스페이스바람막이[Stp]노스페이스바람막이
[Stp]노스페이스바람막이eunbi0915
 
Tapping into the Agility of Knowledge Networks and Communities
Tapping into the Agility of Knowledge Networks and CommunitiesTapping into the Agility of Knowledge Networks and Communities
Tapping into the Agility of Knowledge Networks and Communities4Good.org
 
Javascript Dependency Management
Javascript Dependency ManagementJavascript Dependency Management
Javascript Dependency ManagementSean Duncan
 
Redome juan bosch
Redome juan boschRedome juan bosch
Redome juan boschhilario1234
 
Idc Insights Overview 2012
Idc Insights Overview 2012Idc Insights Overview 2012
Idc Insights Overview 2012shirman
 

Destacado (17)

Catàleg d'Ofertes BEEP Març 2015
Catàleg d'Ofertes BEEP Març 2015Catàleg d'Ofertes BEEP Març 2015
Catàleg d'Ofertes BEEP Març 2015
 
January 2013 Inspired by Genesis
January 2013 Inspired by GenesisJanuary 2013 Inspired by Genesis
January 2013 Inspired by Genesis
 
Morocco mgf - open data
Morocco mgf - open dataMorocco mgf - open data
Morocco mgf - open data
 
Public Administration Counrry Studies
Public Administration Counrry StudiesPublic Administration Counrry Studies
Public Administration Counrry Studies
 
Ramesh Krishnamurthy, CTO at World DevOps Summit 2016
Ramesh Krishnamurthy, CTO at World DevOps Summit 2016Ramesh Krishnamurthy, CTO at World DevOps Summit 2016
Ramesh Krishnamurthy, CTO at World DevOps Summit 2016
 
Colusion
ColusionColusion
Colusion
 
D4
D4D4
D4
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 
Real estate management solution for new age
Real estate management solution for new ageReal estate management solution for new age
Real estate management solution for new age
 
Grupo restaurante
Grupo restauranteGrupo restaurante
Grupo restaurante
 
[Stp]노스페이스바람막이
[Stp]노스페이스바람막이[Stp]노스페이스바람막이
[Stp]노스페이스바람막이
 
Tapping into the Agility of Knowledge Networks and Communities
Tapping into the Agility of Knowledge Networks and CommunitiesTapping into the Agility of Knowledge Networks and Communities
Tapping into the Agility of Knowledge Networks and Communities
 
Javascript Dependency Management
Javascript Dependency ManagementJavascript Dependency Management
Javascript Dependency Management
 
D7
D7D7
D7
 
Redome juan bosch
Redome juan boschRedome juan bosch
Redome juan bosch
 
Grupo restaurante
Grupo restauranteGrupo restaurante
Grupo restaurante
 
Idc Insights Overview 2012
Idc Insights Overview 2012Idc Insights Overview 2012
Idc Insights Overview 2012
 

Similar a 09 creating windows phone game with cocos2d-xna

使用Cocos2d-x的手机游戏开发
使用Cocos2d-x的手机游戏开发使用Cocos2d-x的手机游戏开发
使用Cocos2d-x的手机游戏开发Peng Guo
 
Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲csdnmobile
 
Introduction to corona sdk
Introduction to corona sdkIntroduction to corona sdk
Introduction to corona sdk馬 萬圳
 
Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門Chui-Wen Chiu
 
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台Shengyou Fan
 
Xcode tutorial
Xcode tutorialXcode tutorial
Xcode tutorialMarch Liu
 
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境Will Huang
 
基于Eclipse和hadoop平台应用开发入门手册
基于Eclipse和hadoop平台应用开发入门手册基于Eclipse和hadoop平台应用开发入门手册
基于Eclipse和hadoop平台应用开发入门手册Zhen Li
 
Game development using monogame
Game development using monogameGame development using monogame
Game development using monogamePower Wu
 
基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映heyfluke
 
基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映heyfluke
 
10 multi-platform game development using cocos2d-x
10   multi-platform game development using cocos2d-x10   multi-platform game development using cocos2d-x
10 multi-platform game development using cocos2d-x乐费 胡
 
GDC Taipei Summit review 2012
GDC Taipei Summit review 2012GDC Taipei Summit review 2012
GDC Taipei Summit review 2012Victor Lee
 
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具HO-HSUN LIN
 
Windows Mobile 多媒體應用程式開發
Windows Mobile 多媒體應用程式開發Windows Mobile 多媒體應用程式開發
Windows Mobile 多媒體應用程式開發Chui-Wen Chiu
 
程式人雜誌 -- 2013年2月號
程式人雜誌 -- 2013年2月號程式人雜誌 -- 2013年2月號
程式人雜誌 -- 2013年2月號鍾誠 陳鍾誠
 

Similar a 09 creating windows phone game with cocos2d-xna (20)

使用Cocos2d-x的手机游戏开发
使用Cocos2d-x的手机游戏开发使用Cocos2d-x的手机游戏开发
使用Cocos2d-x的手机游戏开发
 
Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲
 
Introduction to corona sdk
Introduction to corona sdkIntroduction to corona sdk
Introduction to corona sdk
 
Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門
 
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
 
XNA遊戲程式框架
XNA遊戲程式框架 XNA遊戲程式框架
XNA遊戲程式框架
 
Xcode tutorial
Xcode tutorialXcode tutorial
Xcode tutorial
 
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
 
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratchBuild Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
 
基于Eclipse和hadoop平台应用开发入门手册
基于Eclipse和hadoop平台应用开发入门手册基于Eclipse和hadoop平台应用开发入门手册
基于Eclipse和hadoop平台应用开发入门手册
 
Game development using monogame
Game development using monogameGame development using monogame
Game development using monogame
 
基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映
 
基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映基于Android ndk的软件开发简介 放映
基于Android ndk的软件开发简介 放映
 
10 multi-platform game development using cocos2d-x
10   multi-platform game development using cocos2d-x10   multi-platform game development using cocos2d-x
10 multi-platform game development using cocos2d-x
 
LLVM introduction
LLVM introductionLLVM introduction
LLVM introduction
 
GDC Taipei Summit review 2012
GDC Taipei Summit review 2012GDC Taipei Summit review 2012
GDC Taipei Summit review 2012
 
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
 
Windows Mobile 多媒體應用程式開發
Windows Mobile 多媒體應用程式開發Windows Mobile 多媒體應用程式開發
Windows Mobile 多媒體應用程式開發
 
Android_lecture_000
Android_lecture_000Android_lecture_000
Android_lecture_000
 
程式人雜誌 -- 2013年2月號
程式人雜誌 -- 2013年2月號程式人雜誌 -- 2013年2月號
程式人雜誌 -- 2013年2月號
 

Más de 乐费 胡

神仙道移动Ui演变
神仙道移动Ui演变神仙道移动Ui演变
神仙道移动Ui演变乐费 胡
 
08 gaming framework design based on cocos2d-x
08   gaming framework design based on cocos2d-x08   gaming framework design based on cocos2d-x
08 gaming framework design based on cocos2d-x乐费 胡
 
07 funny sango td and cocos2d-x
07   funny sango td and cocos2d-x07   funny sango td and cocos2d-x
07 funny sango td and cocos2d-x乐费 胡
 
06 html5 and cocos2d-x
06   html5 and cocos2d-x06   html5 and cocos2d-x
06 html5 and cocos2d-x乐费 胡
 
05 optimization of cocos2d-x games on x86 architecture
05   optimization of cocos2d-x games on x86 architecture05   optimization of cocos2d-x games on x86 architecture
05 optimization of cocos2d-x games on x86 architecture乐费 胡
 
04 growing up with the open source community
04   growing up with the open source community04   growing up with the open source community
04 growing up with the open source community乐费 胡
 
03 crazy castle meets cocos2d-x
03   crazy castle meets cocos2d-x03   crazy castle meets cocos2d-x
03 crazy castle meets cocos2d-x乐费 胡
 
02 evolution innovation and participation
02   evolution innovation and participation02   evolution innovation and participation
02 evolution innovation and participation乐费 胡
 
01 cocos2d past, present and future
01   cocos2d past, present and future01   cocos2d past, present and future
01 cocos2d past, present and future乐费 胡
 
11 share experience on porting 3 kingdoms td legned of shu
11   share experience on porting 3 kingdoms td legned of shu11   share experience on porting 3 kingdoms td legned of shu
11 share experience on porting 3 kingdoms td legned of shu乐费 胡
 
Web并发模型粗浅探讨v3
Web并发模型粗浅探讨v3Web并发模型粗浅探讨v3
Web并发模型粗浅探讨v3乐费 胡
 
Oauth tutorial
Oauth tutorialOauth tutorial
Oauth tutorial乐费 胡
 
[.产品设计与用户体验(马化腾)
[.产品设计与用户体验(马化腾)[.产品设计与用户体验(马化腾)
[.产品设计与用户体验(马化腾)乐费 胡
 

Más de 乐费 胡 (13)

神仙道移动Ui演变
神仙道移动Ui演变神仙道移动Ui演变
神仙道移动Ui演变
 
08 gaming framework design based on cocos2d-x
08   gaming framework design based on cocos2d-x08   gaming framework design based on cocos2d-x
08 gaming framework design based on cocos2d-x
 
07 funny sango td and cocos2d-x
07   funny sango td and cocos2d-x07   funny sango td and cocos2d-x
07 funny sango td and cocos2d-x
 
06 html5 and cocos2d-x
06   html5 and cocos2d-x06   html5 and cocos2d-x
06 html5 and cocos2d-x
 
05 optimization of cocos2d-x games on x86 architecture
05   optimization of cocos2d-x games on x86 architecture05   optimization of cocos2d-x games on x86 architecture
05 optimization of cocos2d-x games on x86 architecture
 
04 growing up with the open source community
04   growing up with the open source community04   growing up with the open source community
04 growing up with the open source community
 
03 crazy castle meets cocos2d-x
03   crazy castle meets cocos2d-x03   crazy castle meets cocos2d-x
03 crazy castle meets cocos2d-x
 
02 evolution innovation and participation
02   evolution innovation and participation02   evolution innovation and participation
02 evolution innovation and participation
 
01 cocos2d past, present and future
01   cocos2d past, present and future01   cocos2d past, present and future
01 cocos2d past, present and future
 
11 share experience on porting 3 kingdoms td legned of shu
11   share experience on porting 3 kingdoms td legned of shu11   share experience on porting 3 kingdoms td legned of shu
11 share experience on porting 3 kingdoms td legned of shu
 
Web并发模型粗浅探讨v3
Web并发模型粗浅探讨v3Web并发模型粗浅探讨v3
Web并发模型粗浅探讨v3
 
Oauth tutorial
Oauth tutorialOauth tutorial
Oauth tutorial
 
[.产品设计与用户体验(马化腾)
[.产品设计与用户体验(马化腾)[.产品设计与用户体验(马化腾)
[.产品设计与用户体验(马化腾)
 

09 creating windows phone game with cocos2d-xna