SlideShare a Scribd company logo
1 of 15
game programming in
    objective-c
      amanda wixted
inspiration
PAC-MAN (Namco)         Mafia Wars (Zynga)




   my first and most recent iPhone games
first program i witnessed
Live Poker
                                        (Zynga)



  social casual games            iphone games
  -for people to play     -in your pocket all the time
  online against their   -average session is about 7 to
    real-life friends              15 minutes
-for people to pick up     -we use facebook connect
  and have fun for 15      and our own social gaming
        minutes                       net
the general structure of casual games

                                   main




                    paint                     update
background

                                                                      sky’s
                                                       asteroids      color
  objects                                  ship’s      positions
  in view                                 position

                              set flags                                    AI’s
  heads                     in the data                 creatures’        next
up display                    models                   reactions to       move
                                                         player’s
                                                         actions
                  I/O
main            main loop of a
paint          update
                         casual game
create a timer that calls your method at <framerate> hz
main loop updates the data models then draws to screen
(demo of Penguin Madness)
what’s cool about Objective-C?


a few topics that differentiate objc
    from other OO languages:

   get over the brackets :-]
  memory management model
 @synthesized instance variables
          categories
get over the [ ]’s
this is the first thing people complain about when
                 they see objc code

 brackets mean you are sending a message to an
                 object at runtime
           which is slightly different from
              calling a function on it.
this lets you not have to worry about the type of
              object at compile time.

           that’s all, so don’t worry :-]
memory management
•   objects have methods called
    “retain” and “release”

•   objects have a retainCount; when
    it becomes 0, the runtime
    deallocates the object

•   if you allocate memory for an
    object, you “own” it so you need
    to release it

•   if you did not allocate, don’t call
    release
@properties
•   properties provide
    access to instance
    variables in a class

•   using @synthesize
    auto-generates
    getters and setters,
    depending on
    keywords you give it

•   saves you time!
categories
•   add methods to a class      •   can override original
    without having to               implementation if you
    subclass                        don’t like how it worked

•   can’t declare new ivars,
    but can access private
    ones

•   allows you to implement
    a class over several files
objc and gaming blogs
furbo.org - craig hockenberry (Twitterriffic) on objc,
            Xcode, iPhone programming

cocoawithlove.com - matt gallagher - objc, cocoa,
                hints/tips/cookbook

     toucharcade.com - iphone game reviews

  stackoverflow.com - collaborative Q&A about
     programming (you already hang out here :)
contact info
   amanda.wixted@gmail.com

    http://amandawixted.com

    @commanda on twitter


zynga is hiring awesome engineers
            of all types!
      http://zynga.com/jobs/

More Related Content

Viewers also liked

Long term evaluation of IL programme slides
Long term evaluation of IL programme slidesLong term evaluation of IL programme slides
Long term evaluation of IL programme slidesTina Hohmann
 
Keeping the Gold: Successfully Resolving Preference Claims
Keeping the Gold: Successfully Resolving Preference ClaimsKeeping the Gold: Successfully Resolving Preference Claims
Keeping the Gold: Successfully Resolving Preference ClaimsKegler Brown Hill + Ritter
 
유기화학 2nd
유기화학 2nd유기화학 2nd
유기화학 2ndshinkyung
 
Motoholics Sponsorship Proposal 2010
Motoholics Sponsorship Proposal 2010Motoholics Sponsorship Proposal 2010
Motoholics Sponsorship Proposal 2010Gaurab Dutta
 
Putting Our Funny Where Our Mouth Is
Putting Our Funny Where Our Mouth IsPutting Our Funny Where Our Mouth Is
Putting Our Funny Where Our Mouth IsSarah Halstead
 
Osss...!!! Magazine Concept
Osss...!!! Magazine ConceptOsss...!!! Magazine Concept
Osss...!!! Magazine Concept@rtNya
 
Turning event attendees into active active participants
Turning event attendees into active active participantsTurning event attendees into active active participants
Turning event attendees into active active participantsLive Union
 
Know Your Enemy
Know Your EnemyKnow Your Enemy
Know Your Enemytlineshill
 
Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...
Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...
Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...Олег Федосенко
 
Hohmann Learning spaces Warwick english
Hohmann Learning spaces Warwick englishHohmann Learning spaces Warwick english
Hohmann Learning spaces Warwick englishTina Hohmann
 
Un an cu Sânziana!
Un an cu Sânziana!Un an cu Sânziana!
Un an cu Sânziana!nbmro
 
Castello Normanno Di Adrano
Castello Normanno Di AdranoCastello Normanno Di Adrano
Castello Normanno Di AdranoYvonne Sgroi
 
Nice weekend with music
Nice weekend with musicNice weekend with music
Nice weekend with musicDaniel Chua
 
Evaluaciones de jheickson noguera
Evaluaciones de jheickson nogueraEvaluaciones de jheickson noguera
Evaluaciones de jheickson nogueraLili Cardenas
 

Viewers also liked (20)

Long term evaluation of IL programme slides
Long term evaluation of IL programme slidesLong term evaluation of IL programme slides
Long term evaluation of IL programme slides
 
Keeping the Gold: Successfully Resolving Preference Claims
Keeping the Gold: Successfully Resolving Preference ClaimsKeeping the Gold: Successfully Resolving Preference Claims
Keeping the Gold: Successfully Resolving Preference Claims
 
About BMC
About BMCAbout BMC
About BMC
 
유기화학 2nd
유기화학 2nd유기화학 2nd
유기화학 2nd
 
Langkah Membuat Blogspot
Langkah Membuat BlogspotLangkah Membuat Blogspot
Langkah Membuat Blogspot
 
Motoholics Sponsorship Proposal 2010
Motoholics Sponsorship Proposal 2010Motoholics Sponsorship Proposal 2010
Motoholics Sponsorship Proposal 2010
 
Nursing Skills
Nursing SkillsNursing Skills
Nursing Skills
 
Putting Our Funny Where Our Mouth Is
Putting Our Funny Where Our Mouth IsPutting Our Funny Where Our Mouth Is
Putting Our Funny Where Our Mouth Is
 
Osss...!!! Magazine Concept
Osss...!!! Magazine ConceptOsss...!!! Magazine Concept
Osss...!!! Magazine Concept
 
Turning event attendees into active active participants
Turning event attendees into active active participantsTurning event attendees into active active participants
Turning event attendees into active active participants
 
Know Your Enemy
Know Your EnemyKnow Your Enemy
Know Your Enemy
 
Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...
Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...
Наглядне роз'яснення розподілу державного бюджету або чому потрібен новий Под...
 
Seismic Waves
Seismic WavesSeismic Waves
Seismic Waves
 
Hohmann Learning spaces Warwick english
Hohmann Learning spaces Warwick englishHohmann Learning spaces Warwick english
Hohmann Learning spaces Warwick english
 
Un an cu Sânziana!
Un an cu Sânziana!Un an cu Sânziana!
Un an cu Sânziana!
 
Coalition Orientation to Public
Coalition Orientation to PublicCoalition Orientation to Public
Coalition Orientation to Public
 
Castello Normanno Di Adrano
Castello Normanno Di AdranoCastello Normanno Di Adrano
Castello Normanno Di Adrano
 
Nice weekend with music
Nice weekend with musicNice weekend with music
Nice weekend with music
 
h-ubu : CDI in JavaScript
h-ubu : CDI in JavaScripth-ubu : CDI in JavaScript
h-ubu : CDI in JavaScript
 
Evaluaciones de jheickson noguera
Evaluaciones de jheickson nogueraEvaluaciones de jheickson noguera
Evaluaciones de jheickson noguera
 

Recently uploaded

Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsZilliz
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Bay Area Girl Geek 4: Amanda Wixted

  • 1. game programming in objective-c amanda wixted
  • 3. PAC-MAN (Namco) Mafia Wars (Zynga) my first and most recent iPhone games
  • 4. first program i witnessed
  • 5. Live Poker (Zynga) social casual games iphone games -for people to play -in your pocket all the time online against their -average session is about 7 to real-life friends 15 minutes -for people to pick up -we use facebook connect and have fun for 15 and our own social gaming minutes net
  • 6. the general structure of casual games main paint update background sky’s asteroids color objects ship’s positions in view position set flags AI’s heads in the data creatures’ next up display models reactions to move player’s actions I/O
  • 7. main main loop of a paint update casual game create a timer that calls your method at <framerate> hz main loop updates the data models then draws to screen
  • 8. (demo of Penguin Madness)
  • 9. what’s cool about Objective-C? a few topics that differentiate objc from other OO languages: get over the brackets :-] memory management model @synthesized instance variables categories
  • 10. get over the [ ]’s this is the first thing people complain about when they see objc code brackets mean you are sending a message to an object at runtime which is slightly different from calling a function on it. this lets you not have to worry about the type of object at compile time. that’s all, so don’t worry :-]
  • 11. memory management • objects have methods called “retain” and “release” • objects have a retainCount; when it becomes 0, the runtime deallocates the object • if you allocate memory for an object, you “own” it so you need to release it • if you did not allocate, don’t call release
  • 12. @properties • properties provide access to instance variables in a class • using @synthesize auto-generates getters and setters, depending on keywords you give it • saves you time!
  • 13. categories • add methods to a class • can override original without having to implementation if you subclass don’t like how it worked • can’t declare new ivars, but can access private ones • allows you to implement a class over several files
  • 14. objc and gaming blogs furbo.org - craig hockenberry (Twitterriffic) on objc, Xcode, iPhone programming cocoawithlove.com - matt gallagher - objc, cocoa, hints/tips/cookbook toucharcade.com - iphone game reviews stackoverflow.com - collaborative Q&A about programming (you already hang out here :)
  • 15. contact info amanda.wixted@gmail.com http://amandawixted.com @commanda on twitter zynga is hiring awesome engineers of all types! http://zynga.com/jobs/

Editor's Notes