SlideShare a Scribd company logo
1 of 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/

More Related Content

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 

Featured

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
 

Featured (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)

Editor's Notes

  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