cocos2d

iphone: how to do Page turning

hi frnds, I am facing the problem from a month and didn't find anything from google.. I am using UIView for pdf display. there is no problem with pdf but problem is with transition. I have to turn each page of pdf with realistic page turn exp. I search, dig a lot about that but i didn't get anything that how to do that. I don't want t...

how can we implement Input Dialog box in cocos2d

In cocos2d how to bring a Input dialog box for getting user name. Is there any way than using view based application? ...

How can I get touch co-ordinates in cocos2d?

Hi, I am a newbee in iPhone game development. What I want is that wherever user touches on iPhone screen, where I will display a pic at that place. Can anyone help me how to get co-ordinates of the area everytime when user touches the screen? Regards, Nouman ...

Adding admob to an iPhone app with cocos2d make the game crash... ?

Hello, I'm working on a cocos2d game on iPhone. The game work perfectly. Now I want to add an admob ad in the menu of my game. I can see the ad, but after few seconds (or minutes) of playing, the game crash (with no error message...) Can you see where the problem is? Menu.h @interface Menu : CCColorLayer <AdMobDelegate> { AdM...

How to get the location (x,y) of a CCLabel that is a child of a CCScene?

(learning Cocos2D) After creating a CCLabel and adding it to a CCLayer like this: //From HelloWorldScene.m // create and initialize a Label CCLabel* label1 = [CCLabel labelWithString:@"Hello" fontName:@"Marker Felt" fontSize:10]; label1.position = ccp(35, 435); // add the label as a child to this Layer [self addChild: label1]; Ho...

In what ways is Cocos2d better the the APIs already given to you by Apple? (Just examples not opinion).

I don't want a debate... I just want examples because I thought the stuff Apple gives you is already pretty good. Are there any particular reasons that Cocos2d is better for game development? ...

How to add cocos2d into current project?

I am developing my project, but I found that the cocos2D project is quite useful, how can I add the the cocos2d into current project? thz. ...

Cocos2D TouchesEnded not allowing me to access sprites?

Hey Guys! Thanks so much for reading! - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch * touch = [touches anyObject]; CGPoint location = [[CCDirector sharedDirector] convertToGL: [touch locationInView:touch.view]]; CGRect myRect = CGRectMake(100, 120, 75, 113); int tjx = sprite.position.x; ...

Not sure how to use ccTouchesBegan to do what I want it to do.

So when I see ccTouchesBegan (or touchesBegan for that fact of the matter) I see something like this usually: - (void)ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { UITouch* touch = [touches anyObject]; } But, what I am not getting is how do you just detect if one object has been touched? For example how would I check i...

Multiple MPMoviePlayerViewController fullscreen movie init & switching issue - Fullscreen View doesn't autorotate and minor similar issues

Hello SO Friends, This is my first post at SO. I would like to thank all of the SO users, their contribution have helped me a lot in all of my projects. I am new to the iPhone Application development scene. Aim of the project is to have a custom interactive User Interface (UI) on top of Movie Player objects (*.mov files on device). Th...

small sprite touch

There are some games which have some small pictures as sprites and can move by touch.If the sprite is a larger picture,the touch is quite normal.And we can use the function CGRectContainsPoint check for the sprite.But when the sprite is quite small,this function looks not good.Is there other method can sovle the problem? ...

Cocos2d:How to Zoom-in Zoom-out effect on a Sprite image?

Hello everyone, I am developing module where-in i pick the image from photo library and put into a Sprite. I want to implement Zoom-in, Zoom-out kind of effect for a Sprite image, same like camera album images zoom in/out effect. Could someone please guide me how do i implement it? I see somewhere is that, i have to detect two touch eve...

Dynamically create sprite images for Cocos2d-iPhone

Hey guys, I'm working on a platformer, and looking for a way to create a sprite for an arbitrarily sized platform. For example, I may know I have a platform that should appear 200 pixels wide by 32 pixels high, and, say, I have a texture of bricks that I can tile to fill that area. I may also want to draw a black border around the platf...

iphone app rejection question

My iPhone app was rejected with the following note: The following non-public APIs are included in your application: Spi Symbols __memset_chk __memmove_chk" These symbols appear in a small number of apparently cocos2d related object files: Grid.o Primitives.o TextureAtlas.o Curiously, this app had already been approved u...

move sprite by using touchmoved in specified regions of screen

hi friends, I am making an application, in that I want to move the sprite in a specified region of the screen, With cocos2d I am not able to make move of sprite, I only know the method -(void)ccTouchMoved:(UITouch *)touches withEvent:(UIEvent *)event, but I don't know how to move a sprite, can any one help me???? Thanks in advance ...

Is it possible to change 2-3 times f->SetSensor() ?

Hello there ! i use cocos2d-iphone-0.99.2 and integrated in it box2d. i have 2 kind of sprites with tags 1 and 2. Also i created bodies and shape definitions for them. what i'm trying to do is to make sprite1 kinds to act as solid or act as not solid when sprite2 colides with them. i tried this code : for(b2Body *b = _world->GetBodyL...

Square collision detection problem (iPhone).

Hi, I know I've probably posted three questions related to this then deleted them, but thats only because I solved them before I got an answer. But, this one I can not solve and I don't believe it is that hard compared to the others. So, with out further ado, here is my problem: So I am using Cocos2d and one of the major problem is they...

Rotating a cocos2d sprite on an anchor point outside of the sprite

Currently the setanchor function only sets the anchor within the sprite frame. Is there any (easier) wway to change the anchor point to a coordinate on screen space? My purpose is to allow the sprite to rotate around a circle. TIA for any suggestions made. ...

buttons and menu items in cocos2d/objective-c

In my app, I'd like a method called whenever the user taps the screen (anywhere on the screen). Normally, I'd make a transparent UIButton that covers the whole screen. If I'm using the cocos2d framework, what's the best way to do this? Is it good practice to still use UIButtons? I've been reading about MenuItems but haven't found an eas...

iPhone: Camera following player in cocos2d

I'm making an iPhone game in cocos2d. I was wondering how I would make the camera / the view follow a specific sprite? would I use the CCCamera class? ...