0
votes
0answers
20 views

Maintaining a constant magnitude of speed of a CCNode's physics-body after collision with a static body

I have two CCNode class "Baffle" and "SmashBall" with there physics bodies. Here are the PhysicsBody details of Baffle // Defining the physics body CCPhysicsBody * physicsBody = ...
1
vote
1answer
459 views

difference between cocos2d-x vs cocos2d-js

I'm just moving towards native apps... A friend of mine told me to start with cocos2d, I'm good in javascript. while searching google for cocos2d, and within cocos2d-x.org i found cocos2d-x ...
0
votes
0answers
57 views

iOS + cocos2d: how to account for sprite's position for the different device dimensions in an universal app?

All the questions I've seen regarding iOS universal apps (with or without cocos2d) deal with the "how to add graphics to a universal app". My question is, how does the code need to be written to ...
0
votes
1answer
133 views

Particle effect in sprite

I want to create a particle effect when my player sprite collide with my star sprite. How can I add a particleSystem in the sprite and not in a image? Also, I wish if it could wait for the animation ...
-4
votes
1answer
96 views

How can I develop a game for iOS? [closed]

I have a Mac arriving in the next few weeks, and plan to program a 2d game. I know a little bit of Java but nothing about Objective C. I've heard about cocos2d -- it seems good but I don't know ...
1
vote
0answers
51 views

Building a guided tracing scene

I'm trying to figure out an approach to creating a cocos2d scene that would help kiddos learn to draw letters of the alphabet. Right now I am just using Apple’s PaintView demo code and applying an ...
0
votes
1answer
94 views

How set and count Angle of sprite (turret) object in portrait mode in cocos2d?

I am new in cocos2d.I follow Raywenderlich tutorial series. I wish to set turrets in below of the screen in portrait mode.when user touch that location fire bullet and turret fire position at the ...
0
votes
1answer
66 views

Create body on a sprite (box2D)

I'm quite experimented in objective C, but now i'm tried cocos2D and his features. I need to add a body on a spritesheet (if possible on a classic 'UIImageView'), in order to detect collisions after. ...
0
votes
1answer
278 views

cocos2d collision detection between two ccsprites i am using boundingBox but this method is not working [closed]

I am making a cocos2d side scroller and I am currently putting collision detection in. I have an enemy that shoots at the player. I want to have the bullets disappear when they hit the player. The ...
0
votes
2answers
89 views

How to define axis of Sprites in a CCAnimation?

I'm struggling to find how to define a kind of axis in my frames, when my sprite punches it moves back. I want to define the head as a pivot for the other sprites with different sizes. How can I ...
2
votes
1answer
81 views

Display CCSprites with a delay

I am a beginner in cocos2d and I wanted to display coin CCSprites as soon as it moves off the screen with a 5 second delay. So this is what I wrote in my main gameplay layer to add 7 coins in a row: ...
0
votes
1answer
138 views

Cocos2D SpriteBatchNode vrs. SpriteFrameCache… I do not see any performance difference

I have tried using both ways... adding the .png file on the cache with SpriteFrameCache.. adding .plist with spritebatchnode adding the correspoding .png file, I didnt see any performance ...
0
votes
1answer
109 views

Exporting spritesheet for Cocos2d

I would like to know how people usually save the animations in order to load them easily in Cocos2d with as few hard-code as possible. E.G. The solution I thought of is to have one plist file ...
2
votes
2answers
2k views

Repeat image on a fixed background, Cocos2D?

I'm quite new to Cocos2d, does anyone know how to create a background that would be one fixed screen (no scrolling), with a small image just repeated to the whole size of the screen - depending on ...
1
vote
1answer
221 views

Preserving Cocos2D context between UIKit screens

My app is designed to use Cocos2D in the "main game screen" but the rest of the screens are in UIKit. While I feel that this isn't ideal, I really don't have time to port the rest of the screens into ...
1
vote
1answer
937 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
1answer
993 views

Integrating game center into cocos2d

I have a Cocos 2d game in which I want to have achievements and a leader-board. What are the steps I would need to take? Thanks P.S All of the tutorials I have found are outdated. So please write ...
3
votes
2answers
412 views

Separating UI and logic in Objective-C at iOS based Games

How to separate UI and logic in Objective-C based mobile games? To develop games, I use Cocos2d library. I need a good reference to separate my UI code from game logic code.
7
votes
2answers
937 views

What is the correct way to implement hit detection with non-rectangular sprites?

What is the correct way to implement hit or touch detection for non-rectangular sprites in Cocos2d? I am working on a jigsaw puzzle, so our sprites have some strange forms (jigsaw puzzle bricks). As ...
1
vote
1answer
534 views

Unit Testing with Cocos2D

How to implement Unit Testing with Cocos2D framework? What are the good practices? Is there any testing framework like JUnit Framework at Eclipse for Android?
-2
votes
1answer
1k views

Rolling a 3d die in cocos2d

How can I have a 6 sided die in my cocos2d game and when the device is shaked the die rolls and shows a number? I would also use UIKit if it was necessary.
0
votes
1answer
312 views

Touching a CGRect

In my cocos2d app I am trying to determine when a CCSprite is touched Here is what I have: -(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{ NSMutableArray *targetsToDelete = ...
0
votes
2answers
164 views

Falling images that can be pressed

In my cocos2d app I am trying to make images fall from the top of the screen and detect when they are pressed. I am having a hard time. Can anyone help me achieve this? Thanks.
0
votes
1answer
428 views

Keeping the CCSprite on the screen

In my cocos2d app I have a CCSprite moving on the screen but it moves off the screen. How can I prevent the CCSprite from moving off the screen? Thanks
2
votes
1answer
394 views

Which data structure should I use for dynamically generated platforms?

I'm creating a platform type of game with various types of platforms. Platforms that move, shake, rotate, etc. Multiple types and multiple of each type can be on the screen at once. The platforms will ...
4
votes
1answer
478 views

Cocos2d: Tongue effect like in Munch Time

I'm wanting to do a tongue effect for my character like the one in Munch Time( shown in pic ). The player does some action and his tongue attaches to the nearest platform. I'm thinking this is ...
0
votes
1answer
2k views

How to simulate a water splash effect?

I need to achieve the effect of a ball falling down into a pool then splashing in the water. At first, I made a sensor to detect the collision between the ball and the water and then show the sprite ...
4
votes
1answer
490 views

Organize a game set

I'm developing a endless running game and I'm not really sure on how to make the set. The first approach was to make a BIG set like 10240x3072 pixels so that we have a nice portion of set. After ...
2
votes
0answers
1k views

Opening URL in browser using C++ with cocos2d-x in iOS [closed]

I'm banging my brain against the wonderful lib xport that is cocos2d-x from the original cocos2d iOS library. What I want to ask is how to open a web link in the safari browser? I don' know how to ...
3
votes
2answers
352 views

How to move the object(tanker ) on slope image in chipmunk Spacemanager

I have used one polygon shape image (terrain)in my game its just like mountain and now i want to move the tanker on mountain path from one direction to other and then its turn on touching of the ...
0
votes
0answers
292 views

How to move a sprite on a slope in chipmunk Spacemanager [duplicate]

Possible Duplicate: How to move the object(tanker ) on slope image in chipmunk Spacemanager I have used one polygon shape image (terrain) in my game. It's just like a mountain, and now I ...
1
vote
4answers
2k views

Include Box2D libraries to a cocos2d project (iOS)

I have a problem including box2D to my cocos2d project. I've tried different ways to do it with no success. This is what I've done: I downloaded Box2D (Box2D_v2.2.1) to my project directory. Dragged ...
-1
votes
1answer
218 views

Need ideas on how to give my levels structure

I am making an iOS game for a project at school. It is going to be a tiny bit like Fruit Ninja, as in it will have different things on the screen, and when you hit them, they die, and you get points. ...
3
votes
4answers
9k views

What are the pros and cons of GameSalad versus Cocos2D?

I am currently using the Cocos2D framework for creating my game but I just happened to come across GameSalad and was amazed by this video. GameSalad claims to allow you to create games without ...
1
vote
1answer
478 views

Cocos2D Accelerometer Z axis

I am making a 2D scroller game where the player controls an airplane via the accelerometer I would like to know if it is possible to scale in and to scale out the sprite/airplane using the ...
2
votes
1answer
8k views

cocos3d versus Unity for simple IOS 3D games?

Wondering if anyone here happens to have experience in doing some simple 3D based games/apps for IOS, using cocos3d & Unity and could give some pointers....questions I have are: GENERAL 1) It ...
-4
votes
1answer
158 views

How can I initialize 15-20 sprites with the same starting position?

How can I load 15-20 sprites in Cocos2D at the same point (ccp(20,20), which is an alias for CGPointMake) using NSArray? This is what I'm doing now, and it doesn't work: int i,endvalue=3; ...
0
votes
1answer
363 views

How useful would it be to know a scripting language when developing an iOS game? [duplicate]

Possible Duplicate: Why do we use scripts in development? I just starting learning iOS game development. I plan to make games using the cocos2d framework. While reading game dev related ...