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

4
votes
1answer
401 views

How to balance a ball on a rotating plane?

I'm doing some research and I really don't want a physics engine when a simple mechanism will do. I have a ball that will be balanced on a plane. The ball will always be "stuck" to the plane and ...
2
votes
3answers
2k views

2d Collision detecton axis aligned boxes

I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find ...
1
vote
1answer
248 views

Mouse joint isn't restricting the ball from going to the other part of the screen

I'm developing a application in cocos2d using the Box2D framework, but unfortunately I am having issues. I'm not able to restrict the orange ball in the half screen area, taking the image below as ...
0
votes
2answers
243 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 ...
8
votes
1answer
3k views

Basic Box2D collision detection

I don't understand how to listen for collisions in Cocos2D/Box2D. Say I have two dynamic circle bodies. One is very small and the other is relatively large. When the small circle collides w/ the ...
7
votes
1answer
563 views

Finding the point of collision

I'm writing a 2D rigid body simulator. The objects being simulated are convex polygons. My question involves how to decide on the "point" of collision, so that when I apply a response force, I can ...
3
votes
2answers
1k views

When and how should I apply forces in a Cocos2D + Box2D game?

I have some small circles just rolling across the bottom of the screen in my Cocos2D/Box2D iOS app. The bodies are dynamic... so I make them roll by applying a horizontal force to the center of mass ...
3
votes
2answers
1k views

Why are my objects becoming permanently stuck to walls using Box2D?

I setup a simple simulation environment something like billiards. There are four circle balls (dynamic) and four box walls (static). Simulation works... except one thing. Sometimes when a ball rest ...
4
votes
1answer
238 views

Box2D stable range and position

Box2D marks stable range of object size is 0.1M ~ 10M. This specifies object size range. How about space size? If I make an 1M object at (1000.0f,1000.0f) position? Is it can be stable? Or should I ...
6
votes
1answer
629 views

Pseudo-magnet implementation with chipmunk

How should I go about implementing "natural" magnet on a certain body in chipmunk space? Context is of simple bodies lying in the space (think chessboard). When one of the figures is activated as a ...
4
votes
1answer
372 views

Good book or tutorial for learning how to apply integration methods

I'm looking to animate a graph layout using edges as springs and nodes as weights (a node with more links will have a bigger weight). I'm not capable of wrapping my head around the usage of ...
1
vote
0answers
537 views

Cocos2d and Body with few collision shapes using chipmunk

I'm using Cocos2d (0.99.5) with chipmunk physics engine. Currently I'm trying to place a body into space which is combined from few circle shapes. Let's say I have a corresponding sprite image with ...
2
votes
2answers
1k views

Find meeting point of 2 objects in 2D, knowing (constant) speed and slope

I have a gun which fires a projectile that has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot, so that the projectile hits the enemy ...
3
votes
3answers
331 views

Adding 'swerve' to a direction

I'm not much of a maths expert, so this is probably quite straight forward. I was playing a soccer flash game where you take free kicks. You provide Power, Swerve and Direction. I'm reading up on ...
10
votes
4answers
3k 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 ...
2
votes
2answers
1k views

Using box2d DrawDebugData with multi layer scene?

In my Game, a Scene is composed by several layers. Each layer has different camera transformations. This way I can have a layer at z=3 (GUI), z=2 (Monsters), z=1 (scrolling background), and this 3 ...
1
vote
1answer
204 views

2D Game Physics: How to evaluate when an accelerating ray is close to a point?

Given a ray in a 2D world at position p with initial velocity u and acceleration a how can I tell when it's within a certain distance r from a certain point.
1
vote
1answer
590 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
246 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
757 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
277 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
350 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
299 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
979 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
430 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
355 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
800 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 , ...
63
votes
5answers
26k 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 ...