Category Archives: Cocos2D

How to find your Google Plus ID

By | September 27, 2012

This is so simple 1. Go to your Google + account (https://plus.google.com/). 2. Click on the Profile icon on the Left. 3. If you look at the URL in the address bar, it should look something like this: https://plus.google.com/104653270154306099169/posts 4. The long numerical string in the URL is your Google+ ID. Here is CoderzHeaven’s from… Read More »

How to move a body manually in Box2D? or Give a force to a body in Box2D, iPhone.

By | April 28, 2012

This is a sample code to move a body in Box2D . First you have to make a body with variable name “moving_rec” and call the below function in a schedular at regular intervals. -(void) moveBody{ b2Vec2 force = b2Vec2(0,0); force = b2Vec2(0,3); //Giving the x an y to negative will move the body in… Read More »

Pause And Resume iPhone Game Using Cocos2D

By | April 26, 2012

More than usually we need to apply the functions of Pause and Resume/Play for our games. In Mac’s cocos2D programming it’s more than simple. Simply use the following code for Pause & Resume where ever you want! /*For Pausing the game*/ [[CCDirector sharedDirector] pause]; [self pauseSchedulerAndActions]; //Call for pausing all schedulers and actions /*For Resuming/Playing… Read More »

How to get Device Orientation in Cocos2D, iPhone in Objective C?

By | April 17, 2012

Hello all…… We may need to know that what is your current device orientation. Using the below code you can do this. Note: If you have to explicitly set the orientation of your phone to any of the above you can set this in the appDelegate.m file. You can put an “||” (OR) symbol in… Read More »

Simulate a Balloon in Box2D, iPhone or ANDROID

By | April 12, 2012

Hello……… Sometimes you may want your body to act against the gravity of the world. One method to do this is described below. First what you have to do is to make a body in the shape of a circle and give it the image of a balloon as the userdata. Then in the tick… Read More »

Sprite Animations Without Sprite Sheets

By | April 7, 2012

You can simulate any animations if you have a sequence of images which makes the illusion of that animations and rendering those images to the screen. In cocos2D it can be done in two ways, with sprite sheet animation and without sprite sheets. Here we are going to see how it can be done with… Read More »

Sprite Animations Without Sprite Sheets

By | April 7, 2012

You can simulate any animations if you have a sequence of images which makes the illusion of that animations and rendering those images to the screen. In cocos2D it can be done in two ways, with sprite sheet animation and without sprite sheets. Here we are going to see how it can be done with… Read More »

Sprite Animations Without Sprite Sheets

By | April 7, 2012

You can simulate any animations if you have a sequence of images which makes the illusion of that animations and rendering those images to the screen. In cocos2D it can be done in two ways, with sprite sheet animation and without sprite sheets. Here we are going to see how it can be done with… Read More »

How to use CCProgressTimer in Cocos2D to show progress?

By | April 7, 2012

The progress timer takes a sprite and, based on a percentage, displays only a part of it to visualize some kind of progress in your game. You can choose between radial, vertical, and horizontal progress timers. But the timer doesn’t update itself. You have to change the timer’s percentage value frequently to update the progress.

Sprite Animations Without Sprite Sheets

By | April 7, 2012

You can simulate any animations if you have a sequence of images which makes the illusion of that animations and rendering those images to the screen. In cocos2D it can be done in two ways, with sprite sheet animation and without sprite sheets. Here we are going to see how it can be done with… Read More »

Creating Menu in Iphone Cocos2D or Box2D?

By | April 3, 2012

Use CCMenuItemSprite and CCMenu in iPhone to create menu. call this function to set up the menu for your home page in your iPhone game or you can change this code directly to ANDROID and it will work. Make sure you have all the images mentioned in the above example. This menu will appear on… Read More »

Creating Menu in Iphone Cocos2D or Box2D?

By | April 3, 2012

Use CCMenuItemSprite and CCMenu in iPhone to create menu. call this function to set up the menu for your home page in your iPhone game or you can change this code directly to ANDROID and it will work. Make sure you have all the images mentioned in the above example. This menu will appear on… Read More »

Creating Menu in Iphone Cocos2D or Box2D?

By | April 3, 2012

Use CCMenuItemSprite and CCMenu in iPhone to create menu. call this function to set up the menu for your home page in your iPhone game or you can change this code directly to ANDROID and it will work. Make sure you have all the images mentioned in the above example. This menu will appear on… Read More »

Creating Menu in Iphone Cocos2D or Box2D?

By | April 3, 2012

Use CCMenuItemSprite and CCMenu in iPhone to create menu. call this function to set up the menu for your home page in your iPhone game or you can change this code directly to ANDROID and it will work. Make sure you have all the images mentioned in the above example. This menu will appear on… Read More »

Angry Birds Again, Angry Birds Space, the new Angry Birds coming.

By | February 18, 2012

We know Angry Birds have conquered almost all tablets and now the completely new edition is launching this March. Acoording to the reports the new game will be launched on March. Angry Birds Space already has an official website with an image of a slingshot on the Moon overlooking Earth. The official blog spot says… Read More »

How to save data or score in Android Cocos2D?

By | January 21, 2012

Hello Friends Today I will show you how to save data in cocos2D android in a database and reload it when the game starts. This has been always a problem withe game developers for cocos2D android. I will show you a way to save almost any number of data in a database using SQlite in… Read More »

How to Fix ‘Warning : Multiple Build Commands For Output File' ?

By | June 14, 2011

Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »