cocos2d-iphone

Is it possible to use xib file in cocos2d

Hi all, I am creating application in cocos2d, but one thing I would like to know is it possible to use xib file in cocs2d as we are using in simple iPhone application creation? If yes then how to make call to such xib files, can any one tell me the answer, is is possible or not? Thanks in advance. ...

Problem of Sprites and labels are displayed by white boxes.

I am writing a game in cocos2d. I am using a function restartDirector in AppDelegate class. -(void)restartDirector{ [[CCDirector sharedDirector] end]; [[CCDirector sharedDirector] release]; if( ! [CCDirector setDirectorType:CCDirectorTypeDisplayLink] ) [CCDirector setDirectorType:CCDirectorTypeDefault]; [[CCDirector sharedDirector] ...

How would one use Cocos2d to create a game like this.

http://itunes.apple.com/us/app/angry-birds/id343200656?mt=8&ign-mpt=uo%3D6 So I am getting started with this all game dev thing on iphone and I decided that I will start playing with Cocos2d as my starting engine. Now just so i have a goal in mind, I picked angry birds as my initial target of what sort of game play would I like to...

[[SimpleAudioEngine sharedEngine] playEffect] with NSTemporaryDirectory()

Hi... I am recording an audio using AVAudioRecorder and the path of that audio file is NSTemporaryDirectory(), recording has been done successfuly (as i hav chkd it) Now when I am using below snippet it works fine.. NSString *path = [NSTemporaryDirectory() stringAppendingString:@"someSound.caf"]; [[SimpleAudioEngine sharedEngine] pla...

how can i add image from one scene file to another scene?

Hi. I have used cocos2d and i have 2 scene. in first scene i have one image and one menu button. if user will click on menu button then i am showing second scene with some options. now i want like if any user will click on any option in 2 scene then first scene should be come with new image. Can anyone say me how can i change it? i ha...

how to authenticate in MPMoviePlayer for iphone

Hi Friends, I want to live stream my video files and play it in iPhone. I am using MPMoviePlayer for playing the video. I am specifying the url in the below API:- MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:theURL]; But my url asks for user credentials and I am not able to pass the credentia...

How to implement pause/resume in cocos2d game ?

My question is to look for design solution for pause/resume states (including all data info, which need save ) during cocos2d game. Including following cases, but not limited: 1). User choose quit, then pop out one dialog for user to choose " quit directly", " pause " ; 2). Someone call in , pop out dialog for user to choose "quit " o...

cocos2d Moving between scene

Hi, How to move between scene in cocos2d application. i have a bird which fly in the sky so how can i set the scene changing with different location in the application. please help if anyone know the solution. ...

[super dealloc] Program received signal: “EXC_BAD_ACCESS”.

Hi, I am writing the code using cocos2d. I want to release all the memory I allocated. I have done it in dealloc method in the following way. All the objects I released are declared in interface file and property (assign) was set and are synthesized in implementation file. I used alloc method to create them like self.PlayerA = [[CCSpri...

Bad Access Error in Cocos2D Game in SKD 4, but not 3

Yeah, so this one through me or a loop for a while until I figured out what was going on. With Apple releasing the final version of Xcode today, and iOS 4 coming out yesterday, I finally started to look into porting my apps to iOS 4. So I downloaded the new SDK, and got to work. After working on my app a bit, imagine my surprise when ...

Received memory warning. Level=2. Data Formatters temporarily unavailable, will re-try after a 'continue'.

I am using cocos2d 0.99.4 and Xcode 4.0. so, I changed my AppDelegate in this way according to the documentation and example given in 0.99.4 version. - (void) applicationDidFinishLaunching:(UIApplication*)application { window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [CCDirector setDirectorType:kCCDirect...

Cocos2D iPad Vector Sprites/Spritesheet creation

Hello everyone, Is there a way to load vector graphics into the iPad using cocos(or some other method) as sprites or sprite sheets but leaving the images as vectors and not textures? The reason being is we have an animation that is just way way too big to load in as a texture so we want to scale it down using a vector image. If this is...

Use Cocos2d Within a Single iPhone View

I have an iPhone application that is mostly using standard controls. There is one view that is rendered in OpenGL (fancy graphs). In the interest of saving myself a lot of work, I looked around and found Cocos2d. It looks like it has exactly what I need (OpenGL ES, relatively simple to work with), but I've run into a problem. I don't kn...

Problem of UIWebView in cocos2d. The View is appearing in next scene also.

hi, I am using UIWebView to display the scrolling text in a scene in cocos2d. Some times the text is appearing in the next scene also. And it is not disappeared in any next scene. When I restart the game it is again fine. I released it and removed it from superview. But the problem occurs only some times . I could not get where I am wro...

Cocos2d-iphone load large scrollable image like "plant VS zombie"

How to I load a very large image eg 1024*4608 using cocos2d-iphone and be able to scroll the image? ...

Differentiate Drag and Touch in cocos 2d iphone

Hii I have an issue in drag and touch an image. I have 3 images. Let it be left, right and middle. Initially middle image is shown in screen1. If i touch that image, it should open in a new screen(2). If i drag right side, it have to show right image in that screen itself. otherwise If i drag left side, it have to show left image in that...

Cocos2d iphone touch event

Is there a way to detect touch events from another class than the Layer itself. I'm trying to have a state controlling the interaction, adding listener to the layer itself if needed instead of have the layer call a function on the current state, which might be a noop. Is the a way to use such a thing? ...

Video won't play in iPad simulator

I am trying to load a short movie file (.m4v) before the application starts However, when I using the ipad simulator, only the sound plays. There is no video running. If I change the simulator to iphone simulator, the video plays just fine. I use MPMoviePlayerController to play the movie file I even downloaded the sample mediaPlayer f...

How can I check how adds are displayed in my application before publishing application in app store?

Hi, I want some information about how the adwirl, mobclix works. How can we test our application by using dummy ads. I wrote my application using cocos2d. I did not publish my application in app store still. I registered my application in Mobclix. I got an id for my application. I want to test how adds display in my application. Is...

False order when reading Dictionary from PList

Hi, I have a plist from which i am trying to access its animations in sequence (as defined in the PList) but when I store it in NSDictionary and then try to play animation one by one it is not playing them in sequence. e.g, int index = 0; [self playAnimation:[animTypes objectAtIndex:index++]]; [self playAnimation:[animTypes objectAt...