Mac OS X Reference Library Apple Developer Connection spyglass button

Version: 1.0

Posted: 2005-06-01

Build Requirements: N/A

Runtime Requirements: N/A

View Source Code:

Download Sample Code (“Worm.zip”, 78.2K)



Description

This sample code demonstrate multiple steps in improving the performance of a NSView based worm game. It demonstrates several versions of a WormView class that improve the performance of updating the view. The improvements include using setting the view as opaque; drawng only the necessary portions of the view; usage of Cocoa text system instead of NSString for faster string drawing; and using a periodic timer to update the view.

Document Revision History

Date Notes
2005-06-01NSView performance demonstration. Uses a periodic timer to get best performance with Coalesced Update feature.
Did this document help you? Yes It's good, but... Not helpful...