cocos2d-iphone

iPhone NSUserDefault with Cocos2D

Hello. I've been working on a game for a bit, I'm now trying to get it working with OS4+. I'm struggling with saving data, my method worked perfectly for OS3. I have a singleton: #import "GameState.h" @implementation GameState @synthesize gStarted; @synthesize gLevel; static GameState* _sharedGameState = nil; +(GameState*)shared...

cocos2d set mousepoint to sprite co-ordinate

Hi, I've created Cocos Apps, then inserted sprite in that. I moved sprite to mouse moved location.sprite's coordinates are out of the screen borders. any one explain how can I convert sprite coordinates to screen coordinates? That would be in (320 * 480) format!!! ...

Cocos2d scroll layer on Sprite drag

I have designed a small tutorial named "Stacker", As the name suggests, The game involves stacking blocks on each other. I have a large number of blocks to be stacked and hence all cant be accomodated in the screen itself... I m new to cocos2d and box2d but have managed to create a body with its adjoining sprite wen a user clicks on the ...

CCSequence Firing Actions in Cocos2d

I have three actions that are triggered in the CCSequence. The way I want it to be fired is that first the sprite should move in the center of the screen and then the scale action is fired. But for some reason the sprite moves to the center of the screen correctly but when the scale is fired it uses the old sprite position. id actionRo...

Sometimes CCCallFuncN is not fired in Cocos2d

I am noticing that sometimes the CCCallFuncN callback function is not triggered. I am not sure why is this behavior? [alphabetToFind stopAllActions]; id disappear = [CCFadeTo actionWithDuration:.5 opacity:0]; id actionMoveDone = [CCCallFuncN actionWithTarget:self selector:@selector(removeAlphabetToFindFromView:)]; ...

Developing A Simple Game without using Game Engines???

I am trying to develop a simple soccer game including penalty kicks in which i have to animate a ball from player to the goal post...earlier i have been using simple animations using a timer to add to the axis of ball image so that it moves from 1 point to another..but i did not have the desired result as animations were not that smooth....

Cocos2d Hello World Application is Leaking Bytes

I created a new Cocos2d application using the Cocos2d template. This is the simple "Hello World" application. I then used the instruments to check for memory leaks without changing a single line of code. And to my amazement I get memory leak here is the result: ...

What is the best way to start Cocos2d Animation of Multiple Sprites?

I have an array randomAlphabets which contains CCSprite objects. I need to start animation on these objects. The randomAlphabets array (NSMutable) can contain max of 4 elements. I am running a loop and then starting the animation. Is this the correct way? -(void) startAnimation:(CCSprite *) sprite { [self generateRandomCoordinates...

Render Anti-Aliased Lines with Textures => searching for very simple example

There is this site... ... where they explain how to draw an antialiased line. Exactly what I want! but... I don't understand how to achieve that for a simple line. I have found the online version of the book (the article is kind of derived from the book), i have downloaded the sample code (showing a stick figure doing fancy moves)...

AdMob with ios.4

i am getting lots of error. it works with ios 3.0 when i am using the Ad-mob with ios 4 can anybody give me the proper guidance,link or tutorial for Ad-Mob with ios4. ...

Memory performance with performSelectorInBackground

Hi! First of all: I've got NSZombieEnabled. I am loading XML data into a UITableView in a seperate thread because I want to display an UIActivityIndicator as the XML data is loading. In my viewDidLoad I call performSelectorInBackground as well as adding the loading indicator: - (void)viewDidLoad { [super viewDidLoad]; loading...

Admob with ios4 error occurs....... Iphone os4

My code was successfully run into the ios 3.1.3 now i update the sdk to 4.1 and code is not woking i got the error. Undefined symbols: "_OBJC_CLASS_$_AdMobView", referenced from: objc-class-ref-to-AdMobView in supportViewController.o objc-class-ref-to-AdMobView in FindViewController.o objc-class-ref-to-AdMobView in InformationD...

cocos2d:Convert iPhone App to Universal App

Hi, I have developed an App app in cocos2d 99.4 using cocos2d box2d project template.It works well in iPhone 4,iPod.....but i need it to convert to universal...i mean iPad version also ......i already upgraded it to iPad version....so that it runs in iPad...but in small size like iPhone... can any one help?? Thanks ...

XCode Analyze and Build skips every file

I am building a game using cocos2d-iphone 0.99.4 and XCode 3.2.4. When I try and and "build and analyze" the analyzer simply skips every file with various messages. My files are all skipped for the following reason: '/var/folders/kn/kn3feAZJGICNBebbEUEgS++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/QSwitch_Prefix-efddpu...

Good Cocos2d iphone tutorials?

I've been trying to learn Cocos2d iPhone, and I've been looking for tutorials. Does anyone know of any good tutorials that are modern and towards beginning? I've been doing Objective-C for about 6 months, so not that beginning. Thanks ...

problem with CCRepeatForever

I have an object that moves with CCBezierTo. CCSprite * bedrumotic = [CCSprite spriteWithFile:@"9_bedrimotic.png"]; [bedrumotic setPosition:ccp(100, 800)]; [self addChild:bedrumotic z:4]; ccBezierConfig bezier1; bezier1.controlPoint_1 = ccp(300, 950); bezier1.endPosition = ccp(500, 800); id move1 = [CCBezierTo actionWith...

iphone: memory effciency in cocos2d 0.82 VS cocos2d 0.99.4

HI, I have a game built using cocos0.82. i want to know that will there be a significant memory efficiency if i upgrade my cocos2d to latest version ? Please reply. ...

Terminating app due to unget exception 'NSInvalidArgumentException reason[sharepicture facebookAgent:photoUploaded:]: unrecognized selec'

2010-09-23 12:58:42.967 CelebBooth[2317:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[sharepicture facebookAgent:photoUploaded:]: unrecognized selector sent to instance 0x6f5b170' * Call stack at first throw: ( 0 CoreFoundation 0x02447919 exceptionPreprocess + 185 ...

Any 3D Frameworks for IPhone not Engine

Hi , I got the cocos2d framework for create 2D animation in Iphone, there is any framework for 3D animation I got Some 3D engine like SIO2,UNITY,etc... But i need Framework!!! Like cocos2d any cocos3d is there??? Pls give any suggestion for me!!! ...

email validation in UITextField in cocos2D

hi, i created a uitextfield to enter the email id. here i want to check the entered email is correct form or not. that is email id should contain minimum 3 character and one @ symbol and two dots..please give some tutorial or code ...