cocos2d is a free open-source framework for building 2D games, demos, and other graphical/interactive applications.
1
vote
1answer
9 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 = ...
-1
votes
0answers
14 views
Applying the vector of a swipe movement to a box2d object
Hi I'm trying to achieve game functionality where the player can place their finger on an object then swipe in a certain direction and apply the speed and velocity of the swipe to the object they have ...
-2
votes
0answers
32 views
Help implementing Jigsaw puzzle in cocos2d [closed]
I want to make a jigsaw puzzle where I can make several puzzles layouts and apply different images to them. Can anyone suggest the best way to do this?
Should I make transparent cutouts of the puzzle ...
2
votes
1answer
58 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 ...
-1
votes
0answers
21 views
Implementation of jigsaw puzzle app of non-regular shapes in iphone [duplicate]
I am new in iphone development. Its my first app. Can anyone help me how should i implement jigsaw puzzle app of non regular shapes in iphone.
Any help would be greatly appreciated.
-1
votes
0answers
17 views
FlipX Sprite By Checking Position
I have bird flying. My bird is flying but i want it to fly right and left using flipX.
I want when my bird fly right it should flipx=No and when it goes left my should flipX=Yes.
simple like duck ...
0
votes
0answers
20 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
53 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
33 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
37 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 ...
-1
votes
0answers
58 views
Camera frame yuv to rgb conversion using GL shader language [closed]
I am getting the camera frame from the android camera Preview Callback in Byte array and pass it to jni code. As we can't use byte in c++ so i am converting it to the integer array as follows:
...
-2
votes
0answers
44 views
2d Rotating Turret misbehaving when I target left side of screen [closed]
I have been fighting this for a while now. At its core the game is much like Missle Command on steroids, or will be if coding does not drive me crazy.
For right now I just need to get a turret on ...
5
votes
1answer
184 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 ...
0
votes
1answer
45 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
45 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
69 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 ...
1
vote
1answer
83 views
Can I switch scenes by swipe gesture or drag?
Can I switch scenes by swipe gesture or drag?
In my game, there are three main scenes, each of them has several layers which have some UI elements, these elements have some tap gesture.
I already ...
0
votes
0answers
71 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
44 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 ...
-1
votes
2answers
122 views
Semi Transparent Background in Scene [closed]
In my game I want to create game over scene which is semi transparent so game scene become partially visible.
Game over scene contain several button that are not transparent but I need only ...
0
votes
1answer
145 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 ...
1
vote
2answers
245 views
Repeat image on a fixed background, Cocos2D?
I'm quite new to Cocos2d, does anyone know how to create a background that would be one fixed screen (no scrolling), with a small image just repeated to the whole size of the screen - depending on ...
0
votes
0answers
70 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 ...
1
vote
1answer
130 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 {
...
0
votes
0answers
162 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
115 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 ...
1
vote
1answer
93 views
Preserving Cocos2D context between UIKit screens
My app is designed to use Cocos2D in the "main game screen" but the rest of the screens are in UIKit. While I feel that this isn't ideal, I really don't have time to port the rest of the screens into ...
0
votes
0answers
47 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 ...
1
vote
0answers
162 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 ...
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
273 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 ...
-1
votes
1answer
140 views
Parallax With Box2d iphone
I am creating the simple game. In that game car will move and obstacles will come in the car way we will have to save that car from that obstacles.
What I have done. I have created the car with the ...
1
vote
2answers
279 views
8-bit Game: To pre-scale images, or post scale my Cocos2d scene. Which is the better approach?
I'm wanting to develop a game with an 8-bit feel. Since this game is mostly for my personal enjoyment, I've set a requirement that I want my game to have an 8-Bit feel to it that is most similar the ...
0
votes
1answer
352 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
1answer
160 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 ...
-1
votes
1answer
75 views
How to create strength meter?
I am creating game like bow and arrow. I want my hero will shoot the arrow with the strength meter, how will create the power?
2
votes
1answer
160 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 ...
1
vote
1answer
174 views
Need a bounding box for CCSprite that includes all children/subchildren
I have a CCSprite that has CCSprite children, and those CCSprite children have CCSprite children.
The contentSize property doesn't seem to include all children/subchildren, and seems to only work for ...
1
vote
1answer
124 views
How to execute AI in Cocos2d (replacing the Update method)
What is the best way to run AI in Cocos2d?
I already have my AI implementations. Normally I would execute AI in my game loop by checking how much time has elapsed since last AI execution and whether ...
1
vote
1answer
172 views
Game design and SoC
I've been working on a little game for the last few months, trying to approach it as a software engineer and employ best patterns and practices in my coding. I have gotten to the point where I have to ...
0
votes
2answers
78 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 ...
1
vote
1answer
88 views
Blending transition in cocos2d
In my cocos2d-iphone game, I have 2 backgrounds (CCnodes), each containing a quite complex hierarchy of sprites.
I would like to make a smooth transition between them:
initially, only the first ...
3
votes
2answers
262 views
Presenting game center leaderboard
I have the following code:
-(void)showLeaderboard {
GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL)
{
...
0
votes
1answer
242 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 ...
2
votes
0answers
128 views
How to achieve 'forward' movement (into the screen) using Cocos2D?
I'm interested in creating a 2.5D first-person shooter (like Doom) and I currently don't understand how to implement the player moving forward. The player will also be able to browse around the world ...
2
votes
0answers
89 views
How to use a mask texture with Kobold2D
I am an iOS developer but I'm new to cocos2d. I'm working on new game, I use Kobold2D, have cocos2d installed too, and I want to make this effect:
I know how is done with Flash, but can't make it ...
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 ...