Wow! It’s been a long time (2 months and 2 days) since I posted and a lot of things happened meanwhile. I can’t exactly cite all the stuff I learned – following the method from earlier diary entries – so I’ll write just some points, since I didn’t keep track of everything learned on these last 62 days. Also, I’m already on the first position of #iDevBlogADay waiting list, so the next posts will be “real” posts.
And how is the game programming going? I’m working on 3 prototypes (less talk, more rock, huh?), which I plan to announce here soon! :)
Learning Diary #11 entries?
Objective-C
I’ve finally understood everything about Objective-C memory management, thanks to the book Programming in Objective-C (2nd ed.). If you want to dive into iOS and/or Mac development I recommend that you read this book first. It explains everything about the core Objective-C in a clean and simple way – ok, sometimes it is too simple (it is a book for non programmers too), but once you get deep into it, it’s all about Objective-C in its roots. It also has the best coverage I’ve seen on Copying and Archiving objects. Check its Table of Contents.- [origin release]: if no one else is using the origin, the release will end up invoking the dealloc method on the origin anyway to free up its space.
- Static Typing: the variable is always used to store objects from the particular class as opposed to id, example (a dull one):
// id id number; Fraction *myFraction; myFraction = (Fraction *)number;
- @class identifier: Informs that identifier being used in the is a class. If there is a need to use these class’ methods, use #import instead.
- Categories: can’t add instance variables, have access to instance variables of the original class, affects all subclasses of the class which is being added a category. Example: if we want to add a method to NSString, just declare a NSString category! NSString (CategoryName).
- Auto retain and arrays: storing an element in an array creates an automatic increase in the reference count, while assigning it to another variable does not, so we must retain by hand.
- Notes about nil-ing out pointers: http://wilddogcow.tumblr.com/post/1117200379/nil-ing-out-pointers
iPad
- Finally got an iPad and learned what the iOs SDK brings exclusively to the iPad. Also at the moment I’m working on a nice client contract work, doing a magazine iPad App :). It’s something exciting and lovely to work with.
Flash and Flex
- This is something I’d been delaying forever too, so I’m into ActionScript, finally! Thanks to the amazing Cartoon Smart tutorials.
Box2D
- These notes are from Ray’s tutorial: How To Use Box2D For Just Collision Detection with Cocos2D iPhone: when defining Box2D custom shapes, make sure that your polygon is convex and have at max (default) 8 vertices.
- Also, when setting up the vertices: “it’s better to use the “Initialization” style and the b2PolygonShape::Set method rather than the “Assignment” style so that Box2D can automatically compute the centroid and the normals for the shape for us” (source).
Art Side
I’ve been studying art and I started drawing, “pixeling” and so on and I have a lot to say about this subject. You can wait some posts around these subjects around here now and not just programming. I have some tips on how to go from a terrible artist to start doing something reasonable and they will be published on the next article.





We are Alfred (programming & art) and Débora (ideas) and we are passionate about games. Karnak Games is our indie iPhone and iPad games development studio. 




