cocos2d for iPhone is a free open-source framework for building 2D games, demos, and other graphical/interactive applications for iOS devices.
0
votes
1answer
37 views
Move background with the player location
I want to move background with player location in ios . I have implemented the infinite parallax background by using the CCParallax class but i don't need it. I want to do something similar to this ...
0
votes
1answer
53 views
Getting a sprite from multiple sprites for right material pattern
Not sure how accurate the question was but I'll put it this way. I'm developing a game where player will construct his/her own stuff, like bridge, building etc. using cocos2d-iphone and Box2D. First ...
1
vote
3answers
52 views
Getting different x and y coordinates for touched location on a zoomed view
I'm using Cocos2d for developing a game. I need to be able to pan and zoom when necessary, so for this reason I've added CCLayerPanZoom extension to my project. Recently I've noticed a problem with ...
0
votes
2answers
44 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 ...
1
vote
1answer
121 views
Pixel Perfect Collision Detection in Cocos2dx
I am trying to port the pixel perfect collision detection in Cocos2d-x the original version was made for Cocos2D and can be found here: ...
0
votes
1answer
70 views
iOS with cocos2d to MVC or not to MVC?
I am working with cocos2d.
All my objects are declared on the CCLayer that I'm using, I have the logic of the game there and all the CCSprites.
Should I put the CCSprite for the player and all it's ...
0
votes
0answers
30 views
cocos2d playbackground music stops drawing sprites
I am using cocos2d v2 and experiencing a very strange behaviour.
I have a couple of audio tracks which are supposed to be played as background music one after another. But I noticed when these tracks ...
0
votes
0answers
43 views
How to check collision between two sprites when each already in another's bounding box?
Sprite a attacks sprite b. b is vanished. And a is already in another b's boundingbox.
How to check a is already in another b's boundingbox. I code only to detect collision like:
if ...
0
votes
1answer
103 views
How do you align the edges of sprites?
If you have SpriteA and SpriteB.
SpriteB is a child of SpriteA.
Does anyone have a mechanism to come up with the left, right, top, side of a boundingbox() of SpriteA?
What I'd like to do is align ...
0
votes
0answers
47 views
How do I find the rotation point given a touch anchor, new position and new rotation?
I've got an Cocos2d layer which anchorPoint, position and rotation (according to http://www.qcmat.com/understanding-anchorpoint-in-cocos2d/) vary when the pinch zoom gestures. Everything works fine.
...
0
votes
1answer
58 views
how to improve sprite animations to reduce FPS
My game has different, and detailed animations throughout the game. For example, the main character has an idle stance, so its not just painted still, giving him some life. Death animation, hurt ...
0
votes
1answer
33 views
Cocos2d When The Loading Screen Scene is loading music
When the loading screen loads objects like music cutscenes, the idea is to preload the objects, so... what should happen next? Do I transfer the objects to the next scene? or these special objects, ...
0
votes
1answer
63 views
Cocos2d how to correctly preload a spritesheet before the scene start?
I'm working on a game with Objective-C and Cocos2d, the game has a huge number of images, and obviously as I add images on the spritesheet (well yes I'm using spritesheets) the loading time get ...
0
votes
0answers
34 views
Crop CCSprite in irregular shapes
I am working on puzzle app. In which i need to crop a image(CCSprite) in irregular shape polygons, each polygon would have fixed vertices.I am developing this app in cocos2d(iphone).Any help would be ...
0
votes
1answer
35 views
How to use UILongPressGestureRecognizer with sprite drag & wait?
May be it's asked before also but I couldn't find any good answer.
Please tell me how this can be implemented with UILongPressGestureRecognizer?
A user drags a sprite from X location to Y location. ...