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
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/