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

1
vote
1answer
588 views

How to use the chipmunk physics-engine?

I am developing a game demo where I want a physics simulation with balls and obstacles. I know that this is possible with the chipmunk physics-engine but I don't know how to use it. Can anybody give ...
1
vote
2answers
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 ...
6
votes
1answer
244 views

How do I change the speed of an object without changing path travelled?

I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is: x = x0 + vx0*t y = y0 + vy0*t - ...
6
votes
1answer
1k views

How does 2D Game Physics work? [duplicate]

Possible Duplicate: How do I build a 2D physics engine? If we take the game Angry Birds that had big success lately I were thinking how do they implement the physics in a game like that? ...
3
votes
3answers
745 views

2D Ragdoll - should it collide with itself?

I'm working on a ragdoll fighting game as a hobby project, but I have one dilemma. I am not sure if my ragdoll should collide with itself or not, i.e. if ragdoll's body parts should collide. 2D ...
1
vote
1answer
276 views

Determining relative velocities on impact?

I'm trying to figure out a way to determine the relative velocity of a body colliding with another in a 2D environment. For example if one body is moving at (1,0) and another traveling behind it ...
13
votes
3answers
1k 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 ...
1
vote
3answers
2k views

Collision Detection for 2D

I am working on a simple game, where I need to do a collision detection of two Texture2D. The code I have written is: bool perPixelCollission = false; Texture2D texture1 = ...
6
votes
1answer
1k views

What causes Box2D revolute joints to separate?

I have created a rag doll using dynamic bodies (rectangles) and simple revolute joints (with lower and upper angles). When my rag doll hits the ground (which is a static body) the bodies seem to ...
9
votes
1answer
2k views

Who know how to implement the 2D bone animation showed in the game?

I wonder how do they implement the bone animation in the flash game http://www.foddy.net/athletics.swf Do you know any study materials which I can start to learn 2D bone system from? I just ...
9
votes
5answers
2k views

2D platformers: why make the physics dependent on the framerate?

"Super Meat Boy" is a difficult platformer that recently came out for PC, requiring exceptional control and pixel-perfect jumping. The physics code in the game is dependent on the framerate, which is ...
32
votes
6answers
5k 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 ...
15
votes
1answer
7k views

Quad tree vs Grid based collision detection

I'm making a 4 player co-op r-type game, and I'm about to implement the collision detection code. I've read a lot of articles and stuff about how to handle collision detection, but I'm having a hard ...
2
votes
2answers
221 views

I'm trying to learn the “digital physics” required to do a floating network of spheres

If that is even what it is called. What I am trying to do it: http://asterisq.com/products/constellation/roamer/demo Can someone please point me to towards a book or in vaguely the right direction? ...
9
votes
2answers
1k views

How to implement 2d explosions that will cause damage taking into account covers and distance?

How can I implement a 2D explosion in a way that it will cause less damage to characters that hide behind crates or other cover? Ideally damage will depend on the strength of the cover (e.g. metal ...
5
votes
4answers
349 views

How do I model a gooey sprite?

I happened to see this structure of a gooey player character made in flash. Can anybody suggest onto what computer science concept I should use to make a goo make it behave like a goo Thanking ...
2
votes
2answers
4k views

Arc'd jumping method?

Okay, so I'm making a platformer, and I wanna know how I can make a arc'd jump easily. Like what Mario does in super Mario Bros 1. Any ideas on a simple way to accomplish this?
5
votes
1answer
464 views

Strangeness when simulating a chain

I'm using box2d and I simply hook up 10 points each with a similar length constraint to the adjacent point. When I move 1 point, the others follow just like a rope/chain. Just like one would expect. ...
6
votes
2answers
2k views

How can I implement rectangle collision response?

I am working on a game in JavaScript and my current implementation of collision uses the shortest distance to push the intersecting object away, which isn't always correct. I've made this diagram of ...
6
votes
4answers
1k views

Determing an object's position along a curve over time

I have some objects in my game which are "thrown". At the moment I am trying to implement this by having these objects follow a parabolic curve. I know the start point, the end point, the vertex and ...
8
votes
4answers
1k views

Not sure how to handle “deceleration”

I say "deceleration" because I'm not using acceleration at the moment (it is being calculated, it's just set to 0 0); what I mean is moving the velocity back towards zero, eventually stopping. I'm ...
16
votes
6answers
9k 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 ...
4
votes
2answers
1k views

How to create simple physics for a group of balloons colliding in the screen (2D)

The game is 2D, how can I make simple physics for a group of balloons colliding in the screen. What I need is the balloons not to overlap and to bounce when they reach the limits of the screen or ...
3
votes
2answers
296 views

Good ways to edit arbitrary collision shapes for 2D physics engine?

Assume you have several 1024x1024 textures which contain an arbitrarily shaped and relatively complex cave system whose walls need to have collision polygons defined. The polygons need to be convex to ...
14
votes
3answers
3k views

How do I handle moving platforms in a platform game?

I don't want to use box2d or anything, I just want simple moving platforms (up-down, left-right, diagonal and circular paths). My question is to handle the update order / control hierarchy so that the ...
4
votes
2answers
946 views

A good place to learn about Game Programming with Mathematical Vectors?

I am looking for a place in the web where I can turn my current game development process into a vector based approach. I am sorry If this question has been asked once. According to my google search ...
5
votes
4answers
6k views

2D AABB collision response

I'm making a simple platformer, and I wanted simple collision handling. So I gave all my objects an AABB hitbox and tried to resolve collisions. However, I can't get it to work. My main character has ...
8
votes
1answer
428 views

How can I copy or back-calculate definitions for an entire b2World?

I'm working on a platformer where I'd like to be able to move or copy bodies between multiple Box2D b2Worlds. The desire has cropped up three times now - moving objects between documents in my editor, ...
7
votes
2answers
2k views

Box 2D Set Origin

I'm trying to set the origin of a box2d shape. By default, a shape rotates around the center. But I'm trying to get it to rotate around the left of the shape. Like a clock for example. I've heard of ...
5
votes
3answers
2k views

Implementing a 2D Platformer Game Engine

Any ideas where I can find info about making 2D jump & run games? I need some general ideas, so I wouldn't reinvent wheel (at least where game design is concerned). Another point is that I am ...
4
votes
1answer
351 views

How to take into consideration the effect of initial rotation of a ball hitting & reflecting off a surface

Hey all, I am trying to take into consideration the effect of inertia of the initial rotation of a ball, hitting a surface, into the exit velocity vector of the ball. My current theory is this: ...
4
votes
1answer
794 views

Problem with box2d at beggining

I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that at end , ...
62
votes
5answers
25k views

Good 2D Platformer Physics [closed]

I have a basic character controller set up for a 2D platformer with Box2D, and I'm starting to tweak it to try to make it feel good. Physics engines have a lot of knobs to tweak, and it's not clear to ...
1
vote
5answers
9k views

which is the best physics engine for flash as3? [closed]

i am a game programmer and i use actionscript to do all my collision checking, boundary checking etc...but recently i noticed there are things called "physics engines" that help me concentrate more on ...
12
votes
4answers
2k views

How do I calculate rotation caused by bounce friction?

Following on from my previous question: I have the ball quite realistically bouncing from surfaces it hits. Now I'd like to make it spin from the friction of the hit. Showing this is simple enough: I ...
6
votes
2answers
2k views

How to calculate the exit speed of ball bouncing off a solid surface

Hey all, I am working on a simple game to include some rigid body dynamics, involving placing (moving & rotating) some springs to bounce a falling ball into a target area. My problem is correctly ...
2
votes
4answers
912 views

Good way to implement really basic physics in Flash?

I'm making a somewhat simple side-scroller in Flash. The way I'm currently doing the really basic physics(you don't fall through floors/can't walk through walls) is that I have a big symbol of all the ...
11
votes
4answers
4k views

Vehicle physics with skid

How would I go about creating vehicle physics for a car that can loose traction? I want it to seem like the driver has a flat foot, so when you press the gas, they cars driving (rear) wheels loose ...
7
votes
2answers
6k views

Using The Box2D Polygon “Set()” function?

I'm using the Box2D physics engine. And there's a type of shape for box2D called b2PolygonShape. In this class, you can create polygons. There is also a Set() function that takes an array of points ...
6
votes
3answers
4k views

Box2D Check If Point Intersects a Body

Is there a way to check if a point is intersecting a body? For example, lets say there's a body in the world at a position of (100,100). Is there a way to check if a point at (100,100) intersects ...
9
votes
3answers
4k views

Box2D Get Bounding Box of a Body

In Box2D, I was curious if it's possible to get a bounding box of a body already created in the world. So basically, the Body is created, it's interacting with the world and such. And I needed that ...
8
votes
3answers
993 views

Forces on a wire in a 2D environment? (Physics)

Assume I have a physics primitive I am going to call a "wire" wrapped around a 2D environment (as described in this question). Here's an illustration of what that might look like: In the example ...
26
votes
6answers
4k 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. ...