First, sorry for my English, im not an American. My question is how can I remove the shape and body from the space, this isn't related with collision detection. Im triying to do this with a touch event, specifically I'm trying to clear a ball Touching it (I have a lot of balls in the space), but I have no idea how to do it, I have been l...
Yeah, not sure I understand the difference.
Because you can specify the target object by using CCCallFunc as well.
...
I'm trying to make an application in cocos2d that can be used on multiple platforms (iPad, iPhone, iPod touch). Let's say I set a point to (360,160). The point would show up three fourths from the left and half way up the screen on the iPhone. Would it also do this on the ipad, or would I have to set the point to (768,384) to achieve thi...
I'm trying to call the labelWithString function and I'm getting the following run-time errors:
Error: CGContextSetGrayFillColor: invalid context 0x0
Error: CGContextTranslateCTM: invalid context 0x0
Error: CGContextScaleCTM: invalid context 0x0
This is the line of code that I tracked it down to:
self.label = [CCLabel labelWithString...
HI,
I want to develop and app where a ball will be moved according to the direction of shake.The ball also bounce when it reach on edge....just like real world tennis ball....please give me
initial idea....i want to go with cocos2d....can it help me.....
Thanks
...
Hi all. I'm trying to use more than one sprite sheet because I can't fit them all on one and having two makes my ordering them easier (sprite sheet one sprites are in the back and have a lower zOrder). I'm currently doing:
spriteSheet1 = [[CCSpriteSheet spriteSheetWithFile:@"spriteSheet1.png" capacity:3] retain];
[[CCSpriteFrameCache sh...
Hi,
I am using levelSVG code can anyone tell me how to move sprite up using up key in joystick?
Right now in levelSVG if i am touching up then it will move left and if touch down then move right but i want to move up and down.
Thanks,
...
How to add icons for iphone and ipad in cocos2d for universal app?
...
How to make me game to be displayed in multiple languages
...
Hi,
I am following the tutorial http://www.bit-101.com/blog/?p=2115.In this tutorial i found a project template and go through it to begin....
I have downloaded cocos2d-iphone-0.99.1 add the subdirectory
cocos2d to project….but when i built i got 9 error and 4 worning
Scene.h: No such file or directory
Director’ undeclared (first ...
Hi,
i am using the following code to draw a circular edge in scene.
// Create edges around the entire screen
b2BodyDef groundBodyDef;
//groundBodyDef.position.Set(0,0);
b2Body *groundBody = _world->CreateBody(&groundBodyDef);
b2PolygonShape groundBox;
b2FixtureDef boxShapeDef;
boxShapeDef....
HI,
I have 2 layer one is game layer and another one is change background layer
now i want like if any user will select image from change background layer then in that background should be come in game layer scene.
Can anyone tell me how can i do it using cocos2d?
...
I have a loading screen that I initialise with a label to display the loading progression.
I want to call my DataManager AFTER initialising the loading screen, and then call a method to switch scenes. Here is my code:
-(id) init {
if((self=[super init]))
{
loadingLabel = ....
[self addChild:loadingLabel];
/***** This is...
Hello.
I have a Chipmunk shape, with a body, in a space. I am removing the body from the space so that I can position it and not have it fall due to gravity etc. I need to be able to make this body move, so I am not making it static.
I need the body to update it's position according to the position of a Cocos2D sprite in the scene + ...
Hi,
I am developing an iPhone app using cocos2d and box2d.In this app i require to set a timer.
The timer will show the remaining time in hand of an player to reach destination...
how can i do that.....i have drawn a scene but no sure as i am beginner how to add timer..
thanks
...
Hi,
I apply impulse in an object in box2d iPhone app and now want to increase its speed in particuler direction....i mean i need two thing
1.through the object in a direction
2.increase speed
plz help..
...
how to avoid flickering effect when i change my game orientation according to device orientation for ipad in cocos2d.The game orientation changes even if small change in device orientation. Can i set a timeinterval.
...
Hi all
Im just having trouble reading and writing NSString to a dat file on the iphone.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *saveFile = [documentsDirectory stringByAppendingPathComponent:@"Profiles.dat"]...
How to rotate the Default.png in cocos2d as per device orientation. I heard that we have to put 2 files Default-LandscapeLeft.png and Default-LandscapeRight.png in resource folder and remove default.png. How to make it viewable in portrait mode.
...
Hi all
im getting a EXC_BAD_ACCESS error on this line.
[(CCMenuItemSprite*)[profileSelectionMenu getChildByTag:333] setNormalImage:normalSprite3];
Basically im just trying to change the normal image of a CCMenuItemSprite.
normalSprite3 and selectedSprte3 are both CCSprite. and i set the properties off them to retain but it still alway...