# 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.

5k views

### Do 2D games have a future? [closed]

I'm currently working on a 2D soft-body physics engine (since none exist right now -_-), but I'm worried that there's no point to spending what will most likely be years on it. Although I love ...
4k views

### 2D game collision response: SAT & minimum displacement along a given axis?

I'm trying to implement a collision system in a 2D game I'm making. The separating axis theorem (as described by metanet's collision tutorial) seems like an efficient and robust way of handling ...
226 views

### Game Physics: Implementing Normal Reaction from ground correctly

I am implementing a simple side scrolling platform game. I am using the following strategy while coding the physics: Gravity constantly acts on the character. When the character is touching the ...
268 views

### How to implement physical effect, perspective effect on Android

I'm researching about 2D game for Android to implement an Android Game Project. My project looks nearly like PaperToss. Instance of throwing a page, my game will throw a coin. Suppose that I have a ...
742 views

### What's the best way to handle slopes for a platfomer game using Box2D

I would like to know if there is any known solution for handling the player's movement on slopes using Box2D engine. I tried to do it using a circle as the player. Everything was fine until I tried ...
654 views

### Circle physics and collision using vectors

This is a problem I've been having, When making a set number of filled circles at random locations on a JPanel and applying a gravity (a negative change in the y), each of the circles collide. I want ...
747 views

### 'Spring' physics

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them ...
976 views

### Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
2k views

### Game physics / 2D Collision detection AS3

I know there are some methods you can use like hittestPoint and so on, but I want to see where my movieclip colliedes with another another movieclip. Any other methods I can use? by any chance does ...
467 views

### Collisions between moving ball and polygons

I know this is a very typical problem and that there area a lot of similar questions, but I have been looking for a while and I have not found anything that fits what I want. I am developing a 2D ...
245 views

### How to apply numerical integration on a graph layout

I've done some basic 1 D integration, but i can't wrap my head around things and apply it to my graph layout. So, consider the picture below: if i drag the red node to the right, i'm forcing his ...
450 views

### Detecting a ledge in Box2D [duplicate]

Possible Duplicate: Detect Open Space in Farseer How do I detect ledges? I'm making a 2D platformer with Box2D. The player needs to be able to grab onto a ledge and pull him/herself up. ...
465 views

### One-way platform collision

I hate asking questions that are specific to my own code like this, but I've run into a pesky roadblock and could use some help getting around it. I'm coding floating platforms into my game that will ...
2k views

### Friction in 2D game

I'm developing a 2D platformer, although this question could probably apply to just about any 2D type physics; What is the equation for friction? I have sort of a hacky type of friction set up in my ...
477 views

### 2D Magnet-like repelling behavior

If somebody wanted to develop a system between two intersecting rectangles so that the rectangles would, in a gradual process, push eachother away from one another until no longer intersecting, with ...
594 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.
393 views

### Ideas for 2d fire simulation [closed]

I want to simulate a fire in a flat and non flat* surface (fire spread modelling). I've seen that cellular automata is one of the algorithms that can be used. Are there other algorithms that would be ...
197 views

### 2D Physics Engine to Handle Shapes Composed of Multiple Densities XNA

The game I'm working on involves shapes that might be composed of multiple materials in a variety of ways. Let's just take for example a wooden rod with and sizable tip of iron or say a block composed ...
1k views

### Collision Detection for a 2D RPG

First of all, I have done some research on this topic before asking, and I'm asking this question as a mean to get some opinions on this topic, so I don't make a decision only on my own, but taking ...
139 views

### How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)

I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things ...
257 views

### Physics System ignores collision in some rare cases

I've been developing a simple physics engine for my game. since the game physics is very simple I've decided to increase accuracy a little bit. Instead of formal integration methods like fourier or ...
516 views

### Multiple collisions within a single frame cycle?

So say you want to simulate several objects in two dimensions, just bouncing around in a finite space. Using AABB and sweep tests, it shouldn't be that complicated to calculate single collisions ...
500 views

### android game-logic for shooter

Im creating a 2d game for android. I'll just get right to it. I have a sprite controlled by a joystick that needs to shoot, sofar Ive managed to get direction and movement on my bullet, but then I ...
341 views

### Stopping an object after applying an impulse or force?

I'm having a small issue where after applying an impulse or force it is impossible to actually get an object to stop, i.e. a velocity of zero. This code is run every 1 / 60 of a second: void ...
2k views

### What is the difference between an impulse and a force related to a physics engine?

What is the difference between an application of an impulse and an application of a force in relation to a physics engine?
2k views

### Vector movement in space type game (Mouse rotation)

I'm having an issue with my movement in my 'game' prototype. It's basically not working and admittedly my knowledge with vectors is lacking. The issue I'm running into is that the ship won't move in ...
753 views

### How to bounce a 2d point particle off of a circular edge

In a prototype I'm building, a particle can spawn anywhere within a larger, confining circle. Important to note is that the particle will not spawn in the origin of the larger circle, but anywhere ...
1k views

### What is wrong with my Dot Product?

I am trying to make a pong game but I wanted to use dot products to do the collisions with the paddles, however whenever I make a dot product objects it never changes much from .9 this is my code to ...
2k views

### How can I convert a 2D bitmap (Used for terrain) to a 2D polygon mesh for collision?

So I'm making an artillery type game, sort of similar to Worms with all the usual stuff like destructible terrain etc... and while I could use per-pixel collision that doesn't give me collision ...
398 views

### How do I interpolate air drag with a variable time step?

So I have a little game which works with small steps, however those steps vary in time, so for example I sometimes have 10 Steps/second and then I have 20 Steps/second. This changes automatically ...
4k views

### What fluid simulation system is used in iPhone games? [closed]

Does anybody know what kind of system developers are using for fluid simulation in iPhone games? It doesn't seem like they're using a Navier-Strokes simulation to me.
1k views

### How do I determine which side of the player has collided with an object?

I have some static bodies (platforms) and a dynamic body (the player) in my world. The collision between them works great, but I would like to know which side of the player (rectangle) collides with ...
306 views

### Building a shape out of two rectangles

I would like to build a body with Farseer out of two rectangles so it looks like this: I am a real beginner, so please describe it carefully. Thanks in advance!
470 views

### Specific Physics Lessons and Reference for Game Development

What "Physics stuffs" should I learn in game developments? I'm reading about Verlet Integration, and I'm wondering what other lesson should I learn and if there are available resources can you please ...
1k views

### How to implement Ragdoll physics to 2D characters in XNA?

I'm starting a new project with XNA. I want to create a game where the main character is subject to ragdoll physics when killed. I was wondering if anyone can give me any tips on how should I ...
414 views

### how to attach a body to a rope and making it swing to another rope [closed]

I've set some ropes (using cocos2d and box2d) and would like to attach a body to one rope in such a way that it can swing to another rope. I am not sure how to go about this. I read making and object ...
431 views

### BOX2D Kinematic Platform with parallax layer

I am using a kinematic body for my moving platform on x-axis, so I set the linear velocity to b2vec2(5,0). When the player jump on the platform, it works like it is suppose to. But the thing is ...
641 views

### Box2D platformer movement. Should i mess with velocity?

I have a platformer game in which I implemented the movement using a wheel attached to the hero. For jumping I use this: player.body.applyLinearImpulse(new Vec2(0, 30000000), ...
2k views

### Box2D platformer movement. Are joints a good idea?

So i smashed my brains trying to make my character move. As i wanted later in the game to add explosions and bullets it wasn't a good idea to mess with the velocity and the forces/impulses didn't work ...
1k views

### JBox2D applyLinearImpulse doesn't work

So i have this line of code: if(input.isKeyDown(Input.KEY_W)&&canJump()) { body.applyLinearImpulse(new Vec2(0, 30), cam.screenToWorld(body.getPosition())); ...
236 views

### Debugging Minimum Translation Vector [closed]

I implemented the minimum translation vector from codezealot's tutorial on SAT (Separating Axis Theorem) but I'm having an issue I can't quite figure out. Here's the example I have: As you can see ...
772 views

### Physics in carrom like game using cocos2d + Box2D

I am working on carrom like game using cocos2d + Box2D. I set world gravity(0,0), want gravity in z-axis. I set following values for coin and striker body: Coin body (circle with radius - ...
2k views

### Car movement in arcade racing game

I am finishing a very basic 2D racing game with top-down perspective. I can't get the appropriate formulas to make the movement of the cars fun and addictive... Do you have tips on how to achieve that ...
196 views

### How to pin a body in case of collision in Box2D or Farseer?

I'm trying to get an understanding for the Box2D/Farseer physics engine by implementing a small air hockey simulation. There, I have the problem that the CPU player attacks the puck, kicks it, but ...
466 views

### Making a multi-pieced rectangular breakable body with Farseer

Using Farseer 3.3.1 I want to create a rectangular BreakableBody with many pieces. Right now here is my code: Vertices polygon = PolygonTools.CreateRectangle( 2.5f , 1.25f ); List<Vertices> ...
2k views

### Farseer Physics collision detection vs intersection detection with sensors

I'm trying to make a game that uses Farseer physics engine as its main collision detection engine. I have a 2d circle body object that has a matching fixture (I used the CreatCircle method. I did not ...
1k views

### Ball Physics for Android Game

I am starting work on a new Android game and I haven't had any experience implementing physics before. I am trying to steer clear of external libraries such as box2d, not just because I think it is ...
2k views

### Making an object swing from one rope to another

I am trying to make a Tarzan like game with Cocos2D and Box2D. I am having issues with the physics - making an object swing from one rope to another. I am not really sure how to do this. Could anyone ...