cocos2d is a free open-source framework for building 2D games, demos, and other graphical/interactive applications.
0
votes
1answer
173 views
Remove HUD from Child Scene
For my game, I create game scene for which I set HUD to it.
First my game scene use BoundCamera, so I use hud to set score text, dollar text and setting button.
Now on game scene when I touch on ...
0
votes
2answers
127 views
Falling images that can be pressed
In my cocos2d app I am trying to make images fall from the top of the screen and detect when they are pressed. I am having a hard time. Can anyone help me achieve this? Thanks.
0
votes
1answer
251 views
Keeping the CCSprite on the screen
In my cocos2d app I have a CCSprite moving on the screen but it moves off the screen. How can I prevent the CCSprite from moving off the screen?
Thanks
0
votes
1answer
358 views
what is the difference between CCSprite and a PhysicsSprite?
I am new to Cocos2D and I've realized that most of the codes written before the Cocos2d update used CCSprites. Recently I realized a lot of more recent codes after the update are using PhysicsSprite. ...
0
votes
1answer
376 views
How do I manage the visibility of enemy spawn locations in a long scrolling shooter?
How do I handle the situation of an enemy spawn place being visible on a screen in a scrolling shooter?
The tutorials I have seen are about setting all the enemies on a whole map only. But it is not ...
0
votes
2answers
651 views
Cocos2d: Adding a CCSequence to a CCArray
I have a problem with an action performed by a sprite. I have one CCSequence in a CCArray and I have an scheduled method (is called every 5 seconds) that make the sprite run the action. The action is ...
0
votes
1answer
464 views
How do I perform a slice effect like Fruit Ninja?
I want to do slice effect like in Fruit Ninja. Is there any class in Cocos2D like CCBlade? How can I use the CCBlade in Cocos2D on Android?
0
votes
1answer
599 views
Cocos2d: how to add anchor points to CCSpriteBatchNode
I am doing some tests with animations in Cocos2D using sprite-sheets. The animation works ok except that the anchor-point is in the center. I need to put it in the bottom. With the code below i am not ...
0
votes
1answer
2k views
How do I animate a spritesheet in cocos2d Android
I'm trying to animate a sprite in a spritesheet, the goal is to make the character walk from left to right. I subclassed CCSprite: CharacterSprite.
this is my code:
...
0
votes
2answers
221 views
Slow motion of a spherical object on an blunt slant obstacle
In cocos2d environment and box2D when an spherical object falls on a blunt slant obstacle, it moves really slowly, that's nauseating, if you have coded to not to have any interaction with world while ...
0
votes
1answer
160 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
2answers
85 views
Can CCAnimations be paused?
I am new to cocos2d. I am using CCAnimation. It's working fine, except I want to pause the animation occasionally. How do I do this?
Here's what I'm doing so far:
[mySprite ...
0
votes
1answer
255 views
Integrating game center into cocos2d
I have a Cocos 2d game in which I want to have achievements and a leader-board. What are the steps I would need to take?
Thanks
P.S All of the tutorials I have found are outdated. So please write ...
0
votes
2answers
150 views
Crash due to removal of Elements like CCSprite from NSMutableArray
So, here's how it goes.
I am currently working on Cocos2d game, which consists of many Obstacles. One obstacle gets added on the screen at an interval of 10 seconds like this.
ObstacleSprite* ...
0
votes
1answer
93 views
using lua in kobold2d to control parameters
Is there a tutorial on using LUA in Kobold2d?
I want to know if its possible to use it to control the game behavior (like max speed decrease of timer, and bonus points) by uploading a new script to ...
0
votes
1answer
307 views
EXC_BAD_ACCESS error when box2d joint is destroyed
When I destroy the weldJoint in the update method (see below) I get an EXC_BAD_ACCESS error pointing to the line
world->DestroyJoint(weldJoint);
in the update method below:
-(void) update: ...
0
votes
1answer
215 views
Touching a CGRect
In my cocos2d app I am trying to determine when a CCSprite is touched
Here is what I have:
-(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
NSMutableArray *targetsToDelete = ...
0
votes
2answers
855 views
Top down water view, cocos2d
Has anyone successfully created a top down view of a stream/river? I need to also work out how to make it look like a boat is cutting through the water.
0
votes
1answer
1k views
How to simulate a water splash effect?
I need to achieve the effect of a ball falling down into a pool then splashing in the water.
At first, I made a sensor to detect the collision between the ball and the water and then show the sprite ...
0
votes
3answers
1k views
Sprite Animation Software That Works With Cocos2D
So the title basically says it all. I'm looking for software that would help me to create sprite animations that I could use with cocos2d by allowing me to pose a a sprite and the software create ...
0
votes
1answer
301 views
Determining the X, Y co-ordinates in sprite sheets
I am new to Android COCOS2D and developing a simple game to start with. I am developing a game for kids in which the kids shall spell out the names of the fruits they select. I have developed the ...
0
votes
1answer
477 views
How do I open the camera in a CCScene node in a Cocos2D application?
I am new to Cocos2D and I can't find the way to open the camera from the library. I want to open the camera in the my game, can any one help me with with this?
Thank you in advance.
0
votes
0answers
7 views
how to set resolution in cocos2d html5 game
how can i change or init game with specific resolution
is there something like setResolution(width,height) available ?
please hellp thanks in advance
0
votes
0answers
15 views
How to get sprites react to touches in cocos2d-android
i have 1 gun when tap on any area on the screen bullets fires out, but according to my requirement there are 3 guns(sprites) when touched on any of the sprites bullets must fire up, when googled i ...
0
votes
0answers
18 views
Android cocos2d getting collision detection to work only on some frames of animation
I have an animated bomb sprite in my game and use CGRect for collision detection:
for (CCSprite bomb : _bombs) {
CGRect bombRect = CGRect.make(bomb.getPosition().x - (scaleFactor * ...
0
votes
1answer
18 views
Android cocos2d getting a sprite to continuously move to a dynamic position
I tried using the MoveTo method in cocos2d to get a sprite to continuously follow my player sprite:
CCMoveTo actionMove = CCMoveTo.action(actualDuration, player.getPosition());
CCSequence actions = ...
0
votes
0answers
15 views
Auditioning audio in real-time on iOS game
I've heard of fmod which is an audio engine came with fmod studio to adjust sounds in real-time while testing a game. But fmod requires a huge license fee so I'm looking for free alternative to fmod ...
0
votes
1answer
29 views
Android cocos2d removing a sprite after animation
I have an object going across the screen with an animation using the following code:
CCSpriteFrameCache.sharedSpriteFrameCache().addSpriteFrames("ninjastar.plist");
CCSpriteSheet projectileSheet = ...
0
votes
0answers
22 views
Best strategy to group multiple CCPhysicsSprite into a single game character. [Cocos2d + Chipmunk]
It is my first game using Cocos2D with Chipmunk and I have a bit of a novice question.
I am using the CCPhysicsSprite to create different parts of a character. I would like to be able to group these ...
0
votes
0answers
71 views
creating arcball in cocos 3d [closed]
I am trying to make arc ball sample in cocos 3d , the code seems to be ok, but the rotation of ball is not as expected
it seems that i've done something stupid, but i can't figure it out. please check ...
0
votes
0answers
37 views
Catching an object from sky in Cocos2d and Box2d world
My world has a gravity of -9.8 and there are KDynamicBodyType bodies falling from the sky. At the bottom there is a PhysicsSprite with KinematicBodyType. I want the PhysicsSprite to be able to catch ...
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
1answer
46 views
Exporting spritesheet for Cocos2d
I would like to know how people usually save the animations in order to load them easily in Cocos2d with as few hard-code as possible.
E.G. The solution I thought of is to have one plist file ...
0
votes
0answers
49 views
Cocos2d/Box2d Component based entity system
Recently I've read somewhere that it is not a good idea to inherit from CCSprite class when making your game objects. In my CBES each Game Object has :
-PhysicsComponent(responsible for updating ...
0
votes
0answers
40 views
How to select a show and select weapon on touch a bubble that changes continuously weapons! [closed]
hello i need to select a weapon from a floating bubble that changes weapon inside in it !
Bubble must show 2 weapons changing randomly until user taps to gain the weapon
(This lets user gain any bonus ...
0
votes
0answers
78 views
Cocos2d-xna memory management for WP8
I recently upgraded to VS2012 and try my in dev game out on the new WP8 emulators but was dismayed to find out the emulator now crashes and throws an out of memory exception during my sprite loading ...
0
votes
0answers
36 views
Image is displaying in inverse order cocos2d
I am drawing image in cocos2d using opengl call but image is displaying inverse order, i faced same problem previously that time i used to change value of CC_TEXTURE_NPOT_SUPPORT to 1 from 0 in ...
0
votes
0answers
82 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
26 views
How to implement enemies similar to Monster shooter game in cocos2d? [duplicate]
We are recently creating game with cocos2d API. This game is similar to Monster shooter game for iOS and android. Following is the link to above game : http://game-lion.net/monstershooter/
In this ...
0
votes
0answers
45 views
Shooter enemies spawning without editor on iOS
I have found this question with some very brilliant answers. I really like the "distance from bottom of the screen" spawning approach and the fact that the enemies flow can be easily visualized on an ...
0
votes
0answers
73 views
cocos2d - exclude GUI layer transformation
I have a game layer that should be pannable and pinchable and a GUI layer as an overlay that's excluded from the transformations. I added the pinch and pan gesture recognizer to the view and set the ...
0
votes
0answers
169 views
Cocos2d Vertical Doodle-Jump Like Scrolling [duplicate]
Good afternoon,
For the past few days I've been making a game very similar to DoodleJump in the sense that it involves a main character, things to jump on, certain powerups and some monsters.
I've ...
0
votes
0answers
121 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
50 views
Problem with the multiple polygon collision
I have created the heart body used the physics editor and it gave me the 3 polygons.I have multiple heart bodies that are spawing. When it collide with car body my application hang after some ...
0
votes
0answers
31 views
Check duplicates in the removeList in box2d iphone
sometimes a collision is called twice in that case i need to be check duplicates from the removeList. because of this my application is getting crash or hang.
How can i check duplicates in the ...
0
votes
1answer
287 views
3d transformation of game world keeping gameplay 2d - COCOS2D 2.0
Using: COCOS2D + iOS.
I want to rotate the game world, may be loading another .tmx file for another dimensions when user want to switch dimension.
the effect what I am looking for is something like ...
0
votes
1answer
388 views
How to create Elastic rope / Rubber band in box2d?
I am trying to create the rubber band type or elastic rope.
i ant to do something like bellow link.
http://heyalda.com/smash-turtle/
Thanks,
0
votes
0answers
158 views
cocos2d fragment shader transparency
I'm playing with custom fragment shaders for a CCSprite (see http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0).
But I can't figure out why I get a white color whith the ...
0
votes
0answers
169 views
Cocos2d Tiled Dynamic Object Layer
I'm trying to develop a cocos2d tiled based game using a sort of 'dynamic' object layer. What I want to do is after the tiled map is loaded, the user can drag something into the map and that will ...
0
votes
0answers
121 views
Cocos2d update leaking memory
I have a weird issue - my app is leaking memory on device only, not on a simulator. It is leaking if i schedule update method anywhere, on any scene. It is leaking despite update method is empty, ...



