Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.
9
votes
1answer
1k 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 ...
9
votes
1answer
953 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
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 ...
9
votes
3answers
1k views
How to calculate the rotation resulting from ball bounce
Hey all, still working to incorporate more physics simulation into my game (mentioned HERE). Now having the ball successfully and quite realistically bouncing a surface it hits, I wanted to make the ...
9
votes
3answers
340 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 ...
9
votes
2answers
759 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
250 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
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
1answer
1k 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
157 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
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 ...
8
votes
6answers
572 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
1answer
664 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
1answer
2k 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
2answers
2k views
Why use Runge Kutta Integration over Improved Euler Integration?
I was reading these slides (very good by the way!), and if you skip all the way to the end the author compares all the different integrators presented.
In one way or another, they all fall short ...
8
votes
3answers
695 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
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
1answer
571 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
1answer
427 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
297 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
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
203 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
302 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
4answers
647 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 ...
7
votes
6answers
595 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
5answers
3k 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 ...
7
votes
2answers
704 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
1answer
343 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 ...
7
votes
3answers
820 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
4answers
519 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 ...
7
votes
3answers
276 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 ...
7
votes
1answer
304 views
Differential programming for a vehicle
I am to a point on my vehicle where, when im going fast and turning, the vehicle acts weird because the inside tires are moving faster than the outside tires. So i need to figure out how to program in ...
7
votes
4answers
273 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 ...
7
votes
2answers
650 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 ...
7
votes
3answers
2k 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 ...
7
votes
3answers
751 views
Physics not synchronizing correctly over the network when using Bullet
I'm trying to implement a client/server physics system using Bullet however I'm having problems getting things to sync up.
I've implemented a custom motion state which reads and writes the transform ...
7
votes
2answers
546 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 ...
7
votes
3answers
930 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 ...
7
votes
2answers
222 views
How does braking assist of car racing games work?
There are a lot of PC car racing games around which have this unique driving assist which helps brake your car so that you can safely turn it. While in some games it just an 'assist', it will just ...
7
votes
2answers
874 views
How to resolve penetration of two colliding bodies
I've implemented simple 3D game physics engine. I already have decent collision detection in place, now I'm trying to figure out the collision response part. I'm using impulse based method to ...
7
votes
1answer
186 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 ...
7
votes
2answers
780 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 ...
6
votes
5answers
616 views
Is it possible to have vehicles with physics like GTA in an MMO game?
I haven't seen any MMO games with vehicles with realistic physics and that could achieve high speed, why? Is it because of network bandwidth limitations?
Second Life has vehicles, but physics are ...
6
votes
5answers
1k views
Why do objects interpenetrate in this simple collision solver?
The code below is from a Microsoft XNA sample here.
This is quite a simple rigid body simulation that ignores many physical effects (such as angular momentum), but it does try to push objects ...
6
votes
1answer
236 views
How do I detect ledges?
In my game, I'd like my character to be able to grab and hold onto ledges, and to be able to pull themselves up if there's room to do so.
How do I detect if there's a ledge, and if the character has ...
6
votes
3answers
358 views
Smooth waypoint traversing
There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand.
So I'm creating a floating platform that I would like to be able ...
6
votes
2answers
250 views
Self-righting agents that have fallen over
I need insect-like agents that have fallen/rolled on their back/side to naturally re-orient themselves. The agents are modeled as simple cuboids in the physics engine (Bullet) to approximate an ...
6
votes
2answers
1k 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 ...
