cocos2d-x is a cross plaform port of cocos2d-iphone using C++. It supports iOS, Mac, Android, Samsung Bada, BlackBerry Tablet OS, Windows and Linux. It has built-in bindings for Lua and Javascript.

learn more… | top users | synonyms

0
votes
1answer
88 views

Cocos2d-x v3.1 for WinPhone 8 auto change texture after resumed from background

I have some sprites in my game (for Windows Phone 8). These are my steps to reproduce the problem: Open game Play (this is an optional step) Press Windows button to send game to background Press ...
0
votes
1answer
159 views

How do I rotate a sprite with ccbezierTo in cocos2d-x?

In cocos2d-x, I move a sprite with ccbezierTo like this: // use for ccbezierTo bezier.controlPoint_1 = ccp(m_fish->getPositionX() + 200, visibleSize.height/2 + 300); bezier.controlPoint_2 = ...
0
votes
0answers
383 views

How to make glow effect in cocos2dx

i searching the web for glowing effect , i like to be able to create misc glowing effects , like lasers , glow around sprites and such . couldn't find any thing on the web , any body have any ...
0
votes
0answers
42 views

What aspect ratios and resolutions should my mobile game target? [duplicate]

I used cocos2d-x to create a game. How do I need to set up the art so it works on different devices? How many aspect ratios and resolutions should I slice the same image to have it look good on iOS ...
0
votes
1answer
177 views

Cocos2d-x 3.0 animation frame by frame

As I know animations are actions. Now I need to play animation frame by frame. Say I have an animation from N frames. each frame should be played after t delay. Now I want to play animation frame by ...
0
votes
0answers
127 views

Require game logic like temple run

I am new at game development but I have done some work in cocos2dx for iphone. I am interested to develop a game like temple run. I read that temple run is 2D game feel like 3D but I believe that I ...
0
votes
0answers
65 views

What's the equivalent of UIBezierPath in Cocos2d-x?

I'm beginner in Cocos2d-x , and i want to implement this tutorial with Cocos2d-x v.3 cpp, but the problem i dont know if there's UIBezierPath in cocos2d-x. Could you help me to draw the Bezier Arrow ...
0
votes
0answers
300 views

Cocos2d-x , setup the debug environment and remove the red marks in my eclipse

I am struggling with this issue since last week. I still can’t figure out where is the error. My code is compiling perfect if I restart the eclipse. but, when I edit the c++ file it shows red marks ...
0
votes
0answers
83 views

Trying to make a mouseJoint with Box2D on Cocos2D-X

I'm trying to obtain this result: http://appcodingeasy.com/Gideros-Mobile/Dragging-Box2d-object-in-Gideros-Mobile (there's a video - YouTube). But I'm missing something, because if I follow the code ...
0
votes
0answers
87 views

Changes to myApp.js files are reverted back to normal when the project is build - Cocos2dx [on hold]

I am trying to do some changes to my myApp.js file of coco2dx project for android in eclipse but I am not able to do it. I am actually trying to change the default background image of my app. But ...
0
votes
0answers
83 views

cocos2d-html5 & cocos2d-js compatibility

Currently we are shifting towards html5 dev for a few customers and I'm wondering how compatible are the 2 javascript versions of cocos2dx (cocos2d-html5 & cocos2d-x with javascript bindings). ...
0
votes
1answer
156 views

translate-scroll repeated 2d texture using opengl shader

I managed to implement an infinite 2d texture scrolling using the following shader. btw I'm using cocos2d-x 2.2.1. The vertex shader: attribute vec4 a_position; attribute vec2 a_texCoord; #ifdef ...
0
votes
0answers
220 views

box2d's ApplyForce works wrong after cocos2d-x's replaceScene

i'm practicing making a breakout game, using cocos2d-x 3.x and box2d, referencing here. i create a ball in the scene's init function and apply force. when ball hits bottom wall, if i touch screen ...
0
votes
1answer
233 views

Should I drawing directly on CCLayer or CCSprite?

Now I am a little confused in my cocos2d-x cpp project. I want to draw lines with user's finger touch. Following the screenshot of a CCScene: In the screen, there are two squares. I want show an ...
0
votes
0answers
246 views

Design virtual resolution for 2D development in Unity

I came to Unity with Cocos2D-X experience in mind. In Cocos2D-X, I can choose a "virtual" screen resolution size to rely on the entire game during development and the game will automatically adapt to ...
0
votes
0answers
536 views

Cocos2dx- Draw primitives(polygons) on Update

In my game I'm trying to draw polygons on on each step i.e. update method. I call draw() method to draw new polygon with dynamic vertices. Following is my code: void HelloWorld::draw () { ...
0
votes
0answers
105 views

cocos2dx and tweenings libs

I know cocos2dx has built-in actions like move-to, etc... to do some kind of tweening but haven't seen any way for example to add different easy ins and outs. Browsing the documentation haven't found ...
0
votes
1answer
395 views

CCMoveBy values on update()

Hope you can help me. This is my problem: I have a scheduled update, here I track the movements of my objects (sprites), I move them with CCMoveBy, and I need to constantly update the zOrder. For ...
0
votes
1answer
146 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
136 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
2answers
2k views

cocos2dx - Custom Fragment Shader and CCRenderTexture

I have a CCRenderTexture that is filled with a sprite when the scene is loaded, as follows, canvas = CCRenderTexture::create(this->getContentSize().width, this->getContentSize().height); ...
0
votes
1answer
276 views

Multi Resolution graphic for ios 4 and ios 5

i have used cocos2d-x to code game for ios 4, ios 4s, ios 5 with screen size (3.5 inch and 4 inch) First, my resource are desgined for ios 4 and ios 4s with screen size : 3.5 inch. so if i want to ...
0
votes
0answers
1k views

Getting Image From URL , Using curl in Cocos2dx C++

I am using curl in C++ to get an Image from a URL for a Cocos2dx Game. The Code is Working Fine. And using CCImage And cocos2d::CCTexture2D I create a Sprite and Add it on my Layer. The Sprite is ...
0
votes
1answer
386 views

Get Text dimmensions on CCTextFieldTTF

Hi I want to know the width of the text inside the CCTextFieldTTF but I can't find a way to do it, I want this width so I can move a CCLabelTTF in that position so it can be like a cursor for the ...
0
votes
1answer
958 views

Image with FadeIn effect blinks when added to scene

I am trying to add an image to the scene, but it should just be added to the scene invisible, FadeIn and then be deleted when the effect finishes. My problem is that the images blink once when they ...
0
votes
1answer
336 views

using eclipse instead of visual studio for cocos2d-x project

im using coco2d-x v 3.0 i made a new windows project to test it and it is working but when i try to build and run a project using this command cocos run -p win32 it is print this error it seem ...
-1
votes
1answer
500 views

cocos2d-x export plist from images in windows free tool to use [closed]

as i learn to use cocos2d-x in the part on which i need to animate sprite images all the tutorials shows how to use something that called plist file that maps the coordinates of the images clips . ...
-1
votes
1answer
305 views

are most 2D games tille based? [closed]

So I'm beginning the planing phase for a 2D game that I hope to deploy for iPhone, Android, and maybe windows phone, and I am writing it in Cocos2DX and I'm looking around for map editors that I could ...
-1
votes
1answer
291 views

Tower Defense Search Enemies Efficiently

I had a problem with the build of a TD. I got a slow - non efficient search for towers find targets to shoot. PD: enemies[] got all the active & non-active enemies (death and alive) ->Im using ...
-1
votes
1answer
193 views

How to pause and unpause the Particular action of a sprite?

My game has a sprite representing a character. When the character picks up an item, the sprite should stop moving for a period of time. I use CCbezier to make the sprite move, like this: ...
-1
votes
1answer
206 views

in-app purchase in cocosSd-x 3.0

I am working within a team, and we're at the point of finishing our first cocos2d-x c++ application. We want to add in-app purchases. for what, we made a search for this. We found 2 solutions: 1- ...
-1
votes
1answer
109 views

Collision function calls before colliding

My Box2D contact listener class is calling post solve and beginning the contact function before colliding? This is causing my object to bounce back before hitting the ground. What could be causing ...
-2
votes
1answer
772 views

How to read key value pair in cocos2dx from txt file?

I this is the first time I am developing for BB10 OS using cocos2dx. I need to read key value pair in Cocos2Dx. eg: Skill= 5 Power= Awesome The target is Blackberry 10OS and using QNX ...
-5
votes
2answers
776 views

Cocos2D-X on Steam and iOS App Store [closed]

With Cocos2D-X can I really submit my games to Steam and iOS App Store? It's commercial quality? Do you have some samples of games built on Cocos2D-X that is on sales in Steam? Thanks.