cocos2d for iPhone is a free open-source framework for building 2D games, demos, and other graphical/interactive applications for iOS devices.
12
votes
4answers
599 views
tunnel effect cocos2d
I am looking to create a similar tunnel effect in COCOS2D (iOS). Could anyone suggest any pointers?
ref Video 1
ref Video 2
Till now I have tried with several ring shape sprites with decreasing ...
10
votes
7answers
2k views
Seperation of drawing and logic in games
I'm a developer that's just now starting to mess around with game development. I'm a .Net guy, so I've messed with XNA and am now playing around with Cocos2d for the iPhone. My question really is more ...
8
votes
2answers
1k views
How to create 2D game terrain?
Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me.
I developed ...
8
votes
2answers
582 views
Where do I store strings? What's an efficient way of loading them?
I'm making a top-down RPG for iPhone. I'm using tilemaps (CCTMXTileMap) and the cocos2d-iphone engine.
I've made a class that can handle loading maps and NPCs onto the screen, a class that handles ...
8
votes
1answer
538 views
How are you handling scores that can worsen (e.g. Elo rating) in Game Center?
Currently, Game Center leaderboard scores can only change one-way (e.g. increase). This makes it impossible (I think) to deal with Elo ratings and the like. How are you getting around this in your ...
7
votes
2answers
2k views
How to create an endless scrolling background?
I need to add a scrolling background to a my game, the image is 512x512px. It's for a car game with two way traffic and I want to be able to cross over to the opposite side and drive against the ...
7
votes
1answer
2k 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 ...
7
votes
2answers
2k views
How to differentiate a tap from a drag
I'm creating an app and I'm trying to make it so I can drag a sprite (with a second sprite on top) around the screen, but if I just tap the sprite some other method should get called.
I got 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?
7
votes
1answer
5k views
Blend Modes in Cocos2D with glBlendFunc
We've been trying to replicate the most common blending modes that are available in Photoshop and Quartz 2D, but we've only come up with 3 and that's after some long searching online.
For anyone ...
6
votes
3answers
7k views
Comparison between Cocos2d and Corona [closed]
I'm having a really hard time deciding which way to go on this. I'm about to start developing a game and I haven't been able to find many good comparisons between these approaches. I don't have many ...
5
votes
3answers
1k 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:
- (void)startFly
{
[self runAction:[CCSequence actions:
[CCBezierBy actionWithDuration:timeFlying bezier:[self ...
5
votes
4answers
865 views
How to port a game from IPad to Iphone
I just finished developing a 2D side scroll game for the IPad using Cocos2d and Box2d.
Now we want to make an IPhone 4 version of the game, but I'm still not sure what is the best way to do it.
I ...
5
votes
2answers
1k 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
-(void)update:(ccTime)delta
{
...
5
votes
2answers
1k views
cocos2d Merging box2d bodies
i'm using cocos2d to build an iphone game.
my game currently has two sprites: one for the main character and another for an item i should carry once he gets on him.
the main character and the item ...
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 ...
5
votes
1answer
359 views
Do I need to roll my own polygon segmentation algorithm to automate Box2d body creation from a tile map?
Before re-inventing the wheel I figured I'd ask:
I'm working on a tile-based 2d-maze level generator for cocos2d + box2d. The idea is:
I'm using one of the well-known graph traversal algorithms to
...
5
votes
1answer
1k views
(Why) Should I choose Unity 3 or Cocos2d (or something third) for my app? [closed]
My colleague and me made an HTML 5 iPad game ( http://braille.gandzo.com/ ) and we would like to upgrade it, and our framweork is not enoguh, for what we want. Some of the things we would change are: ...
5
votes
2answers
2k 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
3answers
559 views
Determine animation frame from interval
I have an array of sprites that are displayed in-order to make an animation. There is code in an update loop that has access to a value 'time' indicating how far along the animation is. Time is a ...
4
votes
2answers
4k views
tool to create a motion path for cocos2d
I want to move a ccsprite object along a pre defined path. ( Similar to motion guide in flash) Is there any tool i can use to create this path?
4
votes
1answer
607 views
Typical Method Of Building Puzzle Levels
I am designing a puzzle game for the iphone and was wondering as most puzzle games consist of the player progressing through multiple levels. You see for example Angry Birds has over 100 levels.
Once ...
4
votes
1answer
802 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 ...
4
votes
1answer
632 views
Cocos2D-iPhone, how does the Game Loop work in Cocos2D?
Could anyone theoretically explain how the game loop works in Cocos2D and Objective-C?
If you need me to be more specific about what I'm asking, please read on.
I've got a rudimentary understanding ...
4
votes
3answers
5k views
Tracking Multiple Touches using Hash codes in Cocos2d for iPhone
How do you implement a touch hash code and reference it later? I have read about a "hash" code, but I don't understand how to use it. I want to know when two of my Sprites are touched at the same ...
4
votes
1answer
458 views
Worth using Box2d for collision but not physics?
I am currently doing some work in cocos2d-x and am thinking about using their box2d implementation for things like collision detection (but not necessarily response), range detection, and other things ...
4
votes
1answer
3k views
How to create endless scrolling landscape using coco2d's CCParallaxNode
I created a horizontally scrolling landscape using CCParallaxNode. However it does not seem to support endless scrolling in one direction. As soon as the first image "ends" the background shines ...
3
votes
4answers
494 views
Who controls my player's movement?
In my game, does my player object control the movement, or does the map object control it? (Or some other object?)
The player doesn't know about the map's contents to stop at solids, interact with ...
3
votes
4answers
943 views
iPhone Game framework on top of cocos2d?
I am using cocos2d to develop iPhone game, however, it is just an 2D engine and developer is too flexible to use them - i.e. codes tends to be unmanageable.
Are there any more high level framework ...
3
votes
2answers
462 views
How to deal with procedural terrain, pre-load or real-time calculation?
I have developed an algorithm that generates 2D terrain coordinates for my iOS 2D game. This may be a possible visual output:
The coordinates are stored in a 2D array.
mVertices[i][0] = ccp(sx, ...
3
votes
2answers
266 views
Presenting game center leaderboard
I have the following code:
-(void)showLeaderboard {
GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL)
{
...
3
votes
1answer
354 views
How do you incorporate cocos2d with regular iPhone UI widgets?
I want to build a sprite based game using cocos2d. I will be mostly drawing everything in code. I also want to incorporate iPhone UI widgets such as buttons and such. Can these be created to appear on ...
3
votes
1answer
309 views
Smoothing rotation
I've spent the last three days trying to work out how to rotate a sprite smoothly depending on the velocity.x value of the sprite. I'm using this:
float Proportion = 9.5;
float maxDiff = 200;
float ...
3
votes
3answers
1k views
Jumping a sprite while moving in a Bezier action
I'm creating a game and I need the sprite to jump (move up and down basically) while it's moving on a bezier path so it moves vertically while it still follows the path. If I do this while it's moving ...
3
votes
1answer
685 views
create a simple tilemap programatically
i am working on a tile roguelike
i got some of the basics working using this tutorial
http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d
but i want to be able to create a ...
3
votes
2answers
966 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 ...
3
votes
1answer
4k views
iPhone image asset recommended resolution/dpi/format
I'm learning iPhone development and a friend will be doing the graphics/animation. I'll be using cocos2d most likely (if that matters).
My friend wants to get started on the graphics, and I don't ...
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?
3
votes
2answers
536 views
2D Animation Smoothness - Delta time vs. Kinematics
I'm animating a sprite in 2D with key frames of rotation and xy-positions.
I've recently had a discussion with someone saying that when the device (happens to be an iPad using cocos2D) hits a ...
3
votes
1answer
278 views
Cocos2d — Check if place is free before moving (all objects)
Is there a method in Cocos2d like CGRectIntersectsRect, except instead of limiting it to one sprite, it checks for ALL objects?
3
votes
1answer
716 views
Cocos2d animation problem, [__NSCFString rect]: unrecognized selector sent to instance
I am testing (and learning) animation in Cocos2d using a series of .png's called "splash-x.png". I am getting error and at the first sight i thought it was easy to solve but it turned out that i ...
3
votes
1answer
1k views
How do you create your levels containing curved slopes in Box2d?
I have just started developing games for iPhone in Cocos2d and am currently working on a Box2D prototype. I know this is not an easy start, but I have experience in the AS3 port of the physics engine. ...
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 ...
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
194 views
cocos2d mask rotation
I've been experimenting with Ray Wenderlich's tutorial about masking sprite using shaders with cocos2D 2.0.
It works pretty well but now I'd like to rotate the mask independently of the masked ...
3
votes
2answers
306 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.
...
3
votes
1answer
926 views
Best way to prevent UIPanGestureRecognizer from firing when moving sprites in cocos2d
Im using UIPanGestureRecognizer in my cocos2d game to do drag and drop of sprites. I have a row of sprites and when I drag a sprite on top of another one, the sprite underneath it and any other ...
3
votes
1answer
202 views
How do I implement a selectable world map?
I want to have a selectable map of the world, preferably zoomable, in a cocos2d project. When I tap on a country, I want that country to be selected so that I can perform some other operations with ...
3
votes
1answer
148 views
Issue with TurnBased Multiplayer Game in Game-kit
I am working with cocos2d game in which i am implementing Game-kit. My game supports multiplayer option. Actually as given example Raywenderlich link. I am GKTurnBasedMultiplayer class from Game-kit. ...
3
votes
5answers
579 views
Should iOS games use a Timer?
No matter what frameworks we use -- Core Graphics, Cocos2D, OpenGL ES -- to write games, should a timer be used (for games that has animation even when a user doesn't do any input, such as after ...

