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
19 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
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
47 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
1answer
158 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
1answer
133 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
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 ...
-1
votes
1answer
142 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 ...
0
votes
1answer
386 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,
-1
votes
1answer
77 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?
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 ...
-2
votes
1answer
228 views
How to fly enemies like galaxian game enemies?
I am developing game like galaxian and using cocos2d with box2d .I don't have idea how to create enemies like galaxian game enemies and how do they fly over the screen.
...
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: ...
4
votes
1answer
353 views
Cocos2d: Tongue effect like in Munch Time
I'm wanting to do a tongue effect for my character like the one in Munch Time( shown in pic ). The player does some action and his tongue attaches to the nearest platform.
I'm thinking this is ...
0
votes
0answers
175 views
How to attach an object to a rotating circle?
I am trying to make an object get attached on a collision point to a circle that is rotating, but the player needs to get attached with a constant point on the player. For example the player is moving ...
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
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
1answer
1k views
Best way to create a level editor in java
I am creating an iPhone game using cocos2d + box2d that needs a lot of levels. My friends and I are creating the game and most of them have no programming experience and end up with nothing to do. I ...
1
vote
3answers
924 views
Include Box2D libraries to a cocos2d project (iOS)
I have a problem including box2D to my cocos2d project. I've tried different ways to do it with no success. This is what I've done:
I downloaded Box2D (Box2D_v2.2.1) to my project directory.
Dragged ...
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 ...
1
vote
1answer
507 views
Dynamic bodies with Parallax Scrolling
I have an object that has a dynamic body. Currently, I'm setting it's position to follow the sprite when the parallax layer move. After a certain event, the object suppose to fall to the ground. ...
1
vote
2answers
791 views
Would a box2D sensor fit my needs?
I have a object in my game that when the main character hits it, all I want to do is have the object explode and then notify the character object that a hit has occurred.
Would I use a b2Body and ...
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 ...
-1
votes
1answer
277 views
Is it any good to make play game in zoom condition?
I'm developing a game with large obstacle and sprites(in cocos2d+box2d for iPhone), then after zooming out my sprites and layer (by increasing cameraZ), I make my game to play by user, which causes ...
2
votes
1answer
1k views
Programmatically set color of Box2D body's sprite or image
In my basic Cocos2D + Box2D iPhone app I have a bunch of circular Box2D bodies. I'd like to change the color of the circles programatically. What's the easiest way to do this?
So far I'm just ...
2
votes
1answer
583 views
Cocos2d+pybox2d vs Cocos2d-Iphone
Myself and two colleagues are working on making our first indie game for PC and, we decided to use Cocos2D + PyBox2D. We decided this based on what we've seen of Cocos2D-iPhone games, but I'm not ...
3
votes
1answer
1k views
How do you create your levels containing curved slopes in Box2d?
I have just started developing games for iPhone in Cocos2d and am currently working on a Box2D prototype. I know this is not an easy start, but I have experience in the AS3 port of the physics engine. ...
2
votes
1answer
829 views
cocos2d: syncing CCAnimation frames with Box2d Shape manipulations
my cocos2d game currently has a ccsprite attached to a box2d body.
during the game i apply different CCAnimations on my sprite, i would like to perform certain manipulations to the box2d body ...
5
votes
2answers
1k views
cocos2d Merging box2d bodies
i'm using cocos2d to build an iphone game.
my game currently has two sprites: one for the main character and another for an item i should carry once he gets on him.
the main character and the item ...
