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.
12
votes
4answers
601 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 ...
6
votes
1answer
448 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
3answers
7k views
How to play animations in Cocos2d-x?
I'm new to Cocos2d-x and looking for a good way/tutorial on how to play animations in Cocos2d-x.
4
votes
1answer
564 views
Lua or C++ in Cococ2d-x
I am going to use Cocos2d-x to make a game for Android and ios, but my question is, do I use the Lua integration or only c++, I see Lua useful here because the compilation thing.
Or do I use only Lua ...
3
votes
2answers
294 views
How to achieve smooth movement with a fixed timestep
Previously in the update method of my game I was using a variable time step which provided very smooth movement of a player sprite except when the frame rate would drop, even slightly. At that point I ...
3
votes
1answer
693 views
Isometric Tile maps in Cocos2d-x
Is there an specific isometric tile map handler in cocos2d-x? I can't find any.
3
votes
1answer
763 views
Callback a function when a label is touched in cocos2d-x?
How do I callback a function when label is touched in cocos2d-x?
3
votes
1answer
306 views
Getting the height of Keyboard on Android
Hi I need to know the height of my keyboard so I can move up some textfield I have in my app. I'm using cocos2D-X but the app don't recognize the keyboardWillShow method.
Thanks
3
votes
1answer
1k views
Sprite Animation using cocos2dx 2.0.2
I am trying to implement sprite animation using coco2dx. I have tried several demos, but all of them are same. While I tried, getting violation error in my code.
...
3
votes
0answers
381 views
Deep Cloning C++ class that inherits CCNode in Cocos2dx
I'm stuck with something in Cocos2dx ...
When i copy my class that inherits CCNode, i get a shallow copy of my class but the base type seem to still point to the original node address. We dont seem ...
2
votes
2answers
576 views
Implementing a sine using a bezier curve
I'm developing a 2D game using Cocos2d-x.
Is possible to use CCBezierTo to parameterize a sine function?
2
votes
4answers
1k views
Different iPhone screen resolutions and game graphics
We are developing a 2D game for iPhone using cocos2d-x. The artists are drawing the raster graphic for a resoluion of 640x960. For older iPhone devices, those that have a resolution of 320x480, should ...
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
1answer
336 views
Spriting Animation Method
http://www.kickstarter.com/projects/539087245/spriter
At 3:00 they discuss that there is a method used to separate the parts of character into individual sprites and move them saving production time ...
2
votes
2answers
193 views
How to use facebook sdk on a cocos2dx-project
I'm doing a game cocos2d-x, when user gets a high score, I want them to touch on the Facebook icon and share the high score on their Facebook account timeline.
tutorials on facebook.developer.com ...
2
votes
2answers
2k views
How to setup Cocos2D-X (Android) under Mac OS X?
Hi I've made a small game for iPhone that I also want to run on Android but I'm having problems setting up Cocos2D-X for Android.
I've downloaded and installed Android SDK and NDK (under my ...
2
votes
2answers
515 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 ...
1
vote
1answer
245 views
Why doesn't MoveBy work in this example?
I'd like to run an action on a sprite using the MoveBy action. After lots of attempts, I can't achieve the goal... I have issues with the MoveBy in 2 different projects, so maybe I'm missing something ...
1
vote
2answers
1k views
Problem using ccTouchesEnded/ccTouchesBegan to move sprite in cocos2d-x?
I'm using ccTouchesBegan/ccTouchesEnded to move sprite from one point to another but I'm having problem, if i give two or more consecutive inputs one by one while sprite is moving(runAction is being ...
1
vote
2answers
3k views
Create an infinite scroll using CCParallaxNode in Cocos2D-X
I'm trying to create an infinite scroll using two images in a CCParallaxNode, making one move to the end of the scroll when it gets off the screen. I have tried several implementations but none has ...
1
vote
1answer
132 views
Debug Render In Cocos2d Android
I want to implement debug render for cocos2d android.So I can view how bodies are created.
Right now I use gdx.jar file for box2d and load that jar file following way.
static {
...
1
vote
1answer
663 views
cocos2d-x v2.1 CCSpeed, CCRepeatForever, and CCAnimation jerky at high speed
I worked to port Tim Roadley's cocos2d-iphone example from (Box2D Driven Cocos2D Animation) to cocos2d-x to learn cocos2d-x for a project. It is all relatively simple to do, but I am suffering from ...
1
vote
2answers
277 views
How to swallow touches on CCMenu while sliding?
I'm creating a sliding menu for my game something like angry birds level selection but I'm having problem with buttons. If I accidentally touch any of the buttons while swiping the level starts to ...
1
vote
1answer
1k views
Android Cocos2DX using C++ in Eclipse Helios Windows XP
I have used Eclipse Helios 3.6.1 for Java development. I wanted to start C++ development in the same IDE so I installed Autotools Support For CDT, C/C++ Development Tools, C/C++ Library API ...
1
vote
1answer
696 views
Simple way to post score from my game to Facebook and Twitter?
What's the best and simple way to post score from my game to Facebook and Twitter with store link in cocos2d-x?
1
vote
1answer
299 views
New way of integrating Openfeint in Cocos2d-x 0.12.0
I am trying to implement OpenFeint for Android in my cocos2d-x project. My approach so far has been creating a button that calls a static java method in class Bridge using jnihelper functions ...
1
vote
1answer
2k views
Problem playing music and sound effects in Cocos2d-x
I'm new to Cocos2d-x and working on a mac. I'm trying to play music in my demo project but I'm unable to include "SimpleAudioEngine.h" in the default HelloWorld Project. I tried adding CocosDenshion ...
1
vote
0answers
163 views
Can I use a shader with 2 different textures in Cocos2D (x)?
We are evaluating a variety of different graphic engines for use in our game and we want to be able to use 2 different textures for many of our sprite maps. One sprite map would be the standard RGBA ...
1
vote
2answers
519 views
CCUserDefault, iOS/Android and game updates
My game uses cocos2d-x and will be published on iOS platform first, later on Android. I save a lot of things with CCUserDefault (scores, which level was completed, number of coins taken, etc...). But ...
1
vote
0answers
156 views
How do I use Objective-C libraries in Cocos2d-x?
We've created several libraries in Objective-C in the past, and now we're moving to the Cocos2d-x game engine. We can't figure out how to reference and use those libraries (we've also tried compiling ...
1
vote
0answers
354 views
Split Body and Sprite
I want to split the body and sprite into multiple pieces as like following link suggest:
http://www.raywenderlich.com/14302/how-to-make-a-game-like-fruit-ninja-with-box2d-and-cocos2d-part-1
I try to ...
1
vote
0answers
163 views
Getting contour without the background
I have a texture and vertex which are needed to create a set of closed polygons. For this purpose I use these functions:
Code for create texture:
CCSprite* spr = ...
1
vote
1answer
248 views
Adjust sprite bounds of the visible part of texture
Is there any way to adjust the boundaries of the visible part of the sprite? To make it easier to understand: I have a texture, such as shown at figure 1. Then I break it into pieces and fill the ...
1
vote
0answers
2k views
Where can I find some Cocos2dx beginner tutorials? [closed]
I have tried to start programing with Cocos2dx but I have no idea where to start and the tutorials are no very not very helpful.
What I am looking for is some tutorials/guides on how to begin using ...
1
vote
0answers
245 views
Adding Libxml2 to an Android project under Cocos2D-X
I am having problems porting Libxml2. I like it because it works under windows like a charm with <libxml/parser.h>. When I reference the libraries I just cannot find the right path to them, ...
0
votes
1answer
129 views
Camera Calculation
For my game I don't able to decide what camera resolution I have to use ?
Normally I use 1024x600 landscape resolution of camera for my game and create single graphics for my game.
But I found that ...
0
votes
1answer
155 views
Rotate Box Sprite With Circle Body
I want to rotate my rectangular sprite with circle body.
The problem is the body doest not attached to the centre of the sprite. This was the default behaviour of the body and sprite.
But I want that ...
0
votes
1answer
512 views
Integrating SQLite to Cocos2d-x at Xcode
I have downloaded SQLite C/C++ interface to work with Cocos2d-x. Created a database by Firefox SQLite plugin. Then tried the following code
// sqlite implementation
sqlite3 *db;
...
0
votes
0answers
19 views
Weld Joint Box2d not run
i have two object like this :
b2WeldJointDef weldJoint;
//frist body
bodyDefXich.type = b2_dynamicBody;
bodyDefXich.position.Set(3, 2);
b2FixtureDef fixtureDef;
b2PolygonShape ...
0
votes
0answers
38 views
Texture / CCSprite Loading and Unloading
Here I want to know how textures are loaded and unloaded in the game by cocos2d/cocos2d-x?
Basically I am a developer of AndEngine and started working with cocos2d-x. In AndEngine, we have ...
0
votes
0answers
78 views
cocos2d-xna CCScale9Sprite usage
I'm trying to get a CCControlButton to render on my game. Using a basic CCScale9Sprite as the button's background works using the following:
var myScale9Sprite = ...
0
votes
0answers
60 views
Time animation in update method
I have 3 animations.
The first has 4 frames with a total duration of 0.4s: ccanimation::createwithspriteFrames(animframes,0.1f);
The second has 2 frames with a total duration of 0.2s: ...
0
votes
0answers
80 views
Problem with collision Box2D [closed]
I have been stuck with collisions in Cocos2d-x and Box2D for the past few days.
I have a class object: Ball
enum{
kActionIdle,
kActionBigger,
kActionCollision
}
Ball
{
//variable
...
0
votes
1answer
145 views
CCSequence with two CCAction
I have two CCActions :
CCAction *a;
CCAction *b;
so how to use CCSequence with two CCActions
Thanks
0
votes
0answers
43 views
Masking a CCLayer
I have a CCLayer (itemLayer) that has a bunch of CCMenuItemImage (itemButton) objects in it placed vertically in a column. These itemButton objects go way past the bounds of the screen and the ...
0
votes
0answers
120 views
Bike Race Concept [closed]
I am right now developing this type of game.
https://itunes.apple.com/us/app/bike-race-free-by-top-free/id510461758?mt=8
I need help for following questions. I have some solutions for this but I need ...
0
votes
0answers
233 views
Setting up cocos2d-x-win8
just trying to use cocos2d-x for the first time developing metro-style games for Windows8. I followed the webpage instructions and got the following error in Visual Studio
1>------ Build started: ...
0
votes
0answers
78 views
custom action - class design
I have a character sprite which walks to different points frequently. The walking animation is a CCSpawn of CCMoveTo and CCAnimate, where CCMoveTo moves the sprite in screen and CCAnimate show walking ...
0
votes
1answer
222 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
374 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 ...
