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

learn more… | top users | synonyms

10
votes
3answers
733 views

Random map generation - strategies for scattering/clustering random nodes

I am doing a simple 4X strategy game in space where each node is a point-of-interest (a planet, an asteroid and etc.). To randomly generate a map, I would follow the steps below Decide how many ...
10
votes
3answers
445 views

How to implement collision detection of portals?

For example, take this scenario (excuse my horrible drawing skills): This is based on "Portal", where the stickman is going through the blue portal (which is linked to the red portal), but there is ...
10
votes
3answers
6k views

Is there an algorithm for a pool game?

I am looking for algorithm to calculate direction and speed of balls in a pool game. I am sure there has to be some type of open source code for this since pool games are some of the oldest computer ...
10
votes
1answer
671 views

How does pixeljunk shooter simulate its liquids?

I am really impressed by the liquids in pixeljunk shooter. I would love to know how they do it.
10
votes
4answers
3k 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 ...
10
votes
1answer
2k views

Angle of Reflection

I have this "Breakeout style" game. I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like: I've managed to get the collision per ...
10
votes
3answers
407 views

How to simulate pressure with particles?

I'm trying to simulate pressure with a collection of spherical particles in a Unity game I'm building. A couple notes about the problem: The goal is to fill a constantly changing 2d space/void with ...
10
votes
2answers
1k views

Continuous Physics Engine's Collision Detection Techniques

I'm working on a purely continuous physics engine, and I need to choose algorithms for broad and narrow phase collision detection. "Purely continuous" means I never do intersection tests, but instead ...
9
votes
3answers
2k views

How to calculate falling and accelerating velocity?

I'm thinking of making a lander game, where you control a spaceship and need to land it without crashing. What is a simple formula to calculate speed of falling or acceleration with relation to ...
9
votes
4answers
1k views

When should I use a physics engine?

Since I found out Box2D, I'm using it for kind of any game-like application I try to write, from very small prototypes or small programs to test something, to actual projects. Thanks to it it's so ...
9
votes
1answer
359 views

Getting a 2D “pixel” cloud to follow a mouse

I'm working on a 2D game trying to get a "cloud" of a few hundred tiny cubes or discs to follow my mouse cursor without overlapping each other. However, using the physics engine introduces ...
9
votes
4answers
586 views

Run a physics simulation on both client and server?

I'm implementing a multiplayer asteroids clone to learn about client/server network architecture in games. I have spent time reading GafferOnGames and Valve's publications on their client/server ...
9
votes
3answers
498 views

Impulsioned jumping

There's one thing that has been puzzling me, and that is how to implement a 'faux-impulsed' jump in a platformer. If you don't know what I'm talking about, then think of the jumps of Mario, Kirby, and ...
9
votes
4answers
4k views

2D Spatial partitioning alternatives to spatial hashes and quadtrees

I've been trying to implement a spatial partitioning algorithm in my game, but both spatial hashes and quadtrees aren't what I'm looking for. My level size is not supposed to have a limit (only Int32 ...
9
votes
1answer
1k views

Adding air drag to a golf ball trajectory equation

I'm developing a 2D golf game in VB.NET 2005, but I am stuck on how to implement air or wind drag that should affect the ball. Already I have these equations for projectile: Vo ...
9
votes
2answers
940 views

Simulating an object floating on water

I'm working on a top down fishing game. I want to implement some physics and collision detection regarding the boat moving around the lake. I would like for be able to implement thrust from either the ...
9
votes
1answer
349 views

Deforming surfaces

I try to accomplish an deforming physic behaviour for levelsurfaces, but don't get an idea how to start with the implemenation so far. Regardless of the shape from the surface (planes, cubes, ...
9
votes
1answer
2k views

Separating physics and game logic from UI code

I'm working on a simple block-based puzzle game. The game play consists pretty much of moving blocks around in the game area, so it's a trivial physics simulation. My implementation, however, is in ...
9
votes
1answer
164 views

What would be a good filter to create 'magnetic deformers' from a depth map?

In my project, I am creating a system for deforming a highly detailed mesh (clothing) so that it 'fits' a convex mesh. To do this I use depth maps of the item and the 'hull' to determine at what point ...
8
votes
6answers
616 views

Ragdoll on alive creatures: has somebody already implemented it?

I find that a dead creature falling realistically is boring. I wonder, has any game implemented an animation system where the model moves depending of the muscle forces and the velocity of the limbs, ...
8
votes
4answers
903 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 ...
8
votes
1answer
732 views

OpenGL vs physics?

I am very new to game programming and I am in my first project. I have come to a point that I need expert advice: Now for the game physics to be able to work on objects, it needs to know each ...
8
votes
5answers
4k views

2D rectangular object collision - Detect direction

Coming form this question, I'm needing some more help. I need some ideas to find out from which side the collision came, and react accordingly. Use this image as reference: The blue lines are the ...
8
votes
3answers
806 views

Are collision detection always O(n^2)?

Are physics engine able to decrease that complexity, for example by grouping objects who are near each other and check for collisions inside this group instead of against all objects ? (for example, ...
8
votes
1answer
562 views

Projected trajectory of a vehicle?

In the game I am developing, I have to calculate if my vehicle (1) which in the example is travelling north with a speed V, can reach its target (2). The example depict the problem from atop: There ...
8
votes
1answer
3k views

How to handle physics of moving platforms in a platformer?

So after a few hours of searching on the internet, I have yet to find a pleasing answer on how to handle moving platforms in a 2d platform game. So I decided to make a simple prototype where you ...
8
votes
3answers
897 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 ...
8
votes
1answer
989 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?
8
votes
2answers
1k views

Physics for a 2.5D platformer with a plane that curves

I'm creating a 2.5D platformer in XNA which uses 3D models that are constrained to travelling along a 2D plane (just like Trine). To make things tricker, however, I want the 2D plane itself to be ...
8
votes
3answers
1k views

Calculation of Inertia Tensors

Bit of a complex and lengthy question that, I'll admit, I don't quite understand very well yet so I will try and explain as best as I can. Short Version: Is there a general c++/physx formula out ...
8
votes
1answer
631 views

Are there well-known algorithms for fitting a polygon to an arbitrary shape?

I'm using the Chipmunk physics engine to make the levels for a 2D C game. I'd like to be able to fit a polygon to an arbitrary shape to serve as the collision mask. Given a black and white collision ...
8
votes
2answers
937 views

What is the best way to handle simultaneous collisions in a physics engine?

I'm writing a 2d physics engine in javascript so that I can learn more about physics in video games. I have it working correctly for rigid body collisions, except for if any body collides with two or ...
8
votes
3answers
447 views

Can I jump from A to B?

I'm making some rudimentary AI for my side-scroller and I need to know whether an AI unit can reach point B from point A simply by taking a jump. Flight trajectory of my characters is a bit unusal as ...
8
votes
2answers
368 views

Drone targeting

Imagine a "drone" and a target point on a 2d plane. There are eight parameters: P = my position Q = target position V = my velocity I = my moment of inertia w = my angular velocity s = my angular ...
8
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 ...
8
votes
1answer
256 views

How do I fix objects “popping” or jittering in physics engine?

I've got a simple physics engine that solves collisions by simply correcting the position of overlapping bodies (just circles for now) directly, as opposed to just changing the velocity or applying an ...
8
votes
1answer
1k views

Realistic slow-falling snow algorithm?

Is there a good algorithm that simulates falling snow? I'm particularly interested in snow that falls slowly, so it doesn't quite fall in a straight line but deviates a bit. Maybe even including ...
8
votes
3answers
2k views

How do you do AI path following within a 2d physics engine like farseer/box2d?

I'm in the process of moving a 2d top down game I've been working on into a proper rigid body physics engine like Farseer. Up until now, I had just hacked together my own physics code where needed. ...
8
votes
1answer
1k views

What are the common character animation techniques used in tile based hack&slash games?

I wonder what kind of animation techniques are used for creature and character animation in modern hack&slash type tile based games? Keyframing for different actions may be one option. Skeletal ...
8
votes
1answer
275 views

Calculate bike heading from front wheel heading and velocity

I have a simple top down bike game that I'm trying to add steering to. I would like to know how I use the heading of the front wheel to determine the heading and velocity of the bike. void Update () ...
8
votes
3answers
2k views

Web workers for HTML5 game physics simulation?

A bit related to this question. The idea is to guarantee the same physics behavior as much as possible. Would it be possible to run fixed time step physics on a web worker? The UI would update ...
8
votes
3answers
295 views

Make fast thing look slow (Box2D)

I'm working on a game that you control a trebuchet to throw balls to the opponent. It's like a game called 'Medieval Siege'. When the trebuchet is swinging its arm, player need to seize the best ...
8
votes
2answers
1k views

Physics engine that can handle multiple attractors?

I'm putting together a game that will be played mostly with three dimensional gravity. By that I mean multiple planets/stars/moons behaving realistically, and path plotting and path prediction in the ...
8
votes
3answers
311 views

Connecting physics simulations with different coordinate-systems

I want objects to move between two physics simulations through a "window" and collide with those from both simulations in case they intersect the window plane. The coordinate systems of the ...
7
votes
6answers
614 views

Physics library internals

I've seen box2d and bullet ports into javascript, but neither of them attracted me particularly, except by source code. It all seemed, after all, quite simple once I looked inside them. But what are ...
7
votes
4answers
884 views

Making a Box2D ball bounce to constant height

I want to create a game like Doodle Jump. I'm using libgdx and Box2d. I needadvice on how to make my ball bounce constantly and with the same height. I've tried setting the ball's body restitution ...
7
votes
2answers
4k views

Typical Maximum steering angle of a real car

I'm building a car sim in Unity3D. I'm trying to set the properties of the car to be as realistic as possible. I can't seem to get a straight answer on Google so I thought of asking here. What is the ...
7
votes
2answers
1k views

How can I factor momentum into my space sim?

I am trying my hand at creating a simple 2d physics engine right now, and I'm running into some problems figuring out how to incorporate momentum into movement of a spaceship. If I am moving in a ...
7
votes
1answer
848 views

A simple flight simulator

In a 3D flight simulator with a Crimson Skies level of realism (as in, arcade level rather than realistic), how do you determine the movement of an aircraft each game clock tick? (Crimson Skies is an ...
7
votes
4answers
586 views

How do I make a vehicle move to a point and stop without overshooting or oscillating?

Ok so consider we have a vehicle like the one I described in my answer to this question, with a 2D position, velocity, angular velocity, and drag/friction. It can accelerate and break by a variable ...