cocos2d for iPhone is a free open-source framework for building 2D games, demos, and other graphical/interactive applications for iOS devices.

learn more… | top users | synonyms

0
votes
2answers
84 views

Can CCAnimations be paused?

I am new to cocos2d. I am using CCAnimation. It's working fine, except I want to pause the animation occasionally. How do I do this? Here's what I'm doing so far: [mySprite ...
-1
votes
0answers
22 views

Applying the vector of a swipe movement to a box2d object

Hi I'm trying to achieve game functionality where the player can place their finger on an object then swipe in a certain direction and apply the speed and velocity of the swipe to the object they have ...
1
vote
3answers
887 views

Moving camera in large view

In my cocos2d app I was wondering how to make a CCSprite move on the screen but have the screen focused on the CCSprite, so when the sprite moves the view moves with the CCSprite. Is there a tutorial ...
1
vote
4answers
114 views

Timing - use individual timer for every task or global timer?

I'm writing a game, where a player controls a spaceship. It regenerates energy over time. So I need to make a little timer that adds certain amount of energy to the pool per second. My enemies also ...
-1
votes
0answers
32 views

How to make askew slope image(b2body) in Box2d?

I am new in Box2d and learning myself. I am learning Box2d from here http://www.box2d.org/manual.html#_Toc258082972 I want to make a body and want to give b2body a angle so that it will look like ...
1
vote
1answer
175 views

Need a bounding box for CCSprite that includes all children/subchildren

I have a CCSprite that has CCSprite children, and those CCSprite children have CCSprite children. The contentSize property doesn't seem to include all children/subchildren, and seems to only work for ...
0
votes
1answer
363 views

Store and create game objects at positions along terrain

I have a circular character that rolls down terrain like that shown in the picture below. The terrain is created from an array holding 1000 points. The ground is drawn one screen width infront and ...
-1
votes
0answers
25 views

Flip irregular shaped image in iphone [duplicate]

I need to implement flip effect for an irregular shaped imageview. Any help would be highly appreciated.
0
votes
1answer
334 views

Adding gesture recognizer (or dragging) to CCSprite

I'm trying to allow a CCSprite to be dragged across the screen. I've succeeded so far by doing it on a Layer level (from this tutorial). However, this only allows ONE sprite to be dragged at a time as ...
3
votes
2answers
841 views

Cocos2D: Upgrading from OpenGL ES 1.1 to 2.0

I have recently starting upgrading my ios game to the latest Cocos2D (2.0 rc), and I am having some difficulties upgrading my texture generation code to OpenGL 2.0. In the old version I generated ...
0
votes
1answer
17 views

Calling CCRepeaForever on CCLabelTTF Makes Label Not Show Up

I have a CCLabelTTF in the top right hand corner of the view. -(void)scrollScoreLabelAndMonkey{ scoreLabel = [CCLabelTTF labelWithString:@"0000" fontName:@"Marker Felt" fontSize:30 ]; ...
0
votes
1answer
20 views

Set texture of a LHSprite that is loaded from LevelHelper

How do i set the image/texture of an LHSprite that is loaded into xCode using levelHelper & spriteHelper? I am using sprite sheets. So i tried to load the image the old fashioned way using ...
0
votes
0answers
64 views

creating arcball in cocos 3d [closed]

I am trying to make arc ball sample in cocos 3d , the code seems to be ok, but the rotation of ball is not as expected it seems that i've done something stupid, but i can't figure it out. please check ...
0
votes
1answer
59 views

Cocos 2d move CCsprite in array of points [closed]

I need a CCsprite to move to the points in my array those points will form a circle.I know to move CCsprite but my app crashes when i make it to move in array of points. Help me where i am making ...
1
vote
2answers
103 views

Cocos2d savegame cctmxtiledmap

my game features several tilemaps that are initially loaded from a tmx file and modified during gameplay. How can I save the changed tilemaps in a save game? Will NSCoding do the trick here or is the ...
0
votes
0answers
35 views

Catching an object from sky in Cocos2d and Box2d world

My world has a gravity of -9.8 and there are KDynamicBodyType bodies falling from the sky. At the bottom there is a PhysicsSprite with KinematicBodyType. I want the PhysicsSprite to be able to catch ...
-2
votes
0answers
29 views

What to choose? [closed]

I am so stuck on what to choose, I want to create a game like vector (run and jump game with multiple levels) From what I've read i may use: Kobold2D Cocos2D w/ Box2D (which involves learning a bit ...
-1
votes
0answers
46 views

How to move a PhysicsSprite

I'm trying to move a PhysicsSprite from left to right based on where the user clicked. I understand that a simple Sprite can be moved by MoveTo functions but what is a way to move a PhysicsSprite? ...
1
vote
1answer
444 views

How To show document directory save image in thumbnail in cocos2d class [closed]

I have just implemented multiple photo selection from iphone photo library and i am saving all selected photo in document directory every time as a array, now i want to show all saved images in my ...
0
votes
0answers
72 views

Help with ball movement and rotation in Box2d [closed]

I am trying to learn box2d in cocos2d. I have searched for online tutorials and ray Wenderlich's seem to be the best ones!I am learning in a slow but steady pace! I am currently developing an app in ...
0
votes
1answer
119 views

Projectile immediately intersecting with target

I have a fairly simple and somewhat cookie cutter method for testCollisions: (FYI: BasicProjectile is a CCNode with a CCSprite member). for (BasicProjectile * basicProjectile in ...
1
vote
1answer
140 views

CCTMXTiledMap continuous scrolling;

I have a vertical shooter, the game scrolls TMXTiledMap, and when it runs out I want it to load next map and scroll them seamlessly without interruption. How do I achieve that? Here is my scrolling ...
0
votes
0answers
26 views

How to implement enemies similar to Monster shooter game in cocos2d? [duplicate]

We are recently creating game with cocos2d API. This game is similar to Monster shooter game for iOS and android. Following is the link to above game : http://game-lion.net/monstershooter/ In this ...
2
votes
5answers
4k views

Best way to learn iphone game development? [closed]

I know php and some python, but not much c. Where should I start to learn iphone game development? Is there some recommended books/tutorials for beginners? I'm looking at using cocos2d but I'm open to ...
1
vote
1answer
108 views

opengles display human face in iphone and animate it?

I need to make a human 2D face to 3D face. I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file. This loads the ...
5
votes
2answers
2k views

How to make bird to fly using box2d

I am new to Box2D, I have set gravity to 10. How to make an object fly in space even though the gravity is 10. What are the properties I need to set to make object fly? Is there any different ...
0
votes
0answers
69 views

cocos2d Move Sprite using buttons [closed]

Using CCMenu I have create Two Buttons Up and Down Here is the code CCSprite *normlUp = [CCSprite spriteWithFile:@"Up.png"]; CCSprite *selectedUp = [CCSprite spriteWithFile:@"Up.png"]; ...
0
votes
0answers
44 views

GetReactionForce().y does not show 0 even it has no weight

I have built a simple structure with static and dynamic bodies and revolute joints. None of the bodies have weight, I've set the density to 0. Here's the structure: In screen update method I do ...
0
votes
0answers
120 views

Bike Race Concept [closed]

I am right now developing this type of game. https://itunes.apple.com/us/app/bike-race-free-by-top-free/id510461758?mt=8 I need help for following questions. I have some solutions for this but I need ...
1
vote
3answers
332 views

Wait till all CCActions have completed

I am developing a simple cocos2d game in which I want to animate two CCSprites simultaneously, and for this purpose I simply set CCActions on respective `CCSprite's as follows. [first ...
0
votes
0answers
71 views

cocos2d - exclude GUI layer transformation

I have a game layer that should be pannable and pinchable and a GUI layer as an overlay that's excluded from the transformations. I added the pinch and pan gesture recognizer to the view and set the ...
0
votes
1answer
133 views

Using depth buffer on a sprite

I am following this guide: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps Trying to create a tiled map that also supports multiple layers. The guide says that a way is to use ...
1
vote
1answer
58 views

Issues with background coordinate configuration in objective c with runAction?

In my game I want to have two backgrounds going one after the other creating a continuous loop moving to the left. However, right now one goes, and the other does not follow it. Here's what I ...
0
votes
1answer
344 views

Cocos2d Box2d contact listener call different method in collided object

I have the building object, wen it hit with other, i want to call some method inside it. Building.mm -(void)printTest { NSLog(@"printTest method work correctly"); } in my ContactListener i ...
1
vote
0answers
124 views

iOS cocos2d - sprite gets stuck in collision detection

I'm developing a top down game in cocos2d and I have collision code that checks collisions between enemies and the player so that they don't go through each other. The code seems to work but the ...
0
votes
2answers
65 views

CCSprite as an iVar

So I built my first game app, and it was a lot of fun. I'm really trying to expand on some of the ideas, but I'm running in to some serious variable scope issue. What I want to do is encapsulate a ...
3
votes
2answers
140 views

Is it possible exchange points between players using Game Center?

I want to create a turn based two player game. In my game in a certain stage if player 1 loses he must give few points that he have to the opposite player. The game is implemented with game center. Is ...
3
votes
1answer
105 views

Collision Filtering in Box2D

I have four bodies in my Box2D World. Each are polygon shape, with some physics parameters. Now when the game start, I need one of the bodies from the World (BodyA) to not be allowed to collide with ...
1
vote
4answers
795 views

Cocos 2D - Hold down CCMenuItem

I am using the following code to move a CCSprite left and right. -(id)init{ CCMenuItemImage * moveLeftButton = [CCMenuItemImage itemFromNormalImage:@"Move Left Button.png" selectedImage:@"Move ...
0
votes
0answers
104 views

Detect Sprites, they are in Shape or Not which random draw in Cocos2d

I have searched a lot on web and found some of help ful links as exact my question. Link 1 Link 2 But still i am not success to achieve this, i have done some of code lines, as like draw line by ...
-1
votes
2answers
110 views

Move Sprite Up ad Down using accelerometer

my sprite can move up and down but some probs are there....... sprite is moving slowly , i want some speed in moving the sprite sprite is not continue move but jumping ..... sprite can not touch ...
1
vote
0answers
163 views

Can I use a shader with 2 different textures in Cocos2D (x)?

We are evaluating a variety of different graphic engines for use in our game and we want to be able to use 2 different textures for many of our sprite maps. One sprite map would be the standard RGBA ...
0
votes
1answer
281 views

3d transformation of game world keeping gameplay 2d - COCOS2D 2.0

Using: COCOS2D + iOS. I want to rotate the game world, may be loading another .tmx file for another dimensions when user want to switch dimension. the effect what I am looking for is something like ...
0
votes
0answers
106 views

Cocos3d-iOS: Need ideas for approaching a 3d app development

I am trying to develop a Cocos3d application, not a fame. This application is exactly same as flash view available in this link-> http://www.amfam.com/learning-center/my-home/interactive-home.asp and ...
0
votes
1answer
96 views

DPad style movement for AI without using A*

What is the easiest way to implement DPad style movement (No diagonal) for AI without using and A* algorithm? I thought about having the enemy catch up to the player in the Y axis first then the X ...
1
vote
1answer
64 views

TiledMaps and real objects

I'm creating a simple game for the iPhone using Cocos2d. I'm having a hard time understanding how add real objects to a tiled map. I know that you can add an object-layer to the tiled map and set the ...
3
votes
1answer
289 views

Xcode workspace with Unity3D as a sub-project?

Let's say we're developing a 2D game with Cocos2d-iPhone and UIKit and CoreAnimation. But we're also considering leveraging the 3D capabilities of Unity 3D. Is it possible that we add the ...
7
votes
2answers
716 views

What's the recommended bitrate for Background Music in iPhone Games?

What is the recommended bitrate for Background Music in iPhone Games?
3
votes
4answers
239 views

What is technical specs for iOS platform for a game?

I would like to know when a contractor ask you for a technical specs for iOS platform of a game, what's the description that you should give back to him?
1
vote
1answer
88 views

Blending transition in cocos2d

In my cocos2d-iphone game, I have 2 backgrounds (CCnodes), each containing a quite complex hierarchy of sprites. I would like to make a smooth transition between them: initially, only the first ...

1 2 3 4 5 6