cocos2d-iphone

How to bring Localisation in my game

How to make me game to be displayed in multiple languages ...

cocos2d error..

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 ...

sqlite database

1 while running, data is not showing in views after Inserting/Updating in sqlite3 databse.How do i refresh database?? 2 in xcode where do i close my database?? ...

iPhone Cocos2D CCColorLayers

Hello, I am currently building a simple game in cocos2d. I wish to have a CCColorLayer which has a transparent background, but has visible children CCSprites. Is this possible, and if so how? Many Thanks, nonono ...

iphone programming ?. Change UITableViewCellEditingStyle image ?

Hello Fellows, I just need to know is it possible to change UITableViewCellEditingStyle image ?. If possible please tell me How to do that? ...

CCSprite initializer causes crash with no exception or error

I am creating a custom CCSprite class to display a custom image and set its own position as well as handle other drawing tasks. Currently I have no other code running in the custom class but the initializer, which should set the image file and the position of the sprite. Here is my - (id)init method - (id)init { if (!(self = [sup...

cocos2d: How to set a timer

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 ...

Box2d:negative value return from GetLinearVelocity();

When I use the following, sometimes I get a negative value in mmVelik.x and mVelik.y. Can anyone explain why?? b2Vec2 mVelik = ballBody->GetLinearVelocity(); ...

how to avoid flickering effect when i change my game orientation according to device orientation for ipad in cocos2d

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. ...

Cocos2d:Add uilabel in scene

Hi, I draw a cocos2d scene in window and now want to add a label on top of the scene... Any idea?? Thanks ...

Refresh/reload view after syncing on the Internet

Hi all, I'm writing iPhone application which periodically is syncing with the synchronization web service. Everything works ok, but unfortunately after synchronization user do not see any changes in the view if he visited it before. I need to force to reload/refresh some of views. How could I do that with for example viewWillAppear met...

how to make default.png to rotate as per device orientation in cocos2d

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. ...

Help Regarding Multi Language Translation in I Phone Application??

I want to create a multi language application...I want user to select language at Runtime..not from settings. How can I create It???? I know how to Localize the application based on language settings from I phone. But I want it at runtime. Please help me out..... Thanks in advance... ...

On shake of an iPhone move a ball in shaking direction..(using box2d physics)

Hi, Please look at the code first.... - (void)accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration { b2Vec2 localPoint; localPoint.Set(0,0); if (acceleration.x>1.5 || acceleration.y>1.5) { b2Vec2 mVelik = ballBody->GetLinearVelocityFromLocalPoint(localPoint); b2Vec2 forca...

How to make a connect 4 iphone game?

I want to take the next step and make a game, I had Connect4/4 in a Row in mind. How would I go about with this, I made a pong game from a tutorial and now I want to make something on my own. This type of game doesn't seem that hard to make or perhaps it is? Anyone got any good advice or some sample code or instructions? Thanks for a...

How to change scenes in cocos2d while retaining state of the original scene

Hello, In my cocos2d project, I have two scenes. I transition between the two using CCDirector's replaceScene. Is it possible to save the state of the current scene so that when the scene is changed to a different scene, and then changed back to the original, all the objects and variables in the original are the same. Thank you, nonono...

iPhone - Unloading a cocos2d game that is running inside a View Controller

So here's the deal, I've been making a game based off of the open-source tweeJump as a small part of a larger application. I have successfully gotten the game to load (from a tableView) and am able to play it, but I am not quite sure how to stop running cocos2d and return to the table view that starts the game. I have tried implementing...

How to safely remove objects from NSMutableSet (cocos2d-iphone)

Hello. I'm rather new to serious programming, so please forgive my dumbness, but I've failed to figure this out by myself. I am writing a game with cocos2d-iphone. I have a scene object with several NSMutableSets in its ivars - units, buildings, rockets, etc. I have a problem removing objects from these NSMutableSets. When a bullet obj...

How Can i create two separete iPhone & iPad specific apps from a Universal binary?

Hi I have an Cocos2D Game which i upgraded to universal binary. Added separate images for iPhone & iPad. Now i want to create two separate device specific targets because universal app increases the app size. Can anyone please guide me through this.. Thanks Narinder ...

How do I make a BattleShips Iphone game?

How do I make a Battleships game for the Iphone? I'm new to programming, I've done some tutorials and I feel I'm making progress with this but I would like to make a full game like battleships. Can anyone help me out with this? I'm trying to learn cocos2d-Iphone so I would like to use that if possible. David ...