Box2D is an open-source rigid-body 2D physics simulation library for games, written in C++.
0
votes
0answers
25 views
Making Puzzle Bubble type game in AndEngine
I want to make Puzzle Bubble clone game and I need some serious help.
Can you please tell me using physics what should I start with? I mean how can I make addictive levels and How can I reflect the ...
0
votes
1answer
407 views
Making body(box2d) a spite(andengine) in android
I can't make body(box2d) a spite(andengine) and at the same time i wanna apply MoveModifier to sprite which is body.if i can make just body,it works namely the srites can collide.if i can apply just ...
1
vote
1answer
147 views
Understanding Box2d Restitution & Bouncing
I'm currently trying to implement basketball bouncing into my game using Box2d (jBox2d technically), but I'm a bit confused about restitution.
While trying to create the ball in the testbed first, ...
2
votes
4answers
3k views
box2d and constant movement
i'm developing a game with a top down view, the players body is a circle. To move the character you need to tap on the screen and it moves to the spot.
To achieve this i'm saving the coordinate of ...
0
votes
0answers
38 views
360 degree gravity game mechanic like “They Need To Be Fed” game
I am a fan of "They Need To Be Fed" game and I want to understand the game mechanic at a deeper level. What are some good resources for the basic Box2d (or similar) physics behind the 360 degree ...
0
votes
1answer
120 views
Is there a “box2d without physics” lib (only for collision detection)?
Box2d Collision detection algorithms are probably the best ones out there. Unfortunately, they are bundled together with a realistic physics engine that I don't need.
Is there an open source project ...
-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
vote
1answer
55 views
Hill-jumping game mechanic like Tiny Wings
I'm a huge Tiny Wings fan and I'd like to understand the game mechanic at a deeper level. What are some good resources for the basic Box2d (or similar) physics behind the hill-jumping game mechanic?
...
2
votes
2answers
294 views
How do I get the touch event on a body in Box2d(Java)
I have various bodies rotated at some angle with the help of Box2d in libGDX. What I want is to destroy the body when I click on it, but the problem is that I am not able to get the area definition of ...
2
votes
1answer
66 views
Bodies do not stay sticked together by joint in retina display
I'm rehearsing on Box2D revolute joints. Everything's going pretty well except for one thing. For some reason bodies joined together with revolute joints do not stay sticked, they start getting apart ...
2
votes
2answers
81 views
Client-side physics simulation
I am trying to create a very simple client-server based physics game, using box2d library. A simple football game.
Obviously, the server runs only the box2d world.
My question is:
is it correct to ...
-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 ...
1
vote
1answer
1k views
Setting a Box2D Bodies Center?
How do I set the center of a fixture/body consisting of multiple shapes (triangles)?
0
votes
1answer
110 views
Libgdx import bin/xml/json from physics editor
I'm using Libgdx. I did a simple json file in Physics Body Editor and I don't have any idea how could I import it into my physic world in libgdx.
Any idea will be appreciated.
P.S: Sorry if there ...
2
votes
1answer
97 views
Separation algorithm in flock simulation?
I'm using box2d (the c++ one).
I found a method for an arriving behavior (on http://www.red3d.com/cwr/steer/gdc99/ ), which works well, problem is, the bodies are bumping into each other and it ...
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
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
19 views
Weld Joint Box2d not run
i have two object like this :
b2WeldJointDef weldJoint;
//frist body
bodyDefXich.type = b2_dynamicBody;
bodyDefXich.position.Set(3, 2);
b2FixtureDef fixtureDef;
b2PolygonShape ...
0
votes
2answers
110 views
Increasing speed of circle over time as linear with Box2d
Assume that there is a circle and it can be moved by using keyboard arrows.Is required that increasing speed over time like increasing car speed. For example; max speed is 25 and time to reach max ...
2
votes
5answers
3k views
Box2D physics editor for complex bodies [closed]
Is there any editor out there that would allow me to define complex entities, with joins connecting their multiple bodies, instead of regular single body entities? For example, an editor that would ...
1
vote
1answer
52 views
Best way to have a body with 1 dimensional linear only movement in Box2D
I have a body that I am using as a paddle, it is expected to move in a vertical fashion and other objects should "bounce off it". The paddle itself should never move horizontally.
According to the ...
2
votes
1answer
176 views
AndEngine; Box2D - high speed body overlapping, prismatic joints
I'm trying to make good suspension for my car game, but I'm getting nervous of some problems with it.
At the beginning, I've tried to make it out of one prismatic joint/revolute joint per one wheel ...
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 ...
3
votes
1answer
54 views
How do I copy box2d data from one body to another?
I want to copy all Box2D-related data (position, velocity, rotation, impulse, ...) from one body to another.
This is what I've got working (with box2djsweb):
var t = body.GetTransform();
...
-1
votes
1answer
109 views
Why might a body suddenly stop while moving on continue platform?
I have a 32x32 sprite and I make some to be platform like this
for (int i = 0; i < 15; i++) {
attachChild(new Ground(32 * i, 200, regPlatform, vertexBufferObjectManager, physicsWorld));
}
...
0
votes
2answers
74 views
Problem with sensor in box2d [closed]
I have two bodies: one green static sensor (spikes) and one orange dynamic body (brick).
I have bullet and it's a dynamic body too, but with bullet flag set.
My problem is that when the bullet is ...
1
vote
1answer
137 views
Is using Box2D for simulating gravity “in space” a good idea? [duplicate]
I'm attempting to write a simulation of a solar system of planets in 2D space that are attracted to each other through Newton's law of universal gravitation.
I know that it is possible to simulate ...
0
votes
0answers
102 views
Slow Rope Joint Simulation
I am right now developing game similar to Cut The Rope.
But I have some problem in developing this game.
I have successfully created rope and attached multiple rope with candy.
Below I represent ...
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 ...
1
vote
3answers
928 views
Box 2d Level Editor for AndEngine
I am getting started with Box2d in AndEngine.
I need to know if there is any level editor to be used with box2d and gives output capatable with AndEngine.
Is there any tool which can help me building ...
1
vote
5answers
4k views
What is the proper way to remove a box2d body from the world in libgdx?
I'm wondering how to remove the body from the world, because I found an error when I tried.
I found following error.
java:
...
1
vote
5answers
541 views
Errors happen when using World.destroyBody( Body body )
on Android application using libgdx, when I use World.destroyBody( Body body ) method, once in a while the application suddenly shuts down.
Is there some setting I need to do with body collision or ...
1
vote
0answers
77 views
Box2D, OpenGL, resolution and matrix setup
Okay, my internal units are going to be meters, ranging between 0.1 and 10 meters for size.
First of all, my mind is all wrapped up in a knot trying to understand how to handle my game with multiple ...
0
votes
0answers
73 views
Help with ball movement and rotation in Box2d [closed]
I am trying to learn box2d in cocos2d. I have searched for online tutorials and ray Wenderlich's seem to be the best ones!I am learning in a slow but steady pace! I am currently developing an app in ...
0
votes
1answer
59 views
Box2D OpenGL debug renderer convert box2d coordinates to world space
I made an OpenGL 3.x renderer for Box2D's debug draw (b2Draw base class). Unfortunately I've tried for a while now to convert the box2D units, which are meters to my internal units which are pixels. I ...
0
votes
0answers
50 views
Large Polygon Body in Physics World than Actual Debug Draw Show [closed]
In my game, I was creating hammer object using following code.
public Body createBody(Vector2 position, String bodyName, String path,
float angle, PhysicsWorld ...
0
votes
0answers
54 views
Box2d and opengl units [closed]
I'm trying to use Box2D with my WebGL renderer and I've got a strange behavior :
My dynamic bloc is floating aside walls, it's look like the physic world is bring forward the graphic world.
I know ...
0
votes
1answer
138 views
Making the player walk on walls in box2d
I'm making a game in stencil where players walk form left to right along randomly generated walls. I cant use waypoints, since the walls' shapes and positions are unpredictable.
Here's a descriptive ...
2
votes
1answer
124 views
Is it bad practice to set the velocity of an object every loop?
Say I have a simple game with a gameLoop function that gets called every 50 milliseconds or something similar, and I have a box2d object. Is it bad practice/too CPU intensive to use SetLinearVelocity ...
0
votes
1answer
219 views
GetContactList stops reporting collisions on welded bodies
I have some strange problem with my game which uses Box2D as physics engine and I'm out of ideas on what I can do to solve it.
My game is a class assignment where I need to build a simple game where ...
4
votes
1answer
324 views
Mario like jumping and landing in box2d, help
I've been trying to get Mario type jumping/landing in a Box2d game and it's been giving me some trouble.
Results: Player loses velocity on landing
Desired Results: When player lands it will continue ...
3
votes
3answers
180 views
Libgdx body passing through block then fall on it
I'm using libgdx and its physic engine Box2d. My question is : how could I make my box2d body go through a block , ignore the first collison than make the block active so the ball can fall onto it. A ...
14
votes
6answers
4k views
Are there any alternative JS ports of Box2D?
I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.
I ...
2
votes
1answer
56 views
Accessing other classes from a Box2D (farseer) body
I'm using Farseer for physics in a game, and have several key classes: Planet and PlanetProp. Each planet has a large circular body and a "field". This field is a large sensor around the body. ...
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 ...
3
votes
1answer
114 views
Smoothly move between bodies
I'm not sure if the title is correct (please comment if it is not). I have a sprite (rectangle body), and I'm applying force on it to make it move from left to right and then go backward. The platform ...
5
votes
2answers
2k views
How to make bird to fly using box2d
I am new to Box2D, I have set gravity to 10. How to make an object fly in space even though the gravity is 10. What are the properties I need to set to make object fly? Is there any different ...
1
vote
0answers
93 views
Why won't my Box2d bodies collide? [closed]
I'm doing something wrong when trying to get bodies to collide using jBox2d & Slick2d. Here is have just my basic init, update, and render methods. Render and update seem to work fine for drawing ...
1
vote
2answers
296 views
What is the Box2D coordinates system?
I know that for Box2d I need to translate pixels to meters which is easy peasy. However my problem is what is the orientation of Box2D coordinates system? Is this the same as screen one (right += x, ...
1
vote
1answer
262 views
How would I make an air hockey AI?
I am making an air hockey game for Android using AndEngine and its Box2D extension.
How would I make an AI for an air hockey game? For it to work the AI would not only need to move its paddle side ...






