My game ‘Feed Garfield’ has been launched on iPad. I made this game on Cocos2DX/Box2D. Visit the following link to download:
https://itunes.apple.com/app/id584328409
My game ‘Feed Garfield’ has been launched on iPad. I made this game on Cocos2DX/Box2D. Visit the following link to download:
https://itunes.apple.com/app/id584328409
Well folks, as promised Garfield is now available for download from Amazon store. This app was built using Cocos2DX and Box2D. Its available for download at USD 1.99. Just following the link below to the store:
Team Members: Amir Ali, Muhammed Ali Khan, Rumaisa Mughal, Aqib Zafar. The game was built for Pilabs Inc. My heartiest congrats to Munir Usman for bringing the team together and making this possible.
Im very proud to announce that pilabs has been globally recognized for its work on Feed Garfield. Feed Garfield was created on Cocos2DX and has been launched for iPhone/iPad and Android. Indeed, a great achievement for Munir Usman, CEO Pilabs Inc. and Amir Ali, CTO Pilabs Inc. for putting together a great team and assisting them to the completion of the project.

Feed Garfield – Ranked number 1 in China! Download your copy now https://itunes.apple.com/us/app/feed-garfield/id528205899?mt=8
Feed garfield has been launched on itunes. Its soon to be launched on Android as well. Stay tuned for the download link. The game is built on cocos2d-x and uses Box2D.
Team members: Munir Usman, Amir Ali Jiwani, Rumaisa Mughal, Aqib Zafar, Arqum Gadit and Muhammed Ali Khan (myself). A special thanks to Amir Ali Jiwani for the help, support and training he extended to the rest of the team to make this project successful. Thanks everyone who was directly and indirectly involved in the making of this game.
Here is a link to the game: https://itunes.apple.com/us/app/feed-garfield/id528205899?ls=1&mt=8
Here are w few macros that i wrote to make the code more readable and to compress it in order to make more sense. The most important part of development is to keep the code simple and readable. This has multiple benefits which range from ease of working in a team to manageable code. When you code is clean and organized, you will be able to concentrate more on game logic rather getting lost in the syntactical complexities of the language.
Purpose: gets the x position of the ccnode
#define PX(__NODE) __NODE.position.x
Purpose: gets the y position of the ccnode
#define PY(__NODE) __NODE.position.y
Purpose:gets the CGSize of the ccnode
#define CS(__NODE) __NODE.contentSize
Purpose:gets the width of the ccnode
#define WDT(__NODE) __NODE.contentSize.width
Purpose:gets the height of the ccnode
#define HGT(__NODE) __NODE.contentSize.height
Purpose: gets half the width of the ccnode
#define WDT2(__NODE) __NODE.contentSize.width/2
Purpose:gets half the height of the ccnode
#define HGT2(__NODE) __NODE.contentSize.height/2
Purpose:gets the center point of the ccnode
#define CENTER_POINT(__NODE) ccp(WDT2(__NODE),HGT2(__NODE))
Purpose:gets the screen size (CGSize)
#define viewportSize [[CCDirector sharedDirector] winSize]
Purpose:gets the center point of the screen
#define centerScreenPoint ccp([[CCDirector sharedDirector] winSize].width/2,[[CCDirector sharedDirector] winSize].height/2)
Purpose: calls release on an object and nullifies it
#define RELEASE_OBJECT(__NODE){ \
if (__NODE) { \
[__NODE release]; \
__NODE = nil; \
} \
}
Purpose:calls release of each object held at the index of the array, releases the array itself and nullfies the pointer.
#define RELEASE_ARRAY(__NODE){ \
if (__NODE) { \
[__NODE removeAllObjects]; \
[__NODE release]; \
__NODE = nil; \
} \
}
Purpose:removes the sprite from the display list and nullifies its pointer. It does NOT release the sprite. This macro is for objects owned by cocos2d classes/code
#define RELEASE_SPRITE(__NODE) { \
if (__NODE) { \
[__NODE removeFromParentAndCleanup:YES]; \
__NODE = nil; \
} \
}
Purpose:gets a random integer with a specified range
#define GET_RANDOM(min, max) \
((rand()%(int)(((max) + 1)-(min)))+ (min))
Purpose:adds child in the mentioned parent and positions it
#define ADDCHILD_POSITION(_object, _parent, _position){\
[_parent addChild:_object];\
[_object setPosition:_position];\
}
Purpose:adds child and positions it while giving it a tag and zindex
#define ADDCHILD_POSITION_TAG_ZINDEX(_object, _parent, _position, _tag, _zIndex){\
[_parent addChild:_object z:_zIndex tag:_tag];\
[_object setPosition:_position];\
}
Purpose:gets the coordinates on the screen where the tap was made. used in ccTouchesBegan, ccTouchesMoved, ccTouchesEnded and ccTouchesCancelled functions
#define GET_TOUCH_POINT(__TOUCHES) \
[[CCDirector sharedDirector] convertToGL:[[__TOUCHES anyObject] locationInView:[[__TOUCHES anyObject] view]]]
Purpose:Its a good practice to use such variables. A change in the font family later on will be quite problematic to make. Using this variable, single change will cause the change in the entire application.
#define APPLICATION_FONT_FAMILY @"Arial"