Hello everyone! A few months have passed since I posted Simple Platformer Using Cocos2d and Box2d with Collision Detection. I have received many positive feedbacks and interest on the tutorial. I am glad that it has been helpful for so many in the community! Also, I would like to share the good news that the … [READ THE FULL ARTICLE]
I received a few requests for a simple Mario-like platformer tutorial. So I am keeping my promise. The sample is far from a full fledged Mario clone, but I hope it it can at least start you off in the right direction. This tutorial builds upon concepts covered in “Beginning Box2d Physics Engine” and “Side … [READ THE FULL ARTICLE]
Life has once again conspired to keep me away from updating the blog as frequently as I promised. I meant to write a simple platformer tutorial, but I had an interview with Google that seriously threw a monkey wrench into my plans. So I am just catching up on the backlog of tasks I need … [READ THE FULL ARTICLE]

I could not find a simple tutorial that demonstrated a Box2D side scroller with the camera fixed on the player. Meaning, it would give the appearance of the background scrolling while the player remains stationary in one spot on the screen. So for this article, I am going go through a simple tutorial to do … [READ THE FULL ARTICLE]

What Is It? Cocos2d comes with two physics engines. One is called Chipmunk and the other is called Box2d. Chipmunk sounds cuter and is written in C, whereas Box2D is written in C++. I chose to learn Box2d because it seems to be the more popular and mature of the two. Instead of trying to … [READ THE FULL ARTICLE]
Although it has gotten better with the new generation of the iPhone, programmers must continue to be vigilant when it comes to memory usage if they want to avoid their applications crashing mysteriously. The best way to avoid the didReceiveMemoryWarning is to minimize memory usage from the get-go. Safest sex being abstinence and all that… … [READ THE FULL ARTICLE]
While playing around with various sample codes downloaded from the interwebs, I noticed that the addAnimation method of CCSprite has been deprecated. Though it continues to compile and run without a hitch, my OCD comes to the rescue. If you refer to the API reference for version 0.99.5 of Cocos2D (here if anyone is interested), … [READ THE FULL ARTICLE]

This is a continuation of yesterday’s entry Animation in Cocos2D (running across the screen). I want to achieve the same animation but use a texture atlas instead of loading individual sprites. What is it? A texture atlas (sometimes called a texture sheet) is simply a single image which contains all (or some) of the sprites … [READ THE FULL ARTICLE]

Introduction I have always been mesmerized by video games and have wanted to make games since I started programming. The kind of games that I wanted to make were the kinds that were being produced by big studios with multi-million dollar budgets. So every time I tried to venture into it, I let myself get … [READ THE FULL ARTICLE]

Here is a very simple but a useful tip. Instead of using NSLog to print out debugging information, define a custom macro that prints out the message along with the class name from which it is being printed only when it is in debug mode. This is very convenient because you do not have to … [READ THE FULL ARTICLE]
