I have a simple game on the Apple App Store written entirely in Objective-C and Cocoa Touch.

I would like my next game to be like the Unblock Me game or Auqeduct where you have to drag pieces around the game board arranging them to create something or free something to exit the board.

My question is how are games like this started. Do they work on a grid? How does collision work? When one piece hits the other piece they stop. Is this all done using Core Animation for moving the pieces and using functions like "CARectIntersectsRect()" to test for collision?

I love puzzle games that involve falling blocks and color matching and puzzles like mentioned above. Is there a resource I could read more about on the principles of these games that is language independent or explains how to make them?

  • \$\begingroup\$ now I'm wondering if there is any connection bet ween this question and the other one you asked \$\endgroup\$
    – Ali1S232
    Apr 28 '12 at 18:27
  • \$\begingroup\$ Gajet, yes I am trying to have a better understanding of how I will attack this project then I did with my last one. I am hoping it will save me time. \$\endgroup\$
    – I00I
    Apr 29 '12 at 1:23

Rather than coding it all from scratch I'd personally want to use a framework like Cocos2D or Kobold2D that has built-in physics support. It can be an interesting exercise/learning tool to code up physics on your own, but I tend to assume that someone smart has already put in a ton of time making it great and hence I'd rather just get on with my project.

  • \$\begingroup\$ Yes it seems like I will be taking this route. Is it possible to only use Cocos2d for the game level screen, and nothing else. I really like using Cocoa Touch as much as possible. \$\endgroup\$
    – I00I
    Apr 29 '12 at 1:25
  • \$\begingroup\$ For sure! I use Cocos2D with Box2D and my own home-rolled openFrameworks implementation in a sort of unholy Objective-C++ union. (Many people Obj-C++ is insane, it should be said.) You often end up subclassing Cocos methods when you write your own game anyway, so you always have the option to put in Cocoa Touch objects \$\endgroup\$ Apr 29 '12 at 20:48
  • \$\begingroup\$ I should also add, though, that Cocoa Touch objects don't automatically rotate or clear, and that' why I've stopped using Apple's UI elements within my games, pretty though they may be. (You can also write rotateUIKitElements and removeUIKitElements classes to handle it yourself, or subclass the actual objects. If you do the latter, please share your code!) \$\endgroup\$ Apr 29 '12 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.