Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

24. GameKit > Game Play

Game Play

Games primarily involve sending data back and forth through the GKMatch object and updating the local GUI to reflect any remote changes. Generally, you’ll want to send tiny bits of data very quickly for real time updates. You can bend or break this rule as needed, especially if you don’t need your updates to arrive quickly. Matches use two kinds of data transmission: reliable and unreliable.

If your data must arrive coherently and cannot be lost, use reliable transmission. Reliable transmissions are delivered in the order they are sent, are guaranteed to arrive, and will be resent until they are fully transmitted. Think “TCP” transmission when working with reliable connections.

Unreliable data is sent once and may be received out-of-order by recipients. Use this approach for data that arrives in small packets, but that must use near-instantaneous transmission to be useful, such as in a live shooting action game. Think “UDP” transmission for unreliable connections.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial