Tagged Questions
-1
votes
0answers
23 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 ...
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
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
72 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
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 ...
1
vote
0answers
166 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
1answer
286 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
171 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 ...
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 ...
1
vote
1answer
177 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 ...
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 ...
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
275 views
Presenting game center leaderboard
I have the following code:
-(void)showLeaderboard {
GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL)
{
...
0
votes
1answer
254 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
130 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 ...
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 ...
2
votes
2answers
189 views
Importance of scripting engine at Cocos2d Game Engine
Each Game Engine is different and solves different problems in different ways, so the engine design does vary greatly from engine to engine (even though a lot of principles are shared from engine to ...
0
votes
2answers
149 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* ...
12
votes
4answers
604 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 ...
2
votes
1answer
281 views
How to get all child with same tag from CCLayer?
Actually i am working with cocos2d Game. I am using CCLayer for particular scene. now there are so many buttons means CCMenuitems are available. I want to disable that all menuitems having same tags.
1
vote
1answer
628 views
use of undeclared identifier 'GL_TEXTURE_COORD_ARRAY'
Anyone please help me .i am working on sneakyjoystick class when i import these class some error are identified they are following :-
use of undeclared identifier 'GL_TEXTURE_COORD_ARRAY'
use of ...
-3
votes
1answer
316 views
My Sprite comes out the screen
If i an action moves the sprite,how can i keep the CCSprite on the screen???? this is my code:
[enemy runAction:[CCSequence actions:[CCMoveBy actionWithDuration:2.0 position:ccp(-winSize.width*0.4, ...
1
vote
1answer
306 views
Unit Testing with Cocos2D
How to implement Unit Testing with Cocos2D framework?
What are the good practices?
Is there any testing framework like JUnit Framework at Eclipse for Android?
2
votes
1answer
228 views
Wheel rotation, to change velocity of vehicle
I update the velocity of my vehicle like so:
[v setVelocity: ((2 * 3.14 * 100 * (wheel.getRotationValue / 360) / 30)) * gameSpeed]; // update on 60 fps this gets velocity on all frames divide by 60 ...
0
votes
1answer
305 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: ...
1
vote
1answer
1k views
Accelerometer to move player left and right
Please take a look on my code and help me to find problem.
I used this tutorial: COCOS2D_ACCELEROMETER_MOVEMENT
This works only sometime….some time not move..How can I resolve this problem?
Here is ...
1
vote
3answers
894 views
Moving camera in large view
In my cocos2d app I was wondering how to make a CCSprite move on the screen but have the screen focused on the CCSprite, so when the sprite moves the view moves with the CCSprite. Is there a tutorial ...
-2
votes
1answer
677 views
Rolling a 3d die in cocos2d
How can I have a 6 sided die in my cocos2d game and when the device is shaked the die rolls and shows a number? I would also use UIKit if it was necessary.
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
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.
2
votes
1answer
145 views
Game speed cubic growth
Is it possible, using delta in my update method to increase a game speed variable exponentially on cubic growth (the blue line below)
My maths isn't great so I'm not sure how the formula would be ...
0
votes
1answer
250 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
0answers
222 views
Carousel level selector
In my cocos2d game I need the user to select a menu so I was hoping that they could use a carousel (like the one in ski on neon or sonic racing for the iPad). I realized that there is nothing for this ...
2
votes
1answer
2k views
Cocos2D 2.0 - masking a sprite
I have read this tutorial about how to mask sprites using Cocos2D 2.0. http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0
But the author talks about OpenGL ES textures and ...
3
votes
1answer
311 views
Smoothing rotation
I've spent the last three days trying to work out how to rotate a sprite smoothly depending on the velocity.x value of the sprite. I'm using this:
float Proportion = 9.5;
float maxDiff = 200;
float ...
0
votes
1answer
181 views
Rotation based on x coordinate and x velocity?
-(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
float deceleration = 0.3f, sensitivity = 8.0f, maxVelocity = 150;
// adjust velocity based on ...
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 ...
2
votes
1answer
290 views
Image 1 becomes image 2 with sliding effect from left to right?
I would like to show a second image appearing while a "door" is closing on my character. I've got my character in the middle of the screen and a door coming from the left. When the door passes my ...
-1
votes
1answer
132 views
Make a CCSprite come up from bottom of the screen in intervals
I have a cocos2d iOS app. I have a CCSprite that I need to come up from the bottom of the screen every few seconds (like 2 or 3 seconds). How would I do this?
0
votes
0answers
32 views
Cocos2d copied actions not responding?
I am running an animation on 2 sprites like so:
-(void) startFootballAnimation {
CCAnimation* footballAnim = [CCAnimation animationWithFrame:@"Football" frameCount:60 delay:0.005f];
spiral = ...
0
votes
1answer
363 views
Store and create game objects at positions along terrain
I have a circular character that rolls down terrain like that shown in the picture below.
The terrain is created from an array holding 1000 points. The ground is drawn one screen width infront and ...
1
vote
2answers
408 views
Custom Fonts in cocos2d
I have tried Hiero but it has NEVER worked for me. Is there an alternative application for creating fonts for cocos2d?
Thanks
1
vote
1answer
442 views
Running one action on multiple sprites simultaneously
I have created a spiraling animation for a football. I want to be able to run it on 2 sprites simultaneously.
This is what I have done:
CCAnimation* footballAnim = [CCAnimation ...
1
vote
1answer
319 views
Cocos2d particle system
I have a fire particle emitter in my project and I have it following a football. My goal is to make the football look like it is on fire but the problem is when I add it to the screen it can only be ...
-3
votes
1answer
169 views
Simple question about a cocos2d based game template
I am learning a cocos2d based Game template tutorial from here and now I am at this point of the tutorial. My question is, how can i run 30 different scenes in 30 different levels of 5 chapter? Now I ...
0
votes
1answer
357 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
650 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 ...


