Welcome to my Programming Blog...

I am currently working on a couple of projects: An original game called "Implosion" which I am porting from Flash to the iPad, and a remake of Q*bert in Python (pygame), as part of the class I am teaching. Please feel free to use the "Labels" (at right) to follow a specific project or theme. If you are one of my Python students, I recommend that you check out the Python thread.

Sunday, October 17, 2010

#VTM_iPhone notes on game center talk

My notes on the game center talk by Jessica Kahn.

Social gaming functionality, provided by apple

- authentication
-leader boards
Achievements
Friendsinvitations and matchmaking
P2p networking
And one other.

Ios 4.1+

Game center is just catching on.
Why bother? Lots of competition, but game center is a free way to raise visibility. Also, game center advertises what your friends are playing, even if you don't own them. Friends can invite you to games you don't own.

Competing solutions: Plus+, OpenFeint, ScoreLoop, Crystal, and 3rd party

Tapulous network (jessica's company) has some things that apple doesn't, some things it does, but lacks some that apple does.

Bundle identifier, game kit linkage, view controller-based user interface, Ability to code with blocks

BundleID (eg. Com.tapulous.gamecenterdemo)

Best to do a weak link, checking for game kit and ios4.1 or later on user's phone

Leaderboards, achievements, and matchmaking all use view controller subclases for their UI.

GameKit often takes blocks as parameters.

The Basics:

Authentication, leader boards, achievements
Auth... Do it as soon as your app can display ui. One line of code, with a block as error handler, triggers a welcome back overlay at top of screen.
With multitasking, might log out while you are in background. Be observer for GKPlayerAuthenticationDidChange

-----> supporting authentication is enough to get the exposure benefits of game center!

Leaderboards
Configure in iTunes connect
Report using GKscore
Display using GKLeaderboardViewController
Or
get the data from the game sever and display, yourself

Reporting - if it fails, stash the data locally, and try again soon. Don't need to tell user, according to apple interface design.

Leaderboards show up in game center, even if you don't display them in your app.

Achievements are just like leaderboards.
--------
Bonus points

(I had to step out, so much of this is omitted)
Matchmaking - came back in the middle. Looks a bit complicated. But then, romance usually is.

Suggested: doing a lot at boot time - but watch out about interfering with user experience.

Peer-to-peer networking
High-level interface.
Start by making the match (see above)
Decide which data to transmit - as little and as rarely as you can.
You can transfer data reliably or unreliably. Send data to all players or to one specific user.
Data must be "byte (sic) sized" (sic)
Read up on two GKMatch methods
SendDataToAllPlayers...

Voice chat
Use GKVoiceChat & GKMatch
First create and make active a playAndRecord AVAudioSession
Then create one or more voice channels using voiceChatWithName
Start and stop ability to talk with methods on GKVoiceChat.

-------
Gotchas

Fragmentation, due to unsupported os versions.
Complexity, if game is OpenGL based
Beware flaky networks!
Prevent cheaters, you can't reset a leaderboard.
- if you are storing scores, save it in a way so that people can't read it.
Invitation handlers can happen at inopportune times.
Network activity can hamper in-game fps and audio performance.

Great questions, but I was distracted by q/a and did not write them down. Some on age-appropriateness, some on testing, some on handling the modality of authentication requests.

She's vp of engineering Disney mobile and is "hiring like crazy"


- Posted using BlogPress from my iPad

No comments:

Post a Comment