SlideShare una empresa de Scribd logo
1 de 32
Cocos2D: An introduction
Rob Caporetto (@rob_caporetto)
www.rob-caporetto.com
Caveats
What is Cocos2D?
Getting Up & Running
Installing


 Visit the Cocos Page &
 download
 Run the installer to
 install the Xcode
 Templates
Installing


 Visit the Cocos Page &
 download
 Run the installer to
 install the Xcode
 Templates
Concepts
Scenes, Layers, Nodes


Scenes
 Conceptually a View Controller
 Managed by the CCDirector
Scenes, Layers, Nodes


Layers
  Logical Separation of elements in the scene
Scenes, Layers, Nodes


Everything is a CCNode
  Sprites, UI Items.
  Allows for Parent/Child relationships
Input
Touch Input

iOS 3 Style Callbacks
  -ccTouchesBegan:withEvent:
  -ccTouchesMoved:withEvent:
  -ccTouchesEnded:withEvent:
  -ccTouchesCancelled:withEvent:
Enable with isTouchEnabled on Layer
Touch Input


No Gesture Recognizers
Best to dig up that legacy code…
Accelerometer Input


Uses existing UIKit callback
  -accelerometer:didAccelerate:
Enabled via isAccelerometerEnabled property
Gyro Input?


Not out of box :(
BUT, CoreMotion is EASY!
Audio
Audio


CocosDenshion Primary
  Includes SimpleAudioEngine wrapper
Alternate is ObjectAL
SimpleAudioEngine

Obtain SimpleAudioEngine instance
Preload, Play or Unlock
  [audioEngine preloadEffect:filename]
  [audioEngine playEffect:filename]
  [audioEngine unloadEffect:filename]
SimpleAudioEngine (cont)

Obtain SimpleAudioEngine instance
Preload or Play Music
  [audioEngine preloadBackgroundMusic:filename]
  [audioEngine playBackgroundMusic:file loop:YES]
  [audioEngine stopBackgroundMusic:filename]
The Demo Game
Conclusion
Resources (Code)


Cocos2D: http://www.cocos2d-iphone.org/
ShooterDemo: https://github.com/robc/
ShooterDemo
Resources (Tools)


cfxr: http://thirdcog.eu/apps/cfxr
TexturePacker: http://www.texturepacker.com
GlyphDesigner: glyphdesigner.71squared.com
Resources (Books)


Learning Cocos2D: http://cocos2dbook.com/
Learn Cocos2D Game Development*: http://
www.learn-cocos2d.com/store/book-learn-
cocos2d/

Más contenido relacionado

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Cocos2D Introduction (Melbourne Cocoaheads 20111013)

Notas del editor

  1. \n
  2. This is just an INTRO to Cocos2D.\nI’m not going to cover *everything* that it’s capable of (Physics, Tilemaps, etc.), but enough to create something incredibly simple.\nThe goal is to just show how easy it is to get a BASIC 2D game up & running with the engine on iOS.\n
  3. Open Source (Custom License)\n2D Engine (Using GL ES 1.1 / GL 1.5, 2.0 (in alpha) will be moving to GL ES 2.0\niOS/Mac OS X port of Python based engine (using Objective-C) (iOS ~2008, OSX more recently)\n- Follows its design styles, memory patterns (ie. lots of Autoreleased objects).\n\nLarge number of features:\n- Integrated Tilemap, Particle Engine, Menu System\n- Integrates with Box2D & Chipmunk for Physics (Optional)\n\nIncredibly popular engine.\n - A lot of good resources/tools out there (will cover at the end)\n - Easy to add additional functionality (is installed as src into project, and most other addons are done the same way.\n - Extensibility lead to alternate ‘distribution’ Kobold2D\n\n2500+ Games using it on the App Store (at last count).\n\n\n
  4. A few examples out there (a random selection of games I have on my phone)\n\na) Commander Pixman\nb) Trainyard\nc) Infinity Field\nd) League of Evil\ne) Super Shots Golf\n
  5. A few examples out there (a random selection of games I have on my phone)\n\na) Commander Pixman\nb) Trainyard\nc) Infinity Field\nd) League of Evil\ne) Super Shots Golf\n
  6. A few examples out there (a random selection of games I have on my phone)\n\na) Commander Pixman\nb) Trainyard\nc) Infinity Field\nd) League of Evil\ne) Super Shots Golf\n
  7. A few examples out there (a random selection of games I have on my phone)\n\na) Commander Pixman\nb) Trainyard\nc) Infinity Field\nd) League of Evil\ne) Super Shots Golf\n
  8. A few examples out there (a random selection of games I have on my phone)\n\na) Commander Pixman\nb) Trainyard\nc) Infinity Field\nd) League of Evil\ne) Super Shots Golf\n
  9. \n
  10. - Visit the website (Link at the end regardless)\n- Download the package (.tar.gz)\n- Unpack, and run the install-templates.sh script.\n- This installs everything for both Xcode 3 (remember that?) and Xcode 4\n- Then you fire up Xcode, create a new project…\n
  11. …BOOM!\n\nHere you get 3 default configurations. A plain Cocos2d project, a Cocos2d project linked to the Box2D physics library, or the Chipmunk physics library.\n\nPlus you also get the same configures applied to building OS X targets.\n\n(All of which are a tad beyond scope on this one).\n
  12. \n
  13. Basic Concept:\n- Graph of Nodes\n- Each graph starts off with a scene: This is just used to anchor everything else\n\nThe Director manages the overall flow of the game (much like UIApplication does for a UIKit app).\n\nThe Director can load or replace a scene, can also push & pop scenes (allowing you to create a pause screen or menu eg).\n
  14. Layers separate out items on the scene.\nEnsures that as you manipulate items in the scene, that others can be left affected.\nExamples - your game’s UI. You don’t want this to move about as your player moves through the world.\n\n
  15. Benefit of a giant node graph is parent/child relationships.\nCould have a RPG where you could attach armour/weapons depending on inventory.\n\n
  16. - Direct support for Touch & Accelerometer Input\n- Includes handling for multitouch\n
  17. - Custom Callbacks on your Layers\n- Allows for focused handling (a bit out of scope)\n- Lets you split touch tracking on different layers (ie. for UI & action)\n\n-\n
  18. No. Gesture. Recognizer. Support.\n- There is an unofficial patch to add it, which I’ve not tried\n- \n
  19. - Again, enabled on a per layer basis.\n- Nothing really special here\n- Need to manually track reference position (ie. Calibration UI - we don’t get anything special here).\n
  20. - There’s no out of box handling for the gyro - unsure why though… just not there!\n- CoreMotion’s easy to set-up though - if you’re happy to keep to iOS 4+.\n- That being said, even with the Gyro you need to track reference points (plus deal with Gimbal Lock issues if you’re not careful).\n- CoreMotionTeapot code from WWDC2010 code is a great starting point for this.\n
  21. \n
  22. - C2D includes “CocosDenshion” - an engine handling both AVFoundation/AudioToolbox & OpenAL.\n- Also includes a SimpleAudioEngine wrapper around that - one line playback (or two with preloading) of music/sound effects\n\n- An alternative is ObjectAL - out of the box there’s a few benefits (easier to do some other things - looping sound effects).\n
  23. Obtain the SharedAudioEngine instance (it’s exposed as a singleton!)\nThen you can preload/play/unload\n\nPreloading ensures the sound is ready to go (so no delay when required)\nUnloading helps to manage memory of course\nPlay performs a single shot.\n\nPlay has a more complex overload - can tweak parameters, allows you to get some dynamic audio in there\n
  24. Obtain the SharedAudioEngine instance (it’s exposed as a singleton!)\nThen you can preload/play\n\nPreloading ensures the sound is ready to go (so no delay when required)\nPlay can play it once, or continually loop until stopped.\n
  25. Time to show this in action.\nFire up the game (via the iPad or the simulator - NB: NO AUDIO ON SIM)\n\nBreak through the codebase.\n- Show how the scenes are set-up\n- Title:\n- How the menu is built & handled\n\n- Game:\n- Layers (background, HUD, gameplay)\n- Show touch input\n- Show audio playback\n\n- General\n- Show Fonts\n- Show Director & Transitions\n- Show Actions\n\n
  26. Just an overview of what Cocos offers.\nI prefer it due to fitting somewhat in line with general iOS semantics.\nThere are other engines (Sparrow, Pixelwave, iTorque, even wrangling Unity into a 2D engine).\n\n
  27. Cocos Homepage - here’s where you can get the source/package of the stable releases (as well as the possible 2.0 alphas & other builds).\n\nAlso has the documentation (including offline versions for Xcode) & some other tutorials (which might be out of date)\n\nAlso the link to the source for the demo game - should be ready to go & build with the latest iOS SDK (Built using the 5.0GM, needs 4.2 to run ‘cause I use lots of blocks!)\n
  28. \n
  29. These are the two major books on using Cocos2D. I prefer the first, but the second is about to get an updated edition covering iOS 5, UIKit, the Cocos3D library\n