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.

learn more… | top users | synonyms

0
votes
2answers
240 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 ...
4
votes
2answers
382 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. ...
2
votes
2answers
430 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 ...
4
votes
1answer
1k 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 ...
5
votes
1answer
417 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 ...
1
vote
1answer
560 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
334 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 ...
1
vote
1answer
187 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 ...
2
votes
1answer
865 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 ...
1
vote
2answers
132 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 ...
3
votes
3answers
247 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 ...
5
votes
2answers
465 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 ...
2
votes
1answer
417 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 ...
1
vote
1answer
279 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 ...
8
votes
1answer
1k 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?
1
vote
1answer
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 ...
3
votes
1answer
576 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 ...
1
vote
1answer
764 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 ...
4
votes
1answer
1k 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 ...
1
vote
2answers
345 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 ...
0
votes
2answers
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.
4
votes
3answers
3k views

How can I make my main character move in a parabolic arc when jumping?

I'm entering Android game development, and I already have a computer version of a game I want to publish. The thing is, I want to make this as good as it can be. With that said, I need a physics ...
1
vote
2answers
978 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 ...
1
vote
2answers
291 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!
0
votes
1answer
441 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 ...
2
votes
1answer
956 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 ...
2
votes
0answers
362 views

how to attach a body to a rope and making it swing to another rope

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 ...
0
votes
1answer
420 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 ...
1
vote
1answer
594 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), ...
4
votes
1answer
1k 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 ...
1
vote
1answer
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())); ...
1
vote
0answers
222 views

Debugging Minimum Translation Vector

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 ...
2
votes
2answers
681 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 - ...
2
votes
3answers
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 ...
1
vote
1answer
180 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 ...
4
votes
1answer
446 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> ...
2
votes
1answer
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 ...
-1
votes
1answer
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 ...
1
vote
1answer
1k 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 ...
-2
votes
1answer
554 views

Using Vectors for 2d animation [closed]

I've decided that it's best to start using vectors in my games instead of the xPos += xSpeed and yPos += ySpeed approach. I'm posting some of the code from my basic model class which handles movement ...
3
votes
1answer
825 views

How to simulate backspin or topspin in a box2d billiard game?

I am designing a simple billiard game with box2d. I think I can easily simulate hitting left or right side of a ball. Since box2d is not 3D, however, I am not sure how to simulate hitting upper or ...
10
votes
4answers
2k views

How to build a bones animation engine?

I want to develop a flash game. It would draw a stick man, and edit his pose. I think what I need to learn are bones animation and physics engine. Can anyone introduce some good resources to learn ...
10
votes
4answers
804 views

Player moving up, is he jumping or climbing?

In a 2D physics-based platformer game that has ladders in it, how do you determine whether the player moving up is caused by a jump or him climbing a ladder, such that you know what animation to play? ...
3
votes
4answers
481 views

When connecting a physics engine to another engine, should you do all your logic in the units used by the physics side or the rendering side

I'm currently intergrating pygame and pyBox2D, and am wondering which side is best to try to keep to in terms of game units of size. Box2D is Meters PyGame is Pixels At the moment I am thinking I ...
2
votes
1answer
1k views

How to resolve concurrent ramp collisions in 2d platformer?

A bit about the physics engine: Bodies are all rectangles. Bodies are sorted at the beginning of every update loop based on the body-in-motion's horizontal and vertical velocity (to avoid sticky ...
0
votes
2answers
535 views

Ways to define a curve

I'm trying to give shapes in my physics engine roundness/ curvature. I am aware of various methods for mathematically defining curves; such as bezier-cruves, ellipses, etc. However I am not sure ...
2
votes
2answers
927 views

Canvas Rotation collision detection on a sprite

I am using this code to detect collisions between two rectangular sprites. intersect: function(other) { return this.x < other.x + other.width && other.x < this.x + this.width ...
6
votes
3answers
2k views

Is there a good existing starting point for realistic 2d racing car physics?

I'm trying to get a realistic behaving racing car into my 2d top-down game. Making a very simple car that drives around is straight forward but I want a reasonably sophisticated model that models ...
2
votes
2answers
998 views

2D physics engine for WP7?

I'm looking for a 2D physics engine for Windows Phone 7. Is there a port of something existing for use?
2
votes
3answers
2k views

How do I change my gravity and jumping logic to put the character at a specific height at a specific point in time?

I'm making a 2D platformer on Android using libGDX. One thing I've had a problem with recently is gravity and jumping. I found a few tutorials on the internet and was able to come up with this... ...