Mac Game Programming Book
In 2002 I wrote Mac Game Programming, published by Premier Press. To support the book I created this page, where you can find the latest information, news, and updates.
About the Book
The book is now out of print, but if you are able to get your hands on a copy, you will see that the book covers the following topics:
- Graphics
- Scrolling
- Animation
- InputSprocket
- HID Manager
- Keyboard Input
- Carbon Events
- Sound
- Physics
- Finite State Machines
- Pathfinding
- Files
- Timing
- Optimization
Downloads
You can find most of the downloads for my book at the Premier Press download site. This section will allow you to download prerelease versions of source code and corrections before they appear on the publisher’s site. I have started to modernize the code for the book, using OpenGL for graphics, Carbon event loops, nib files, and universal binaries. When I update a chapter's source code, I will place it here. The following items are available to download:
- Chapter 4 Source Code (Universal Binary)
- Chapter 12 Source Code (Project Builder Version)
- Pathfinder Source Code
Frequently Asked Questions
Why do the Project Builder projects on the CD-ROM not compile?
The Project Builder projects on the CD-ROM are missing the file InfoPlist.strings, which the projects require to compile. You can download a patch from the Premier Press site.
Why does the program from Chapter 4 display only a yellow screen?
That is all the program does. If you want to display a different picture, open the resource file Chapter04 Resources in a resource editor like ResEdit and substitute your picture.
Why do the Project Builder programs on the CD-ROM crash on Mac OS X 10.2 and above?
Apple added keyboard and mouse support to the HID Manager in Mac OS X 10.2 that broke the code on the CD-ROM. The programs that use the HID Manager (Chapters 8, 10-16) will crash if you don’t have a game controller connected to your machine. The temporary solution is to turn off HID Manager support. You can see how to do this by downloading the Chapter 12 source code in the Downloads section of this page.