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

7
votes
1answer
451 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
3answers
247 views

How to take into consideration gravity when moving AI

I'm making a 2D game. There is currently a helicopter flying around, controlled by the player. It's controlled using the arrow keys: UP, LEFT and RIGHT. It's speed along the y axis is dy, and speed ...
7
votes
1answer
281 views

Multiplayer platformer - Are server corrections normally required with a single client on the server?

I am currently working on a rather simple multiplayer platformer. I read quite a bit of articles on the techniques used to hide latency, but I still fail to get my head around certain of the concepts. ...
7
votes
3answers
1k 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
4answers
12k views

2D character controller in unity (trying to get old-school platformers back)

This days I'm trying to create a 2D character controller with unity (using phisics). I'm fairly new to physic engines and it is really hard to get the control feel I'm looking for. I would be really ...
7
votes
1answer
277 views

RK4, Derivatives, Understanding Game Physics

Gafferon Games has a great article on RK4 Integration for building physics simulations which can be found here: Integration Basics Personally my mathematics and physics knowledge could use ...
7
votes
3answers
2k views

Finding the contact point with SAT

The Separating Axis Theorem (SAT) makes it simple to determine the Minimum Translation Vector, i.e., the shortest vector that can separate two colliding objects. However, what I need is the vector ...
7
votes
2answers
320 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
1answer
208 views

Determining whether two fast moving objects should be submitted for a collision check

I have a basic 2D physics engine running. It's pretty much a particle engine, just uses basic shapes like AABBs and circles, so no rotation is possible. I have CCD implemented that can give accurate ...
7
votes
2answers
1k 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
2answers
328 views

How to implement a tractor beam?

I'm working on a game where the player can pick up objects using something like a tractor beam, and carry them around. Attracting the object towards the center of the beam is not difficult. But once ...
7
votes
1answer
261 views

How do engines avoid “Phase Lock” (multiple objects in same location) in a Physics Engine?

Let me explain Phase Lock first: When two objects of non zero mass occupy the same space but have zero energy (no velocity). Do they bump forever with zero velocity resolution vectors or do they ...
7
votes
2answers
468 views

multiplayer networking with physics

I'm curious how multiplayer networking with physics is implemented in racing games. We have a physical world with multiple fast-moving vehicles controlled by different people. Let's say that vehicles ...
6
votes
5answers
713 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
2answers
3k views

Is it worth it to use Bullet for 2D physics instead of Box2D for the sake of learning Bullet?

There isn't much more to the question. I'm not concerned about overhead, as I'm sure they are both fine for my purposes. Basically, I am familiar with Box2D concepts because of the Farseer Physics ...
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
3answers
331 views

How can I change the acceleration of an object to arrive at a particular time?

I'm trying to write some code to change an acceleration factor so a ball will arrive at a destination in a desired time. The problem is I don't know time (t) but I do know I want it to arrive at (t - ...
6
votes
3answers
548 views

How do I make a moving object stop smoothly at the end of a path?

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
1answer
536 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
1answer
536 views

How to do collision detection for fluids in 3D? [closed]

Is there an algorithm or a technique which can detect the collision between 3D fluids? I currently treat my fluids as dynamic meshes. Is it possible to find collisions with these, or will I need a ...
6
votes
4answers
497 views

Sharing data between graphics and physics engine in the game?

I'm writing the game engine that consists of few modules. Two of them are the graphics engine and the physics engine. I wonder if it's a good solution to share data between them? Two ways (sharing ...
6
votes
2answers
262 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 ...
6
votes
2answers
3k views

how to ignore physics collision of some objects in box2d

I know this sounds silly but I would like some objects to follow physics while others not to collide each other. I tried to achieve them by setting their position exclusively. But then it will ...
6
votes
1answer
1k views

Character bouncing off ground due to gravity

Implementing gravity in the game, the character keeps bouncing up and down slightly when he hits the ground, upon debugging the character is essentially bouncing on and off the ground. Not quite sure ...
6
votes
2answers
418 views

Is it possible to have concurrent collision detection where every entity acts at exactly the same time?

There are many algorithms that can be used for collision detection. In many cases we check for an overlap in coordinates of an entity. If we make a triangle a,b and c. We have 2 entities at a and b ...
6
votes
2answers
2k views

Get collision details from Rectangle.Intersects()

I have a Breakout game in which, at some point, I detect the collision between the ball and the paddle with something like this: // Ball class rectangle.Intersects(paddle.Rectangle); Is there any ...
6
votes
2answers
543 views

Show path of a body of where it should go after linear impulse is applied

I am making a game with Andengine and Box2D. I have a dynamic body and I apply linear impulse on the body to move it around when the user have touched the screen. Now I want to show the path where ...
6
votes
2answers
348 views

Elliptical orbit modeling

I'm playing with orbits in a simple 2-d game where a ship flies around in space and is attracted to massive things. The ship's velocity is stored in a vector and acceleration is applied to it every ...
6
votes
4answers
951 views

Server-side physic simulations with hundreds of players

I’m currently working on a singleplayer physics-orientated game where I would like the physics to be simulated server-side. This because the game will have leadersboards, persistant player ...
6
votes
1answer
235 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? ...
6
votes
1answer
240 views

How can I derive force vectors from velocity vectors?

I'm making a 2d shooter ala Geometry Wars. I've got my own simple physics at work driving the background grid and all my entities. To move anything in the world I apply a Vector2d force to it. The ...
6
votes
2answers
487 views

Collision Detection/Response in Vector-based levels

I have a 2D side scroller whose levels are stored as vectors (that is, a bunch of lines) which looks like this: How would I detect that I'm colliding with one of these lines, and react accordingly ...
6
votes
3answers
327 views

Calculating impulse propagation through a rigid body after a collision

I'm working on a game. I need to work out what the impulse is at different points on a body as a result of a collision. For example, in the following diagram, if there is a collision that results in ...
6
votes
2answers
1k views

How to implement friction in a physics engine based on “Advanced Character Physics”

I have implemented a physics engine based on the concepts in the classic text Advanced Character Physics by Thomas Jakobsen. Friction is only discussed very briefly in the article and Jakobsen himself ...
6
votes
1answer
628 views

What are some good methods of implementing RTS-style Box selection?

i'm just scouting around for different methods of implementing a typical rts box selection (not the 2D box on the screen, but what units are selected with the box) when selecting units, and would ...
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 ...
6
votes
1answer
743 views

Bringing a Box2D, Physics Enabled game Online?

Lets say, to simplify the problem of online games a bit, my goal would be to run a near identical simulation on multiple computers in sync. Would sending commands be a good idea? Now if only sending ...
6
votes
1answer
240 views

Changing orientation by applying torques

Suppose you've got an object floating freely in space. You have a vector you want this object to point towards, and a vector representing the direction it's currently facing. From these two, you can ...
6
votes
3answers
511 views

Need physics algorithm for modeling ceiling collapse in voxel-based game

I'm looking for algorithms on how to model the physics of cave-ins/collapses for a game idea I am working on. The game allows the player to extensively mine 3D voxel-based asteroids, and I want areas ...
6
votes
2answers
503 views

“Super meatboy”-ish replay

I'm making a platformer built from mini-levels - and I want to create a sort of a replay of all the player tries that the player did for the level. My question is - what is the best way to record the ...
6
votes
2answers
1k 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
1answer
228 views

Looking for very simple implicit integration example

I am trying to design a robust cloth system. I have no problem at all simulating things like that using forward integration such as euler, midpoint, runge-kutta, verlet, etc. However, I just can't ...
6
votes
1answer
177 views

Timestep schemes for physics simulations

The operations used for stepping a physics simulation are most commonly: Integrate velocity and position Collision detection and resolution Contact resolution (in advanced cases) A while ago I ...
6
votes
1answer
388 views

Weird problem with advect program in fluid simulator

I implemented 2d fluid simulator. Solver runs entirely on GPU. All works fine... on my work PC. But on home PC I have some awful glitches, and I can`t understand how to fix them. Empirically I ...
5
votes
5answers
897 views

Are game programmers aware of all the physics derivatives?

I am trying to study XNA for game programming. XNA has many methods that can simplify developer's life, such as reflecting the vector when it hits a solid plane. I know these are good and developers ...
5
votes
3answers
546 views

3D game on a planet

Would it be much more work to create a 3D game on a planet rather than on a flat plane? What engines would support this and what techniques would I use? An example would be a small sphere the player ...
5
votes
5answers
831 views

How do I implement deceleration for the player character?

Using delta time with addition and subtraction is easy. player.speed += 100 * dt However, multiplication and division complicate things a bit. For example, let's say I want the player to double his ...
5
votes
3answers
2k views

Determine Resulting Angle of Wall Collision

So I have an object moving in a direction towards a fixed horizontal or vertical wall. How do I compute the angle that the object should bounce off at? The object can approach the wall at an arbitrary ...