Cocos2D is a Python based open source framework for building 2D games and graphical applications for Windows, Mac and Linux desktop computers. Cocos2D is published under a BSD license.

learn more… | top users | synonyms

0
votes
1answer
12 views

Overlapping MenuItems in Cocos2d CCMenu

I am trying to make a Menu that contains 13 MenuItemImages in two columns (the last one is in the middle). The frame width/ design resolution width is 480 pixels. MenuItemImage width is 180 pixels. ...
0
votes
1answer
12 views

cocos2d SDK, iOS template is missing

I've installed cocos2d SDK (stable version cocos2d-iphone-2.0.tar.gz) and its templates but just three templates added to my xcode and all for Mac but another option for iOS supposed to be installed, ...
1
vote
1answer
12 views

How To Use CClistview In COCOS2d Android?

Hi I am working on cocos2d game so in this game i have to display score level wise ================================================== Level Score 1 500 2 600 3 ...
0
votes
1answer
14 views

access to particles's property of CCParticleSystemQuad in cocos2d

i am very new to cocos2d and ios development. I am creating animation using particle system.I have implemented one particle system using CCParticleSystemQuad class of particle system class. i want to ...
-1
votes
1answer
22 views

How to control the player by using four buttons up,down,right,left in cocos2d game for ios?

How to control the player by using four buttons up,down,right,left in cocos2d game for ios i want to control the player by using four buttons
-1
votes
1answer
16 views

how to remove single sprite in cocos2d-android game

In this cocos2d-android game, if two sprites(ship and target) intersect ship should get disappeared, this is how i had given the code but could not remove the sprite after intersection, i searched ...
0
votes
0answers
13 views

how to make breakout clone (cocos2d-javascript) example cross-platform?

I cannot seem to figure out how to convert the code at the end of the 4 part tutorial on the cocos2d-javascript dot org website to another platform. I am trying to convert it to see the performance of ...
0
votes
2answers
28 views

RunAction,CCCallFuncN with multiple Variables - Cocos2D

Is there any way you could send 2 parameters with RunAction? You see im trying to move a sprite with a label on top, and I have made separate functions for each. Similar to this. [sprite ...
0
votes
1answer
24 views

Cocos2d 1.0 to cocos2d 2.0 source port

I have below function in cocos2d 1.0, it is not compiling in cocos2d 2.0. Anyone help me to get same for cocos2d 2.0. void ccFillPoly( CGPoint *poli, int points, BOOL closePolygon ) { ...
1
vote
1answer
37 views

Cocos2d-x onEnter and other default method not called

I have 2years experience in cocos2d but today started cocos2d-x. I just written derrived menu button class that not fire any default method like onEnter, selected and all. Here is my code: ...
0
votes
1answer
12 views

Cocos2D - Running an action on a label

Im trying to generate an action for a label, which is a property of a sprite. This is what Im trying but the labels aren't moving and I can't pinpoint what could be the cause for them not to move.. ...
0
votes
0answers
9 views

How to draw a polygon in cocos3d

I need to draw a polygon in a cocos3d project, and i could not find a documentation about this matter, i have tried the following code with no luck. I don't want to draw the polygon in cocos2d layer ...
0
votes
1answer
26 views

Is Game Update will store Existing information?

whether a game update will store the users details like score and levels unlocked,or else it will reset the game as new. No i am developing a game with 10 levels and going to release it.another 10 ...
0
votes
1answer
10 views

GameDevelopment: Is there an equivalent to TexturePacker to optimize single images RGB format?

Might be a silly question. I am using TexturePacker to export texture sheets for my Cocos2d game. At the end of certain levels I want to display a special image that tells the user that a new world ...
1
vote
0answers
30 views

Cocos2d - Creating a scene

What is the use of the following code when creating a scene: +(CCScene *)scene { CCScene *scene = [CCScene node]; Game *layer = [Game node]; [scene addChild:layer]; return scene; ...
0
votes
1answer
12 views

CCAnimationCache: how should I use it?

I have noticed that "purgeSharedAnimationCache" method call sets the "sharedAnimationCache_" to nil. +(void)purgeSharedAnimationCache { [sharedAnimationCache_ release]; sharedAnimationCache_ ...
1
vote
2answers
85 views

OpenGL, C++ -> How do you lay out objects on screen?

When I used to write java code, there were layout managers like "grid bag" and box. I am working on a game using Cocos2D-X and running into trouble laying out objects on screen so that they are not ...
-1
votes
0answers
62 views

Unable to open url in safari ios

I am using this code -(CCMenuItemSprite *)facebookLike { if(!_facebookLike) { _facebookLike=[CCMenuItemSprite itemWithNormalSprite:[CCSprite spriteWithSpriteFrameName:@"fbcoins.png"] ...
0
votes
1answer
27 views

Nextpeer Remove welcome banner : Delegate method not fired

I tried to remove nextpeer welcome notification at game start. Here is my code in .h @interface AppDelegate : NSObject ...
-1
votes
0answers
20 views

Is it possible to learn cocos2d javascript through a cocos2d-iphone book/tutorial? [closed]

I am looking to learn cocos2d javascript. I know it's still in its early stages and that documentation is still a work in progress but i was wondering if it would be a good idea to learn cocos2d ...
1
vote
1answer
13 views

Cocos2d 2.x Orientation issues with Kamcord framework

I am using latest cocos2d 2.x with latest Kamcord version. My application is in portrait mode, but I have some scenes where I use landscape mode by just rotating the portrait to 90 degrees. My ...
0
votes
0answers
16 views

Xcode Collision Detection Error Cocos2D Assertion Error

Hello and thank you for reading. I am making a ball game in cocos 2d, where you can slide the ball in a direction, and it will travel until it collides with a wall. My collision detection is giving ...
0
votes
3answers
35 views

Run a scene created with Cocos Builder in cocos2d 2.0, assertion failed

I am following this tutorial to try to run a scene created in Cocos Builder (the tutorial does it with a detailed "cat jump" project, but it's not important for me to do it the same way). I am doing ...
0
votes
1answer
17 views

Stop Animation with CCDirector AFTER adding UIViewController to cocos2d scene

I'm trying to add a UIKit ViewController on top of a cocos2d scene. Everything works great, but I need to run [[CCDirector sharedDirector] stopAnimation] AFTER the UIKit view is loaded completely. I ...
0
votes
1answer
25 views

Making SpriteSheets Work cocos2d

So I’ve been working on my cocos2d game for a little while now just using a static one frame sprite because I hadn’t gotten the graphics for the full spritesheet yet. Now I have the spritesheet, and ...
0
votes
2answers
31 views

Center a sprite regardless of parent sprite

In my game I have a popup window that popups relative to a sprite you clicked. In that popup there is a button that when you touch it, it brings up another popup window that is just confirms the ...
0
votes
1answer
20 views

Managing Child Sprites on a Single CCSprite?

I have two different sprites which i am binding together onto a third sprite with help of following link and code. But no CCAction runs on this new parent sprite. How can i join sprites into one and ...
0
votes
1answer
18 views

Android cocos2d how to take screenshot?

I Want To take screen shots Of My game and than this screen shots display in next layer hws it possible in android cocos2d.if any one have idea than please tell me how can i take screen shots of my ...
0
votes
1answer
7 views

cocos.layer package being reported as nonexistent in PyDev

I'm currently using Eclipse Juno, PyDev 2.7.5, and Cocos2d 0.5.5 installed through pip. After reconfiguring the Python interpreter in PyDev, Whenever I type cocos.layer.Layer in a module, it ...
0
votes
1answer
10 views

CCSprite Not Flipping

So in my game I am trying to make the character be able to go left or right depending on the button the player pushes. I want to flip the sprite so that it faces the right way in whatever direction ...
0
votes
1answer
18 views

Cocos2d scene has weird positioning

I'm not quiet sure I understand the positioning in my cocos2d scene. I'm putting something in the middle of the scene ( or so I think ) by using winSize = [[CCDirector sharedDirector] winSize]; ...
0
votes
0answers
15 views

Is it good practice to have one CCSpriteBatchNode & CCSpriteFrameCache for all scenes

In a game with many scenes, is it a good idea to define one CCSpriteFrameCache at manager level and then make ccspritebatchnode ivar public so accessible by all scenes? I couldn't find an example of ...
0
votes
0answers
14 views

Cocos2d for iOS: Gyroscope vs UIAccelleration

I have implemented a space shooter game project with Cocos2d 2.0 and a UIAccelleration controller. The UIAccelleration as some drawbacks: it requires calibration it depends on actual accelleration ...
0
votes
1answer
21 views

issue with displaying sprites in cocos2d

Here is my cocos code: class Startbox(Layer): def __init__(self): Layer.__init__(self) self.batch = BatchNode() self.add(self.batch) img = ...
0
votes
1answer
21 views

Cocos2D loading multiple scenes

I am creating a game and while implementing both iPhone 5 and non iPhone 5. In my app delegate I have the following: CGSize winSize = [[CCDirector sharedDirector] winSize]; NSLog(@"Height: %f", ...
0
votes
1answer
25 views

Making a unicycle with Box2D

I'm fairly new to Box2D and trying to figure out the best way to make a unicycle. The unicycle essentially is in two pieces, the wheel and the stem (with seat post etc). I've tried attaching the two ...
0
votes
1answer
15 views

Including gam levels in Cocos2d Android not taking to next scene

In cocos2d android game i need to add levels so when the game completes it displays "you win" after that i need to add next level but when i try to add the following code its not replacing the scene. ...
0
votes
1answer
28 views

Collision detection between sprites paired with nodes

I've been looking at many different topics about cocos2d-iPhone's collision detection using the bounding boxes of sprites and I have a sprite that's rotating around a CCNode by an offset position (the ...
0
votes
2answers
31 views

Moving Platforms? Cocos2d and Tiled

I'm trying to make some moving tiles from a Tiled map editor tmx file. I have the moving tiles in their own layer, and I just want to simply have them move up, and then when they reach a certain y, ...
0
votes
3answers
51 views

box2d border not bordering

I'm creating a box2d border for my game and noticing that I can actually slide my bodies across the border. If I'm tossing them at the border, they bounce back from it. But when I'm slowly moving ...
0
votes
2answers
55 views

how to support multiresolution in cocos2d android?

now i working on cocos2d android game during this game devlop i face some problem this game run in perfectly in galaxy tab when i run this game in small dvice the images not show properly so how can i ...
1
vote
2answers
27 views

Ring and Pole - Box2d

How I can make a b2Body in box2d so that it could form a ring which does not collide from the center just like a ring. like when we flick the object and there's another body (like pole), the pole can ...
0
votes
0answers
32 views

can we port cocos2d app to Android [closed]

I have developed a game in cocos2d and want to port it in Android. Is it possible? I have read that it cross platform app can be developed using cocos2d-x. if its not possible to port cocos2d to ...
0
votes
0answers
16 views

replaceScene with CCTransitionSlideInL,but does not have transition

When i call relpaceScene in cocos2d, I can add some transitions to it like: [[CCDirector sharedDirector] replaceScene:[CCTransitionSplitCols transitionWithDuration:1 scene:scene]];And it works.But I ...
0
votes
1answer
24 views

ccpSub implementation for getting angle of 2 coordinates

I an trying to figure out how ccpSub is implemented. Can someone point out the code for this ? Basically, I came across this solution for getting the angle between 2 coordinates but its using ...
1
vote
1answer
48 views

How to detect touch on a sprite that is a child of another sprite

I searched and found some question like mine, but there's no answer right what I need.I want to do something like this in my app. When I touch in the content space of a shape, 4 red dots will appear, ...
0
votes
0answers
19 views

Cocos2d SneakyInput - Attribute read only restricts attribute readwrite of property inherited from

I am trying to add SneakyInput to my current Cocos2D-x project. I had to adjust a few things to get it working (since the github source is outdated). Long story short, everything is working except I ...
0
votes
0answers
23 views

Selectable/moveable objects on a CCTMXTiledMap (Cocos2D)

I'm trying to build an isometric CCTMXTiledMap with Tiled and Cocos2D on which the user can place objects (buildings) and can select them with taping and can move them around. However these building ...
0
votes
1answer
24 views

what is CocosBuilder .ccbi file

When using CocosBuilder, it generates both .ccb file and .ccbi file. In project you use .ccbi file instead of .ccb file. I have a couple question on these, 1, what is .ccbi file 2, why using .ccbi ...
0
votes
2answers
18 views

CCParticleSystemQuand not dealloced

I want to do a very simple thing but it's not working. I want to add some CCParticleSystemQuad in an NSMutableArray and delete them. Here is what I do : int cpt = 0; NSMutableArray *myArray = ...

1 2 3 4 5 87
15 30 50 per page