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 ...
-1
votes
0answers
33 views
How to make askew slope image(b2body) in Box2d?
I am new in Box2d and learning myself. I am learning Box2d from here http://www.box2d.org/manual.html#_Toc258082972
I want to make a body and want to give b2body a angle so that it will look like ...
0
votes
1answer
17 views
Calling CCRepeaForever on CCLabelTTF Makes Label Not Show Up
I have a CCLabelTTF in the top right hand corner of the view.
-(void)scrollScoreLabelAndMonkey{
scoreLabel = [CCLabelTTF labelWithString:@"0000" fontName:@"Marker Felt"
fontSize:30 ];
...
0
votes
1answer
59 views
Cocos 2d move CCsprite in array of points [closed]
I need a CCsprite to move to the points in my array those points will form a circle.I know to move CCsprite but my app crashes when i make it to move in array of points. Help me where i am making ...
0
votes
0answers
36 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
1answer
21 views
Set texture of a LHSprite that is loaded from LevelHelper
How do i set the image/texture of an LHSprite that is loaded into xCode using levelHelper & spriteHelper?
I am using sprite sheets. So i tried to load the image the old fashioned way using ...
-2
votes
0answers
29 views
What to choose? [closed]
I am so stuck on what to choose, I want to create a game like vector (run and jump game with multiple levels)
From what I've read i may use:
Kobold2D
Cocos2D w/ Box2D (which involves learning a bit ...
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 ...
3
votes
1answer
106 views
Collision Filtering in Box2D
I have four bodies in my Box2D World. Each are polygon shape, with some physics parameters.
Now when the game start, I need one of the bodies from the World (BodyA) to not be allowed to collide with ...
0
votes
0answers
105 views
Detect Sprites, they are in Shape or Not which random draw in Cocos2d
I have searched a lot on web and found some of help ful links as exact my question.
Link 1 Link 2
But still i am not success to achieve this,
i have done some of code lines, as like draw line by ...
1
vote
1answer
65 views
TiledMaps and real objects
I'm creating a simple game for the iPhone using Cocos2d.
I'm having a hard time understanding how add real objects to a tiled map.
I know that you can add an object-layer to the tiled map and set the ...
0
votes
0answers
110 views
CCLabelTTF value is not updating (cocos2d)
i have two layers control layer which contains CCLabelTTF for score, and first layer in which i detect collision btwn my objects. i want to update score (i.e CCLabelTTF value) in control layer from my ...
0
votes
0answers
238 views
Cocos3d lighting problem
I'm currently working on a cocos3d project, but I'm having some trouble with lighting and I have no idea how to solve it. I've tried everything and the lighting is always as bad in the game.
The ...
3
votes
4answers
239 views
What is technical specs for iOS platform for a game?
I would like to know when a contractor ask you for a technical specs for iOS platform of a game, what's the description that you should give back to him?
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* ...
1
vote
0answers
248 views
Bezier curve sample code on touches moved
i am searching for any sample code to draw bezier curve by using touches, if any one have links or sample code please help me. i am developing the game like flight control in that i have to move my ...
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 ...
1
vote
1answer
59 views
Issues with background coordinate configuration in objective c with runAction?
In my game I want to have two backgrounds going one after the other creating a continuous loop moving to the left. However, right now one goes, and the other does not follow it.
Here's what I ...
1
vote
1answer
222 views
Cocos2d: Using single timer/scheduler for multiple sprites
want to know if is it possible to use single timer or scheduler method for multiple sprites ? Like I am now working on a game and there could be any number of sprites and i want to perform some ...
0
votes
0answers
97 views
Using same b2World in different classes/Layers
How can we use same b2world in different classes in our game.. ? I am having two classes gameLayer and weaponLayer respectively. I am trying to use the b2world I am using in gameLayer in weaponLayer ? ...
3
votes
2answers
309 views
Creating 2D waveform for Cocos2d game
I'd like to have a Waveform in my iPhone game that I am developing using Cocos2d v2.0.
That's the ideal wave I'd like to achieve. A simpler wave which I would still be happy with is this one.
...
0
votes
1answer
117 views
HUD layer not being added on my scene [closed]
I have a CCScene which already holds my gameLayer and I am trying to add HUD layer on that.But the HUD layer is not getting added in my scene, I can say that because I have set up a CCLabel on HUD ...
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 ...
-2
votes
1answer
511 views
How change the size of sprite in cocos2d?
I want to change the scale of sprite like a paper in 'Paper Toss' game.
'Paper Toss' is the game is available on the App store. I want to make a sprite like a paper and change the scale of sprite ...
1
vote
1answer
426 views
How make a laser path prediction line like a “slingshot cowboy” game?
How so I make a laser path prediction line like a “slingshot cowboy” game in cocos2d or box2d and select the target like "slingshot cowboy" game.
1
vote
1answer
208 views
How do I identify a collision with a specific body?
How can I identify when the ground body collides with another b2Body? I can use b2ContactListener to be notified of collision events, but how do I tell which bodies collided?
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 ...
1
vote
2answers
250 views
How can I make a rectangle to an irregular shape?
I used masking for breaking an image into the below pattern. Now that it's broken into different pieces I need to make a rectangle of each piece. I need to drag the broken pieces and adjust to the ...
1
vote
1answer
95 views
Drawing texture does not work anymore with a small amount of triangles
When i draw lines, the vertices are well connected. But when i draw the texture inside the triangles, it only works with i<4 in the for loop, otherwise with i<5 for example, there is a ...
1
vote
4answers
798 views
Cocos 2D - Hold down CCMenuItem
I am using the following code to move a CCSprite left and right.
-(id)init{
CCMenuItemImage * moveLeftButton = [CCMenuItemImage itemFromNormalImage:@"Move Left Button.png" selectedImage:@"Move ...
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 ...
1
vote
0answers
206 views
Design pattern for procedural terrain assets
I'm developing a procedural terrain class at the moment and am stuck on the correct design pattern. The terrain is 2D and is constructed from a series of (x,y) points. I currently have a method that ...
-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?
2
votes
2answers
200 views
Moving 2d camera in the y direction
I'm developing a simple game for the iphone and am struggling to work out the best way for the camera to follow the main character. The following picture hightlights the three main components:
...
0
votes
0answers
194 views
Export POD format from 3D Max to cocos3D
we're developing a Medical app with a 3D character thats teachs about phisioterapy.
We have a 3D character in 3D Studio Max with animation, when export it into POD (I Have tried many configurations) ...
0
votes
2answers
572 views
Constant rotation of a revolute joint in box2d
I would like to have a line with one end attached to a location and have it rotate constantly (with the same speed) with a maximum of 45 to -45 degrees (i.e. I would like to have it swing like a rope ...
2
votes
3answers
2k views
Getting isometric grid coordinates from standard X,Y coordinates
I'm currently trying to add sprites to an isometric Tiled TMX map using Objects in cocos2d. The problem is the X and Y metadata from TMX object are in standard 2d format (pixels x, pixels y), instead ...
0
votes
1answer
330 views
Thread-safety in Cocos2d-iPhone?
After tinkering a bit with cocos2d, I discovered that there is no classic game loop and everything is more-or-less event driven. I guess I can wrap my head around that, no problem.
But I cannot find ...
2
votes
1answer
824 views
Best Method to Create Side Scrolling Levels? - Cocos2D
I am looking to start my first side scroller project using Cocos2D, but I am curious. What is the preferred/best method of creating you levels? For large levels I see hand making it very laborious, is ...
1
vote
1answer
1k views
Cocos2D - How to move sprite on the X axis, using the accelerometer
I'm trying to make a vertical shooter, using Cocos2D and a few tutorials. Unfortunately, most tutorials only show how to make an horizontal shooter.
Still, I tried to adapt the code from a horizontal ...
2
votes
1answer
763 views
Making filled circles in cocos2d
How can you make filled-in circles in cocos2d? I understand you have to create a new method, but I don't really understand how it works/how to do it. Could someone please provide maybe an example or ...
2
votes
2answers
584 views
Efficient Bullet Firing Class
I've been struggling with this for a while. I have been trying to create a bullet pool class for a game I have made that doesn't cause a significant fps drop.
I have tried creating a bullet pool ...
1
vote
1answer
544 views
Using tilemaps for an isometric football game with cocos2dx
I am writing a simple soccer game in cocos2d-x and recently found out that older iOS versions do not support cocos2d sprites larger than 1024x1024px.
I was thinking about using isometric tilemaps to ...
2
votes
3answers
5k views
What are the pros and cons of GameSalad versus Cocos2D?
I am currently using the Cocos2D framework for creating my game but I just happened to come across GameSalad and was amazed by this video.
GameSalad claims to allow you to create games without ...
0
votes
1answer
2k views
Cocos2d CCSpriteFrameCache: couldn't load texture file
I am currently doing this Cocos2d tutorial: http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d
...and get the following error messages:
2011-12-30 16:36:28.536 ...
2
votes
1answer
5k views
cocos3d versus Unity for simple IOS 3D games?
Wondering if anyone here happens to have experience in doing some simple 3D based games/apps for IOS, using cocos3d & Unity and could give some pointers....questions I have are:
GENERAL
1) It ...
1
vote
1answer
462 views
How can I scroll sprites when swiping using Cocos2D?
I'm adding 3 sprites (layers) to CCParallaxNode:
BGLayer = [CCSprite spriteWithFile:@"Layer.png"];
[_backgroundNode
addChild:BGLayer
z:2
parallaxRatio:layer1Speed
...
0
votes
0answers
808 views
Cocos2d Box2d how to shoot an object inside the screen [closed]
I have the code below :
- (id) initWithGame:(mainGame*)game {
if ((self = [super init])) {
isTouchEnabled_ = YES;
self.game = game;
CGSize size = [[CCDirector ...
-4
votes
1answer
147 views
How can I initialize 15-20 sprites with the same starting position?
How can I load 15-20 sprites in Cocos2D at the same point (ccp(20,20), which is an alias for CGPointMake) using NSArray?
This is what I'm doing now, and it doesn't work:
int i,endvalue=3;
...
