cocos2d

how to make iphone apps like ibeer, imilk, ibug, ibeer

Hi! I was visiting this website with cool animated apps. I was wondering how's the easiest way of building a app like those. I almost bet it uses some kind of OpenGL ES. Is it a good case of cocos2d usage? ...

Touch in cocos2d?

Cocos2d question?? How do you change the touch type? Look below image = [MenuItemImage itemFromNormalImage:@"image1.png" selectedImage:@"image2.png" target:self selector:@selector(step1:)]; Menu *menu = [Menu menuWithItems:image, nil]; image.position = cpv( -135, -185); [self addChild: menu z:2] step1 is a void defined to do somet...

Cocos2d : Adding sprites in an array causes application to Terminate with uncaught exception

Hi, I'm getting an uncaught exception error when I try to add sprites to an array, and everything looks fine to me.. I'm using MonocleStudios Simplegame project for this monoclestudios dot com/static/simplegame.zip Code should be fairly self-explanatory: [code] @implementation GameScene (id) init { self = [super init]; if (self != ...

In cocos2d (iphone) how would you animate a sprite (frame by frame)?

What is the most efficient way to do this? I have four images that I would like to play to become an animated sprite. Thanks in advance! ...

Objective-C: Trouble reading cocos2d api doc

I'm trying to read the cocos2d api doc but I'm confused about what the [...] means in something like: - (float) scale [read,write,assign] I am expecting a type and a parameter name, so something like - (void) addFrameWithFilename: (NSString *) filename makes sense. ...

ccTouchesMoved [touches anyObject] confusion??

Ok so I am still kind of trying to get my bearings in Objective-C and I thought I had it down but now I cam across this method. So there are is something that confuses me that I would like a detailed explanation on if possible. The first line: 'UITouch *touch = [touches anyObject];', now to my understanding anyObject is a hashtable? B...

Cocos2d: Scaling a sprite as it is being touched

I'm just wondering how I might do this and hoping that somebody has done something similar. I would like for a sprite to scale as the finger remains on the screen. Any tips, general guidelines, or methods I could look at would be appreciated. ...

Scaling Sprites in Cocos2d

I'm trying to scale a sprite with "ScaleTo" and "SpriteBy" but as it's growing it's "floating away". For example let's say I have a circle, and I would like the circle to double it's radius each time it's clicked. Right now my circle is growing, but it looks as though the circle is scaling about the origin/bottom left corner of the spri...

Scrollable menu using MenuItem's

What I am trying to accomplish with Cocos2d, is to create a horizontal menu, which can be swiped from left to right. I posted an image, to show my idea. The image below has a white bar, where I want to show MenuItem objects, now I want to be able to do a swipe in the white region, so that the next menu item is centered. The problem I...

Stalling in a game loop and removing sprites naturally

I'm making a game with cocos2d and I have a bunch of sprites that I would like to delete. For example I might have a bunch of characters on the screen but when my game is over I would like to clean them up. Right now I have created a special effect (particle system) as a distraction, but because it is transparent and does not cover all o...

What causes frame rate loss?

I'm writing a game with cocos2d and I have noticed that the frame rate drops as the game progresses. I've checked for leaks but everything looks fine so I'm at a loss as to what to do next. Sorry if this is a really basic question but what sort of factors cause frame rate loss? The problem seems to get worse when I clear the sprites fr...

iphone collision detection problem using chipmunk

I have 2 slight problems : chipmunk collision detection : i'm developping a game where i detect collisions between a ball and some static polygon shapes. this is working but "partially", meaning that it works for around 5 game scenes (level 1 - 5 , for ex.) but fails for the 6th one, and then on the 7th scene everything works ok etc.. b...

Problem with action

I have designed a game that the main character will jump in the screen for gaining points, but i need the player can only touch after the character landed, i had done following thing but still no work, what have i missed?? (BOOL)ccTouchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { UITouch *touch = [touches anyObject]; CGPoint ...

How can I disable the touch detection???

How can I disable the touch detection within the action that running, because I don't want the character flying in the sky like a superman if the player clicking and clicking within the action, the character will never land if they keep clicking. I found the method "isDone", is that relate to this method?? player click -> action(cannot c...

Car turning circle and moving the sprite

I would like to use Cocos2d on the iPhone to draw a 2D car and make it steer from left to right in a natural way. Here is what I tried: Calculate the angle of the wheels and just move it to the destination point where the wheels point to. But this creates a very unnatural feel. The car drifts half the time After that I started some r...

Iphone, Cocos2d

Does anyone know how to install cocos2d so it shows up in the new projects template window? ...

Multiple ParticleSystems in cocos2d

I wonder about what road I should go with ParticleSystem. In this particular case I want to create 1-20 small explosions at the same time but with different positions. Right now I'm creating a new ParticleSystem for each explosion and then release it, but of course this is very punishing to the performance. My question is: Is there a wa...

cocos2d moving objects

Im trying to move an object around the screen like in the game geometry wars. I can rotate the object just fine, however I cant seem to get it to move based on the direction it is facing. I have this code here which i think is right for doing this but I keep getting syntax errors: spriteObject.x = spriteObject.x + speed*cos(Angle) spr...

Alpha layer

I'm wondering if there is any way to achieve the effect of an alpha layer in cocos2d? I have a sprite in the shape of a circle that a want to mask of parts of. I was thinking of making a masking triangle so it appears at i piece of the cirkle is gone. Is there any way of doing this in cocos2d? ...

Cocos2d-iPhone 0.8 sound-engine woes

Hey all, looking for some advice on using the experimental sound-engine in cocos2d-iphone v0.8. What I have done is to create a class called audioManager and house it in the appDelegate so that it is available to the whole application pretty easily. I don't instantiate the class until the splash page has started so it should atleast have...