SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
James
Montemagno
Developer Evangelist, Xamarin
james@xamarin.com motzcod.es @JamesMontemagno
DESIGN – DEVELOP -‐ INTEGRATE TEST MONITOR
LEARN
Shared C# codebase • 100% native API access • High performance
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Mobile
Building Games with Xamarin
§ MonoGame
Apple  Toy  Car  Sample  -­‐ WWDC  2014Angry  Ninjas  
Sample
§ Mono for Unreal Engine
§ Sprite Kit
§ Scene Kit
§ CocosSharp
What is CocosSharp?
“CocosSharp blends the power of the
Cocos2D programming model with C# and
the .NET Framework…the API has been
designed to follow C# and .NET idioms.”
Miguel de Icaza
Xamarin
Where it came from
Cocos2D
Objective-­‐C
Cocos2D-­‐x
C++
Cocos2D-­‐XNA
C#
CocosSharp
C#
§ .NET Idioms
§ Naming, Constructors, C#ier
§ Global State -> Multiple Directors
§ Actions as Immutable
§ NuGet & PCL Libraries
§ Extensions + Sanitized Hierarchy
§ Events, Coloring, Labels, & More
CocosSharp API
Typical “Scene” Hierarchy
CCApplication CCDirector
CCScene
CCLayer
(Sprites)
CCLayer
(Labels)
CCLayer
(Menus)
CCSprite CCSprite
CCApplication
§ Creates & Initializes the Graphics Device
§ Sets the application delegate
§ Starts the Game
var app = new CCApplication ();
app.ApplicationDelegate = new MyGameDelegate ();
app.StartGame ();
CCApplicationDelegate
§ Handles application lifecycle
§ Similar to UIApplicationDelegate on iOS
§ Sets the application’s content folder
§ Load the main window’s first scene
public virtual void ApplicationDidEnterBackground
public virtual void ApplicationDidFinishLaunching
public virtual void ApplicationWillEnterForeground
Content Folders
§ Project Folder Contains Resources
§ Fonts
§ Sounds
§ Images
§ Animations
§ Particle Systems
application.ContentRootDirectory = “Content”;
application.ContentSearchPaths.Add ("sounds");
CCDirector
§ Available via Window.DefaultDirector
§ Manages any additional scene loading
Window.DefaultDirector.ReplaceScene (
GameLayer.GameScene (Window));
CCScene
§ Manages game logic for various portions
of your game
§ Contains layers (CCLayer)
CCLayer
§ Contains CCNodes
§ Labels, Sprites, Menus, and more
var scene = new CCScene (mainWindow);
var layer = new GameStartLayer ();
scene.AddChild (layer);
CCSprite
§ Nodes that create images in your game
§ Image file must be in a Content folder
§ DefaultTexelToContentSizeRatio(s)
§ Used to maintain content across
resolutions
CCAction
§ Actions perform tasks on nodes
§ For example, animating sprites
§ Run multiple actions sequentially using
CCSequence
§ Run multiple actions in parallel using
CCSpawn
CCTouch
§ Encapsulates a touch on the screen
§ Override touch methods in layer
§ TouchesBegan, TouchesMoved,
TouchesEnded, etc.
§ All touches at once
§ Each touch one by one
So Much More
§ Accelerometer
§ Audio
§ Primitives
§ Particle Systems
§ Parallax
§ Effects
§ Physics
Let’s  Build
A  Game!
Resources
§ Samples
§ http://github.com/mono/cocos-sharp-samples
§ Gone Bananas Walkthrough
§ http://github.com/mono/cocos-sharp-
samples/blob/master/GoneBananas/Walkthrough.md
§ Introduction to CocosSharp
§ http://developer.xamarin.com/guides/cross-
platform/game_development/cocossharp/first_game
Get Started Today
xamarin.com
Free trial - xamarin.com/university
Unrivaled Mobile
Development
Training
Live unlimited mobile development training from
mobile experts, in your time-zone,on your
schedule, and as often as you'd like.
Thank you.
James
Montemagno
Developer Evangelist, Xamarin
james@xamarin.com motzcod.es @JamesMontemagno
Questions?
16:20  -­‐ 17:20  Right  here!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
 
Xamarin 4 - the future of apps
Xamarin 4  - the future of appsXamarin 4  - the future of apps
Xamarin 4 - the future of apps
 
Native iOS and Android Development with Xamarin
Native iOS and Android Development with XamarinNative iOS and Android Development with Xamarin
Native iOS and Android Development with Xamarin
 
Xamarin Dev Days - Introduction to Xamarin
Xamarin Dev Days - Introduction to XamarinXamarin Dev Days - Introduction to Xamarin
Xamarin Dev Days - Introduction to Xamarin
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
 
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP AppsOptimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
 
.NET Everywhere and for Everyone
.NET Everywhere and for Everyone.NET Everywhere and for Everyone
.NET Everywhere and for Everyone
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4
 
Oxford .NET - Go Mobile with Xamarin
Oxford .NET - Go Mobile with XamarinOxford .NET - Go Mobile with Xamarin
Oxford .NET - Go Mobile with Xamarin
 
Introduction to Xamarin.Forms 2.x
Introduction to Xamarin.Forms 2.xIntroduction to Xamarin.Forms 2.x
Introduction to Xamarin.Forms 2.x
 
What's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoWhat's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo Domingo
 
Visual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.FormsVisual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.Forms
 
Azure App Service Helpers
Azure App Service HelpersAzure App Service Helpers
Azure App Service Helpers
 
.NET North UG - What’s new & next for Xamarin developers
.NET North UG - What’s new & next for Xamarin developers.NET North UG - What’s new & next for Xamarin developers
.NET North UG - What’s new & next for Xamarin developers
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Xamarin DevDays Portland - iOS 9
Xamarin DevDays Portland - iOS 9Xamarin DevDays Portland - iOS 9
Xamarin DevDays Portland - iOS 9
 
An introduction to Xamarin
An introduction to XamarinAn introduction to Xamarin
An introduction to Xamarin
 
Native App Development for iOS, Android, and Windows with Visual Studio
Native App Development for iOS, Android, and Windows with Visual StudioNative App Development for iOS, Android, and Windows with Visual Studio
Native App Development for iOS, Android, and Windows with Visual Studio
 
Highlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conferenceHighlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conference
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to Xamarin
 

Andere mochten auch

Games with Win 8 Style by Neneng
Games with Win 8 Style by NenengGames with Win 8 Style by Neneng
Games with Win 8 Style by Neneng
Agate Studio
 
Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!
Alfonso Garcia-Caro
 

Andere mochten auch (20)

Introdução ao cocos sharp
Introdução ao cocos sharpIntrodução ao cocos sharp
Introdução ao cocos sharp
 
Cocos2d game programming 2
Cocos2d game programming 2Cocos2d game programming 2
Cocos2d game programming 2
 
Xna and mono game
Xna and mono gameXna and mono game
Xna and mono game
 
Cross-platform Game Dev w/ CocosSharp
Cross-platform Game Dev w/ CocosSharpCross-platform Game Dev w/ CocosSharp
Cross-platform Game Dev w/ CocosSharp
 
Flappy - Paris 2015
Flappy -  Paris 2015Flappy -  Paris 2015
Flappy - Paris 2015
 
Cross platform physics games - NDC 2014
Cross platform physics games - NDC 2014Cross platform physics games - NDC 2014
Cross platform physics games - NDC 2014
 
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
 
Multyplatform and mono part 2 - Matteo Nicolotti
Multyplatform and mono part 2 - Matteo Nicolotti Multyplatform and mono part 2 - Matteo Nicolotti
Multyplatform and mono part 2 - Matteo Nicolotti
 
.NET? MonoDroid Does
.NET? MonoDroid Does.NET? MonoDroid Does
.NET? MonoDroid Does
 
Games with Win 8 Style by Neneng
Games with Win 8 Style by NenengGames with Win 8 Style by Neneng
Games with Win 8 Style by Neneng
 
EastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchEastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouch
 
CocosSharp_XHackNight_07feb
CocosSharp_XHackNight_07febCocosSharp_XHackNight_07feb
CocosSharp_XHackNight_07feb
 
Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!
 
Gaming in Csharp
Gaming in CsharpGaming in Csharp
Gaming in Csharp
 
Generative Art Hands On with F#
Generative Art Hands On with F#Generative Art Hands On with F#
Generative Art Hands On with F#
 
Monogame and xna
Monogame and xnaMonogame and xna
Monogame and xna
 
Intro to Gaming- MonoGame/CocosSharp/UrhoSharp
Intro to Gaming- MonoGame/CocosSharp/UrhoSharpIntro to Gaming- MonoGame/CocosSharp/UrhoSharp
Intro to Gaming- MonoGame/CocosSharp/UrhoSharp
 
Tips & Tricks that every game developer should know
Tips & Tricks that every game developer should knowTips & Tricks that every game developer should know
Tips & Tricks that every game developer should know
 
Flappy bird game in c#
Flappy bird game in c#Flappy bird game in c#
Flappy bird game in c#
 
Ready, steady, cross platform games - ProgNet 2015
Ready, steady, cross platform games - ProgNet 2015Ready, steady, cross platform games - ProgNet 2015
Ready, steady, cross platform games - ProgNet 2015
 

Ähnlich wie Introduction to CocosSharp

iBasket: The story of an HTML5 game
iBasket: The story of an HTML5 gameiBasket: The story of an HTML5 game
iBasket: The story of an HTML5 game
Iker Jamardo
 
Creating physics game in 1 hour
Creating physics game in 1 hourCreating physics game in 1 hour
Creating physics game in 1 hour
Linkou Bian
 
Taking The Cloud Native
Taking The Cloud NativeTaking The Cloud Native
Taking The Cloud Native
Corey Clark, Ph.D.
 

Ähnlich wie Introduction to CocosSharp (20)

Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2d
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
Cocos2d programming
Cocos2d programmingCocos2d programming
Cocos2d programming
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
[MobConf] Go mobile with C#, Visual Studio & Xamarin
[MobConf] Go mobile with C#, Visual Studio & Xamarin[MobConf] Go mobile with C#, Visual Studio & Xamarin
[MobConf] Go mobile with C#, Visual Studio & Xamarin
 
iBasket: The story of an HTML5 game
iBasket: The story of an HTML5 gameiBasket: The story of an HTML5 game
iBasket: The story of an HTML5 game
 
XHackers GameDev / Android LolliPop / Xamarin Forms
XHackers GameDev / Android LolliPop / Xamarin FormsXHackers GameDev / Android LolliPop / Xamarin Forms
XHackers GameDev / Android LolliPop / Xamarin Forms
 
Taking Mobile Development Serverless with C#
Taking Mobile Development Serverless with C#Taking Mobile Development Serverless with C#
Taking Mobile Development Serverless with C#
 
Xamarin Dev Days 2016 introduction to xamarin
Xamarin Dev Days 2016   introduction to xamarinXamarin Dev Days 2016   introduction to xamarin
Xamarin Dev Days 2016 introduction to xamarin
 
Creating physics game in 1 hour
Creating physics game in 1 hourCreating physics game in 1 hour
Creating physics game in 1 hour
 
Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014
 
Cross Game Dev with Corona
Cross Game Dev with CoronaCross Game Dev with Corona
Cross Game Dev with Corona
 
SkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.FormsSkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.Forms
 
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixContinuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
 
MS Experiences 17 - Xamarin: Future of Mobile Development
MS Experiences 17 - Xamarin: Future of Mobile DevelopmentMS Experiences 17 - Xamarin: Future of Mobile Development
MS Experiences 17 - Xamarin: Future of Mobile Development
 
Xamarin Introduction for Xamarin DevDays Seville
Xamarin Introduction for Xamarin DevDays SevilleXamarin Introduction for Xamarin DevDays Seville
Xamarin Introduction for Xamarin DevDays Seville
 
Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)
 
Intelligence of Things: IoT, AWS DeepLens and Amazon SageMaker
Intelligence of Things: IoT, AWS DeepLens and Amazon SageMakerIntelligence of Things: IoT, AWS DeepLens and Amazon SageMaker
Intelligence of Things: IoT, AWS DeepLens and Amazon SageMaker
 
Taking The Cloud Native
Taking The Cloud NativeTaking The Cloud Native
Taking The Cloud Native
 
Advanced Web Graphics with Canvas
Advanced Web Graphics with CanvasAdvanced Web Graphics with Canvas
Advanced Web Graphics with Canvas
 

Mehr von James Montemagno

Mehr von James Montemagno (16)

What's new and next for mobile development with .NET
What's new and next for mobile development with .NETWhat's new and next for mobile development with .NET
What's new and next for mobile development with .NET
 
Building Stream Deck Plugins in C#
Building Stream Deck Plugins in C#Building Stream Deck Plugins in C#
Building Stream Deck Plugins in C#
 
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & More
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & MoreCreating Island Tracker - Xamarin, Azure Functions, Table Storage, & More
Creating Island Tracker - Xamarin, Azure Functions, Table Storage, & More
 
Xamarin.forms Shell + Navigation
Xamarin.forms Shell + NavigationXamarin.forms Shell + Navigation
Xamarin.forms Shell + Navigation
 
Seattle Mobile .NET User Group - Nov. 13th 2019
Seattle Mobile .NET User Group - Nov. 13th 2019Seattle Mobile .NET User Group - Nov. 13th 2019
Seattle Mobile .NET User Group - Nov. 13th 2019
 
Expert Day - What's New, Hot, & Awesome for Xamarin Devs
Expert Day - What's New, Hot, & Awesome for Xamarin DevsExpert Day - What's New, Hot, & Awesome for Xamarin Devs
Expert Day - What's New, Hot, & Awesome for Xamarin Devs
 
Xamarin - New & Awesome + Building Xamarin.Essentials
Xamarin - New & Awesome + Building Xamarin.EssentialsXamarin - New & Awesome + Building Xamarin.Essentials
Xamarin - New & Awesome + Building Xamarin.Essentials
 
Zebra App Forum 2019 - Building iOS & Android Apps with Xamarin
Zebra App Forum 2019 - Building iOS & Android Apps with XamarinZebra App Forum 2019 - Building iOS & Android Apps with Xamarin
Zebra App Forum 2019 - Building iOS & Android Apps with Xamarin
 
Stunning Mobile Apps with the Xamarin Visual Design System​
Stunning Mobile Apps with the Xamarin Visual Design System​Stunning Mobile Apps with the Xamarin Visual Design System​
Stunning Mobile Apps with the Xamarin Visual Design System​
 
What's New, Hot, & Awesome for Xamarin Developers!
What's New, Hot, & Awesome for Xamarin Developers!What's New, Hot, & Awesome for Xamarin Developers!
What's New, Hot, & Awesome for Xamarin Developers!
 
AnDevCon - Android and iOS Apps in C# with Xamarin
AnDevCon - Android and iOS Apps in C# with XamarinAnDevCon - Android and iOS Apps in C# with Xamarin
AnDevCon - Android and iOS Apps in C# with Xamarin
 
Xcoders - iOS & Android Development in C# with Xamarin
Xcoders - iOS & Android Development in C# with XamarinXcoders - iOS & Android Development in C# with Xamarin
Xcoders - iOS & Android Development in C# with Xamarin
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch Event
 
End to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih XamarinEnd to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih Xamarin
 
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
 
Xamarin Evolve 2016: Mobile search - making your mobile apps stand out
Xamarin Evolve 2016: Mobile search - making your mobile apps stand outXamarin Evolve 2016: Mobile search - making your mobile apps stand out
Xamarin Evolve 2016: Mobile search - making your mobile apps stand out
 

Kürzlich hochgeladen

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Kürzlich hochgeladen (20)

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 

Introduction to CocosSharp

  • 1.
  • 2.
  • 4. DESIGN – DEVELOP -‐ INTEGRATE TEST MONITOR LEARN
  • 5. Shared C# codebase • 100% native API access • High performance iOS C# UI Windows C# UIAndroid C# UI Shared C# Mobile
  • 6. Building Games with Xamarin § MonoGame Apple  Toy  Car  Sample  -­‐ WWDC  2014Angry  Ninjas   Sample § Mono for Unreal Engine § Sprite Kit § Scene Kit § CocosSharp
  • 7. What is CocosSharp? “CocosSharp blends the power of the Cocos2D programming model with C# and the .NET Framework…the API has been designed to follow C# and .NET idioms.” Miguel de Icaza Xamarin
  • 8. Where it came from Cocos2D Objective-­‐C Cocos2D-­‐x C++ Cocos2D-­‐XNA C# CocosSharp C# § .NET Idioms § Naming, Constructors, C#ier § Global State -> Multiple Directors § Actions as Immutable § NuGet & PCL Libraries § Extensions + Sanitized Hierarchy § Events, Coloring, Labels, & More
  • 10. Typical “Scene” Hierarchy CCApplication CCDirector CCScene CCLayer (Sprites) CCLayer (Labels) CCLayer (Menus) CCSprite CCSprite
  • 11. CCApplication § Creates & Initializes the Graphics Device § Sets the application delegate § Starts the Game var app = new CCApplication (); app.ApplicationDelegate = new MyGameDelegate (); app.StartGame ();
  • 12. CCApplicationDelegate § Handles application lifecycle § Similar to UIApplicationDelegate on iOS § Sets the application’s content folder § Load the main window’s first scene public virtual void ApplicationDidEnterBackground public virtual void ApplicationDidFinishLaunching public virtual void ApplicationWillEnterForeground
  • 13. Content Folders § Project Folder Contains Resources § Fonts § Sounds § Images § Animations § Particle Systems application.ContentRootDirectory = “Content”; application.ContentSearchPaths.Add ("sounds");
  • 14. CCDirector § Available via Window.DefaultDirector § Manages any additional scene loading Window.DefaultDirector.ReplaceScene ( GameLayer.GameScene (Window));
  • 15. CCScene § Manages game logic for various portions of your game § Contains layers (CCLayer)
  • 16. CCLayer § Contains CCNodes § Labels, Sprites, Menus, and more var scene = new CCScene (mainWindow); var layer = new GameStartLayer (); scene.AddChild (layer);
  • 17. CCSprite § Nodes that create images in your game § Image file must be in a Content folder § DefaultTexelToContentSizeRatio(s) § Used to maintain content across resolutions
  • 18. CCAction § Actions perform tasks on nodes § For example, animating sprites § Run multiple actions sequentially using CCSequence § Run multiple actions in parallel using CCSpawn
  • 19. CCTouch § Encapsulates a touch on the screen § Override touch methods in layer § TouchesBegan, TouchesMoved, TouchesEnded, etc. § All touches at once § Each touch one by one
  • 20. So Much More § Accelerometer § Audio § Primitives § Particle Systems § Parallax § Effects § Physics
  • 22. Resources § Samples § http://github.com/mono/cocos-sharp-samples § Gone Bananas Walkthrough § http://github.com/mono/cocos-sharp- samples/blob/master/GoneBananas/Walkthrough.md § Introduction to CocosSharp § http://developer.xamarin.com/guides/cross- platform/game_development/cocossharp/first_game
  • 24. Free trial - xamarin.com/university Unrivaled Mobile Development Training Live unlimited mobile development training from mobile experts, in your time-zone,on your schedule, and as often as you'd like.
  • 25. Thank you. James Montemagno Developer Evangelist, Xamarin james@xamarin.com motzcod.es @JamesMontemagno Questions? 16:20  -­‐ 17:20  Right  here!