Questions tagged [cocos2d-iphone]
cocos2d for iPhone is a free open-source framework for building 2D games, demos, and other graphical/interactive applications for iOS devices.
20
questions
3
votes
1
answer
1k
views
How do I convert the coordinates of a click to a tilemap position?
How do you turn a tilemap (produced by TileD) for cocos2d where I can click on individual items and get a callback?
Is it just a case of converting captured touch and finding out where it is on the ...
24
votes
5
answers
20k
views
How to achieve uniform speed of movement on a bezier curve?
I'm trying to move an image along Bezier curve. This is how I do it:
...
9
votes
1
answer
5k
views
Basic Box2D collision detection
I don't understand how to listen for collisions in Cocos2D/Box2D. Say I have two dynamic circle bodies. One is very small and the other is relatively large. When the small circle collides w/ the ...
5
votes
2
answers
3k
views
How to make Snake Body in Snake Game?
I'm new in cocos2d and game dev. I'm still learning in game dev. My goal is to make one game like Doodle Grub. But problem is snake body. I wrote like following
...
5
votes
3
answers
10k
views
Getting isometric grid coordinates from standard X,Y coordinates
I'm currently trying to add sprites to an isometric Tiled TMX map using Objects in cocos2d. The problem is the X and Y metadata from TMX object are in standard 2d format (pixels x, pixels y), instead ...
5
votes
1
answer
783
views
Verify which bubble is connected to top using DFS
I am working on a bubble shooter game in this game i have implemented searching using DFS as suggested in this link, and this is working fine.
Update
Here is my ...
4
votes
1
answer
2k
views
How do I break an image into 6 or 8 pieces of different shapes?
I am working on puzzle game, where the player can select an image from iPhone photo gallery. The selected image will save in puzzle page and after 3 second wait the selected image will be broken into ...
0
votes
1
answer
773
views
Cocos2d patterns for simple texture management
I'd like to simplify the way I preload image resources in my Cocos2d based iOS apps. I've created a small object the just wraps a few of CCTextureCache's methods. It looks like this:
...
5
votes
1
answer
3k
views
How to make animated buttons in a menu with Cocos2d?
How do I make animated menus with cocos2d, I just want to animate the buttons and not the entire scene. Effects I look for is flipping buttons (like the back of the button is the next menu), buttons ...
4
votes
2
answers
3k
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 ...
3
votes
2
answers
853
views
Creating 2D waveform for Cocos2d game
I'd like to have a Waveform in my iPhone game that I am developing using Cocos2d v2.0.
That's the ideal wave I'd like to achieve. A simpler wave which I would still be happy with is this one.
Some ...
3
votes
2
answers
2k
views
When and how should I apply forces in a Cocos2D + Box2D game?
I have some small circles just rolling across the bottom of the screen in my Cocos2D/Box2D iOS app. The bodies are dynamic... so I make them roll by applying a horizontal force to the center of mass (...
2
votes
2
answers
2k
views
Simple 2D Flight Physics with Box2D
I'm trying to build a simple side scroller with an airplane being the player. As such, I want to build simple flight controls with simple but realistic-feeling physics. I'm making use of cocos2D and ...
1
vote
1
answer
2k
views
Making an object swing from one rope to another
I am trying to make a Tarzan like game with Cocos2D and Box2D. I am having issues with the physics - making an object swing from one rope to another. I am not really sure how to do this. Could anyone ...
1
vote
1
answer
714
views
How can i get a value from object in tmx file in Cocos2d x 3.x?
I want to set my sprite in x coordinate based on an object in TMX map file,
this is my code:
...
1
vote
2
answers
2k
views
Top down water view, cocos2d
Has anyone successfully created a top down view of a stream/river? I need to also work out how to make it look like a boat is cutting through the water.
1
vote
1
answer
3k
views
What is the correct way of changing image of existing CCSprite?
How do I correctly change sprite to show another image? Or to have another texture?
This is the way I do it now. When I need to change sprite image I increase state variable. So i have one picture for ...
1
vote
2
answers
373
views
How can I make a rectangle to an irregular shape?
I used masking for breaking an image into the below pattern. Now that it's broken into different pieces I need to make a rectangle of each piece. I need to drag the broken pieces and adjust to the ...
1
vote
2
answers
2k
views
How to deal with Character body parts from Design to Cocos2d
I'm trying to figure out the pattern the game developers use together with game designers:
See the picture below with the independent parts:
Questions:
1) Should I create different image parts from ...
0
votes
1
answer
973
views
cocos2dx: RunningScene != Scene You just Replace
I have this code for cocos2d-x 3.x:
...