# Tagged Questions

Relating to the motion of objects through space (in 2 dimensions (x,y)) and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

119 views

### Ring and Pole - Box2d

How I can make a b2Body in box2d so that it could form a ring which does not collide from the center just like a ring. like when we flick the object and there's another body (like pole), the pole can ...
2k views

### AndEngine - Moving Rectangle using Accelerometer

I'm learning how to create games with this great engine and I'm trying to put my knowledge in order to create a simple game. My first goal is to make a Rectangle moving using accelerometer and create ...
1k views

### Movement & Physics in an entity-component system

I'm currently playing around with entity-components systems and got started on the movement/collision/physics parts and would like to have some pointers! It's a basic 2D sidescrolling game, with the ...
1k views

### “Car” movement in 2D dimension [closed]

I am searching for a simple tutorial how to add arcade car physics for my game. Exactly same user units behaviour i found in next games: Tank Hero: Laser Wars Death Worm: Video: ...
261 views

### Gravity independent of game updates per second

Edit Just for clarification, my sprite's 'movement' isn't the problem. If I set my Time variable to 4 seconds, then it will cross the screen in exactly 4 seconds regardless of logic updates rate per ...
3k views

### Setting a Box2D Bodies Center?

How do I set the center of a fixture/body consisting of multiple shapes (triangles)?
1k views

### Calculating buoyancy force

I am trying to simulate a buoyancy force for objects submerged/suspended in a fluid in a 2D environment. According to Game Physics: Engine Development: How to Build a Robust Commercial-Grade Physics ...
6k views

### Analysis of Mario game Physics [closed]

I know there's a breakdown of Sonic the Hedgehog physics found here, and I was wondering, does there exist a breakdown of any of the Mario games? Something similar to this but for Mario is what I'm ...
738 views

### Throw object towards predefined place? [duplicate]

I have a 2D side-view game with object attributes such as x, y, speedX, etc. Now I want to throw a given object from any place on the screen onto a defined goal place, in such a way that its ...
169 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 ...
392 views

### Creating stable tentacle structures

I am using verlet integration to simulate some tentacles. So far it works great and I am satisfied with how it looks in general. Here is how a tentacle is built: The very stiff sticks are colored ...
152 views

### Collision and gravity problems

So this is an easy question. I need to implement gravity in my game but where I'm stuck is what variables do I need in my Entity object for the calculations and a good algorithm that I can use for ...
5k views

### Implementing a wrapping wire (like the Worms Ninja Rope) in a 2D physics engine

I've been trying out some rope-physics recently, and I've found that the "standard" solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. ...
416 views

### Swarm/crowd movement with box2d?

Apart from using b2Body::setTransform(), are there other ways to move a body around while keeping its dynamics ? I want to move several bodies at the same time into one direction, pretty much like ...
6k views

### 2D games on Unity and collision detection performance

I'm developing a 2D game for the iOS platform. I have seen a lot of packages on asset store that makes 2D asset creation for unity easier. I have narrowed my selection to just 2, 2d toolkit and ex2d. ...
458 views

### Realistic 2D Planetary Physics Engine?

I'm doing a spaceflight simulator in C++ (using Allegro 5), and I realised that I could just use a physics engine instead of writing my own physics. So that's what I'm doing. Since this is going to ...
160 views

### Moving Sprite With Physics Frame

Normally, a physics frame in pink (see image below) gives the body for detecting hit signal. It usually either falls down or lifts up depending on the gravity orientation. The question is: Is it ...
754 views

### Creating a frozen bubble clone [closed]

This photo illustrates the environment: http://i.imgur.com/V4wbp.png I'll shoot the cannon, it'll bounce off the wall and it's SUPPOSED to stick to the bubble. It does at pretty much every other ...
504 views

### 2D Motocross physics

I'm looking into making a 2D motocross bike game with plausible physics. It should look like this: For a first try, I've created only the player (a motocross driver) and the map (consisting of ...
420 views

### Fluid Particle Grid

So recently I have been looking at some fluid simulation techniques, specifically Smoothed Particle Hydrodynamics. One of the key components is a grid to avoid O(n^2) searches. I have been having some ...
517 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 ...
332 views

### Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA

Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code iceBoy.moveY++; iceBoy.position.Y += moveY; Now heres the ...
594 views

### Simple 2D hair simulation/manipulation

I would like to simulate very simple hair in a 2D environment, and will need to be able to "brush" the hair. What I want to do: A 2D character is facing squarely towards the player. The player can ...
234 views

### limiting jump forces to achieve a maximum jump height [duplicate]

A player and the world are modeled using a physics engine. Jumping is modeled by applying a vertical upward force to the player's physics body when the jump button is pressed. The upward force is ...
10k views

### How do I build a 2D physics engine? [closed]

The most advanced games I've made are a 8-ball pool game made with the physics engine Box2dFlashAS3 and a platform game with levels. When I did platform games, I've always wished to know how to make ...
370 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 { ...
129 views

### Bullets Spawning in same direction [closed]

I'm using XNA to make a Bullet Hell Shooter game, and I'm running into some troubles when I try to change the direction in which the bullets move. Been trying to debug for awhile, but haven't gotten ...
378 views

### Am I implimenting a sweep and prune broadphase correctly? [closed]

The code that I am using is: std::vector <PhysicsBody*> physicsChildren; //containing all objects ... std::sort(physicsChildren.begin(), physicsChildren.end(), sortByLeft); ...
197 views

### Collision detection for Monotouch [closed]

What I want to have for my Monotouch 2D projects: simple collision detection and collision polygons working with UIViews Sounds simple, isn't it? I've evaluated a lot of engines available on the ...
87 views

### Checking bounds of a quad

I want to know how would I tell if a quad touches another quad in my game built in Slick2D. I have a class that I named "Bounds" which has 4 "Point" objects which just store an X and a Y value and a ...
696 views

### Whats the physics behind the doodle jump game?

I'd like to know how we can achieve the doodle jump type physics using andengine. I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came ...
465 views

### In 2d game logic, should I use pixels or world coordinates?

Currently in my game I handle the logic (collisions, movement) using pixels but I find it very limiting espiecially when thinking about variable speed. For example Box2D requires you to use ...
2k views

### Powder games: how do they work?

I recently found these two gems: http://powdertoy.co.uk/ http://dan-ball.jp/en/javagame/dust/ My question is: How are the physics with so many elements efficiently handled? Am I just severely ...
203 views

### Distribute circles evenly on Screen - circle packing

I want to evenly distribute a random amount of circles with random diameter on the screen for. This level doesn't scroll so the users screen resolution sets the limits. Further I would like the ...
169 views

### Physics movement prediction is way off [closed]

I'm making a simple, non-networked game. There are two players and a ball. In implementing the AI for the second player, I've run into a huge problem predicting where the ball will hit the ground. ...
3k views

### Optimizing gravity calculations

I've got a bunch of objects of varying size and velocity which gravitate towards each other. On every update, I have to go over every object and add up the forces due to gravity of every other object. ...
149 views

### Increase restitution (bounciness) of an object in a JavaScript formula

I'm going slightly around the houses on this one. I originally started a thread over on Stack Overflow about it but then it seemed to diverge into mathematics, with no joy from the SO community over ...
2k views

### Resolving a collision with forces

In my 2D physics engine, I can detect AABB vs AABB collisions, and resolve them by finding the shortest penetration vector and adding it to the AABB's position. Doing this "pushes" the first AABB ...
601 views

### Collision detection against specific sprite shape using XNA with Farseer Physics?

I am making a 2D XNA Game, using Farseer Physics for collisions. I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the ...
673 views

### Ball bouncing infinitely and constantly

Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm: ...
121 views

### Help finding a good XNA physics library? [closed]

I'm looking for a good physics library for XNA. Can anyone help me find something good, simple and easy to learn for XNA?
2k views

### Voronoi regions of a (convex) polygon

I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection. The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on ...
1k views

### Non-physics character movement in a Box2d Environment

I am in the process of creating a physics platformer. However, I want the player movement to feel very old-school(as in: non-physics like), which means that the character: Should always move equally ...
786 views

### Find the Contact Normal of Rectangle Collision

It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given. Basically, I have two rectangles (AABBs) that ...
164 views

### Separating Axis Theorem fails at certain angles

I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
146 views

### Circle Collision class not positioning itself correctly

Ok I am using unity3D and the Futile framework. I have everything drawing and working correctly with Futile, but I am trying to attach a circle collision class to the FSprite that I have. I must be ...
292 views

### What physics engine support force fields and bodies represented as points?

I need a game engine that supports force fields in 2d or 3d, but suitable for 2d calculations, like bullet. Each body I want to simulate is represented as a set of points. Each point has positive ...
294 views

### Implementation of planets in top-down space shooter [closed]

I am working on a top-down space shooter, and I have come to the point where I need some input on a mechanic. I have implemented enough that I can make this choice; either way will not change the code ...