cocos2d is a free open-source framework for building 2D games, demos, and other graphical/interactive applications.
12
votes
4answers
605 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 ...
7
votes
2answers
524 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 ...
6
votes
4answers
3k views
Cocos2D collision detection against a random shape
I would like to brainstorm a few ways of handling how to detect a collision between a sprite and a user generated shape of some sort.
For example. There are 3 objects on the screen. The user takes ...
6
votes
1answer
452 views
Puzzle game: clipping of non-convex polygons on the figures
I have an original figure in the SVG file. I need to break it randomly on parts, an example of which is specified below:
I have an idea, to use for partitioning Voronoi diagram (Fortune's algorithm). ...
5
votes
1answer
1k views
Creating an isometric map with hexagonal tiles for iPad
I'm new to game development, so I need a little help.
I have to write down a little game which has a floor with hexagonal tiles but it must be seen in a isometric view like The Sims.
Ignoring the ...
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
964 views
top down game - checking, drawing enemy's line of sight area with obstacles
Examples of what i'm going to need:
I'm using cocos2d to draw a CCTMXTiledMap, on those tiles i'll have to draw the LOS cone.
How would i test if the player is within that cone, taking obstacles ...
5
votes
2answers
752 views
On cocos2d, what is better: one monolithic game cycle or many scheduled selectors?
I am building a simple tower defense game, and I have to take a decision between two(or more, feel free to suggest other ways) to do the game cycle.
Option 1: Monolithic game cycle:
I could have a ...
5
votes
1answer
187 views
How to flip card by a corner?
After searching "flip card" in google and our stackexchange site, there is no result and I have no ideas about how to flip a card by a corner.
I am developing a ios card game with cocos2d, in this ...
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
4answers
367 views
semi 3d walls, should I use sprite sheet or render them 3d?
I'm going to develop a game and this is just a prototype of it's graphics.
Knowing that my primary target platform is iPhone, I'm wondering if it's better to create a spritesheet containing all ...
4
votes
1answer
1k views
Should I be subclassing CCSprites?
When I am working with cocos2d I can add CCSprites to the layer or 'stage' and manipulate them.
Now, to do my ongoing calculations for movement AI and such, things that will always run, should I:
...
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
353 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 ...
4
votes
1answer
323 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 ...
4
votes
1answer
4k 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
2answers
281 views
Presenting game center leaderboard
I have the following code:
-(void)showLeaderboard {
GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL)
{
...
3
votes
1answer
311 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
1answer
1k views
In cocos2d's plist output, what are 'offset,' 'colorSourceRect,' and these other fields?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
...
3
votes
1answer
176 views
Cocos2D Command-Line Application
Is it possible to create a terminal application which uses cocos2d? I've tried to make one using cocos2d 2.x, but it requires a MacGLView to be initialized.
I need it so that I could program a ...
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
931 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
168 views
GUI device for throwing a ball
The hero has a ball, which shall be thrown with accuracy in a court on iPhone/iPad. The player is seen from above, in a 2D view. In game play, the player reach is between 1/15 and 1/6 of the height of ...
3
votes
1answer
2k views
Rendering shadow sprites in cocos2d-x
I am writing a 2D game with cocos2d-x. I want to put a "shadow" sprite on a background sprite using the equation:
MAX(0, Cd * 1 - Cs * S)
where Cd is the destination color (that is, a background ...
2
votes
1answer
1k views
Programmatically set color of Box2D body's sprite or image
In my basic Cocos2D + Box2D iPhone app I have a bunch of circular Box2D bodies. I'd like to change the color of the circles programatically. What's the easiest way to do this?
So far I'm just ...
2
votes
1answer
187 views
Side scroll game with 8000xScreen_Height, which technique is best
I got one new requirement for iOS side scroll game with screen size : 8000xScreen_Height
For this, tileMap is best or normal texture based is best? I need to use parallax background too.
Help me to ...
2
votes
2answers
540 views
How to achieve smooth gameplay in a physics based multiplayer game? (2d)
I'm using cocos2d 2.0 and Gamekit for networking. I've got a server/client model. It works over wifi (local) and bluetooth. (Xcode 4.3, Objective C)
Basically, there's a ball and 2 or more players. ...
2
votes
3answers
5k 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 ...
2
votes
1answer
5k 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 ...
2
votes
2answers
2k views
Cocos2d rotating sprite while moving with CCBezierBy
I've done my moving actions which consists of sequences of CCBezierBy. However I would like the sprite to rotate by following the direction of the movement (like an airplane). How sould I do this with ...
2
votes
1answer
69 views
Snapping of irregular images in iphone puzzle app
I am working on puzzle app in which i need to snap irregular shapes as they come in contact of one another as i am new to game development so i dont have any idea how to achieve this functionality in ...
2
votes
1answer
162 views
Handle Multiple Scene
For my game, now I adopt the strategy to create multiple scene.
For this I have to ask two question please provide your view for my and other members for improvement.
I have created single ...
2
votes
2answers
190 views
Importance of scripting engine at Cocos2d Game Engine
Each Game Engine is different and solves different problems in different ways, so the engine design does vary greatly from engine to engine (even though a lot of principles are shared from engine to ...
2
votes
1answer
210 views
cocos2d/OpenGL multitexturing problem
I've got a simple shader to test multitextureing the problem is both samplers are using same image as their reference.
the shader code is basically just this :
vec4 mid = ...
2
votes
2answers
280 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.
2
votes
1answer
283 views
How to get all child with same tag from CCLayer?
Actually i am working with cocos2d Game. I am using CCLayer for particular scene. now there are so many buttons means CCMenuitems are available. I want to disable that all menuitems having same tags.
2
votes
1answer
228 views
Wheel rotation, to change velocity of vehicle
I update the velocity of my vehicle like so:
[v setVelocity: ((2 * 3.14 * 100 * (wheel.getRotationValue / 360) / 30)) * gameSpeed]; // update on 60 fps this gets velocity on all frames divide by 60 ...
2
votes
1answer
147 views
Game speed cubic growth
Is it possible, using delta in my update method to increase a game speed variable exponentially on cubic growth (the blue line below)
My maths isn't great so I'm not sure how the formula would be ...
2
votes
1answer
1k views
Objective-c Cocos2d moving a sprite
I hope someone knows how to do the following with cocos2d:
I want a sprite to move but not in a single line by using
[cocosGuy runAction: [CCMoveTo actionWithDuration:1 position:location]];
What ...
2
votes
4answers
478 views
Changing background images frequently within a specific time range with Cocos2D
I am working on a game development project for Android. We use the Cocos2d framework. I have to design a page which contains two background images, I need to switch these images repeatedly within ...
2
votes
1answer
594 views
How do you get textures out of a png file
I have 1 png of many different textures. I want to use these textures in my iphone game using cocos2d. I found the program "Zwoptex" where you can combine many textures to one png and create a plist ...
2
votes
1answer
584 views
Cocos2d+pybox2d vs Cocos2d-Iphone
Myself and two colleagues are working on making our first indie game for PC and, we decided to use Cocos2D + PyBox2D. We decided this based on what we've seen of Cocos2D-iPhone games, but I'm not ...
2
votes
1answer
264 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 ...
2
votes
1answer
2k views
Cocos2D 2.0 - masking a sprite
I have read this tutorial about how to mask sprites using Cocos2D 2.0. http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0
But the author talks about OpenGL ES textures and ...
2
votes
1answer
290 views
Image 1 becomes image 2 with sliding effect from left to right?
I would like to show a second image appearing while a "door" is closing on my character. I've got my character in the middle of the screen and a door coming from the left. When the door passes my ...
2
votes
2answers
518 views
Importing a windows project into android using cocos2d-x
What I am trying to do today is to import a full project to Android, but no tutorials are available for that that I have seen. My approach was to create a new android project, copy all the classes and ...
2
votes
2answers
254 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 ...
2
votes
1answer
445 views
Z-order for cocos2d top-down game with sprite batching
I'm trying to understand how to create z-order system like you can see in http://www.realmofthemadgod.com/
Character is above the tree when he is in front of it and vice versa.
Also, I'm planning to ...
2
votes
1answer
830 views
cocos2d: syncing CCAnimation frames with Box2d Shape manipulations
my cocos2d game currently has a ccsprite attached to a box2d body.
during the game i apply different CCAnimations on my sprite, i would like to perform certain manipulations to the box2d body ...

