Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.
4
votes
1answer
153 views
What is the appropriate way to implement collision in 2D worlds?
If I want to create a 2D game map which features areas traversable by a player through standard up/down/left/right inputs, and then have areas that are NOT traversable... perhaps just a bush, or a ...
2
votes
1answer
206 views
How to make a character in a Box2D world jump faster?
I have a question about using Box2D to simulate a physics-platformer.
I manage to make the character move to the right and left, and jumping as well. However, jumping seems extremely slow when ...
1
vote
1answer
73 views
Looking for a peer reviewed article that details the benefits of a physics simulation within interactive media [closed]
I'm hoping this is the correct place to ask this question as it is video game related and can be seen as a key ingredient in modern game development.
Does anyone know of a peer reviewed article that ...
1
vote
0answers
159 views
Friction due to gravity in an impulse based physics engine
In my physics engine, i'm using impulses to solve collisions. I'm basing all calculations on these equations:
impulse = desired_velocity_change * mass
impulse = force * time
friction_force <= ...
1
vote
1answer
164 views
XNA (BEPU) Physics Performance
Im using XNA 4.0 with the BEPU physics engine v1.2 and I have encountered some performance problems on Xbox. Im not sure if the my mesurements are an expected result of the Xbox (with alot of dynamic ...
2
votes
3answers
257 views
Integrating Scene Graphs and Physics Engines
For some specific reasons, i will have to use a graphic engine based on Scene Graphics with a Physic Engine without this concept.
I was thinking about a clear way to integrate both representation but ...
5
votes
3answers
310 views
How is 'mass' handled in video games?
Mass is one of the basic scalar quantities, which is required in most rigid body physics calculations.
Does every, EVERY, object which moves in a game get mass defined in the code, or is it allotted ...
4
votes
1answer
254 views
Splitting logic into threads in Java tower defence game
I'm making a tower defence game in Java!
It's my first game development.
I want to know how many threads Do I need to create in a game, to split logic..
I've made this one:
Main App thread (adds ...
2
votes
1answer
166 views
RK4 integration and Continuous Collision Detection
I'm using this method to detect collision between two AABBs. The algorithm is simple, fast and works great. It uses the relative velocity between the two objects to calculate TOI. This works fine with ...
0
votes
2answers
188 views
Drag and Drop in Construct2
I am new to game development just now begin to make some games with Construct-2. And I tried to make drag and drop function like Plant vs Zombies, Empire vs orcs....
Here is my sample file.
If I ...
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 () ...
5
votes
1answer
132 views
Physics/Logic behind self-bounce
I have a game that I am currently working on and I have a problem.
What would a ball look like when it makes itself bounce. Say, for example that the ball had its own "inner power", was made out of ...
1
vote
1answer
84 views
Progressively loading the racing arena in a 3D driving sim
I need advice and resources on a 3D car simulator.
I want to progressively load the track for the player as I'm thinking of porting the game to mobile devices.
This seems too difficult to me as I'm ...
0
votes
0answers
190 views
Unity3d Gravity script issues
I'm try this script out
http://wiki.unity3d.com/index.php/Gravity
and I'm having some issues with it (it seemed to work when I tried it with an old version of unity)
the first issue is of ...
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 ...
6
votes
1answer
164 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 ...
2
votes
1answer
118 views
Apply force to a specific point on a rigid body
In unity I have a rigid body object and would like to apply force to a specific point. For example say I had a cube, I want to hit just the top right corner so it spins as a result. One idea I had ...
5
votes
2answers
321 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 ...
4
votes
2answers
571 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
1answer
236 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
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 ...
5
votes
1answer
315 views
Calculate gears rotation for a realtime simulation
Hi I'm trying to do a game with real time simulations of gears. There is a big Gear with inside a smaller gear.
I managed to draw gears with different diameters but equal size teeth, but if i try to ...
-1
votes
1answer
137 views
forward motion car physics - gradual slow
Im having trouble creating realistic car movements in xna 4.
Right now i have a car going forward and hitting a terminal velocity which is fine but when i release the up key i need to the car to slow ...
0
votes
1answer
107 views
SFX Played Once per Collision or Hit
I have a question about using Box2D (engine for LibGDX used to make realistic physics). I observed on the code that I've made for the physics here below:
@Override
public boolean touchUp(int screenX, ...
6
votes
1answer
158 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 ...
1
vote
1answer
161 views
Numerical stability in continuous physics simulation [closed]
Pretty much all of the game development I have been involved with runs afoul of simulating a physical world in discrete time steps. This is of course very simple, but hardly elegant (not to mention ...
4
votes
1answer
168 views
How display path ball will bounce?
I'm trying to figure out a way to show the path a ball will travel, so that the player can line up a shot before they fire the ball.
I can't think of a way to calculate this path in advance and ...
2
votes
2answers
264 views
How to account for speed of the vehicle when shooting shells from it?
I'm developing a simple 3D ship game using libgdx and bullet.
When a user taps the mouse I create a new shell object and send it in the direction of the mouse click. However, if the user has tapped ...
25
votes
3answers
3k views
2D water with dynamic waves
New Super Mario Bros has really cool 2D water that I'd like to learn how to create.
Here's a video showing it. When something hits the water, it creates a wave. There are also constant "background" ...
-2
votes
1answer
155 views
Move projectile in direction the gun is facing [duplicate]
Possible Duplicate:
Move sprite in the direction it is facing?
I am attempting to have a projectile follow the direction a gun is facing. When using the following code I am unable to make ...
2
votes
4answers
532 views
How to Make Objects Fall Faster in a Physics Simulation
I used the collision physics (i.e. Box2d, Physics Body Editor) and implemented onto the java code. I'm trying to make the fall speed higher according to the examples:
It falls slower if light object ...
3
votes
3answers
539 views
How to move a sprite automatically using a physicsHandler in Andengine?
I use a DigitalOnScreenControl (knob with a four-directional arrow control) to move the entity and the entity which is bound to a physicsHandler.
physicsHandler.setEntity(sprite);
...
0
votes
0answers
106 views
Simulating smooth movement along a line after calculating a collision containing a restitution of zero in 2D
[for tl;dr see after listing]
//...Code to determine shapes types involved in collision here...
//...Rectangle-Line collision detected.
...
0
votes
0answers
159 views
Artificial Gravity - Rolling Ball Physics
How could I make a program that simulates the physics of a ball?
I want it to be so that if i have a ball and place it on top of a ramp it will roll down that ramp. How might this be accomplished?
3
votes
3answers
166 views
Scaling Sound Effects and Physics with Framerate
(I'm using XNA and C#)
Currently, my game (a shooter) runs flawlessly with 60 FPS (which I developed around).
However, if the framerate is changed, there are two major problems:
Gunshot sound ...
2
votes
2answers
210 views
Procedural generation of physics-enabled structures (in a 2D world)
Is it possible to procedurally generate stable structures out of rigidbody objects at a reasonable runtime speed? Imagine Angry Birds's levels kind of structures but generated procedurally.
5
votes
4answers
326 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 ...
1
vote
1answer
210 views
Point inside Oriented Bounding Box?
I have an OBB2D class based on SAT.
This is my point in OBB method:
public boolean pointInside(float x, float y)
{
float newy = (float) (Math.sin(angle) * (y - center.y) + Math.cos(angle) *
...
1
vote
2answers
126 views
Perpendicularity of a normal and a velocity?
I'm trying to fake angular velocity on my vehicle when it hits a wall by getting the dot product of the normal of the edge the car is hitting and the vehicle's velocity:
Vector2D normVel ...
1
vote
1answer
304 views
How do 2D physics engines solve the problem of resolving collisions along tiled walls/floors in non-grid-based worlds?
I've been working on implementing my SAT algorithm which has been coming along well, but I've found that I'm at a wall when it comes to its actual use. There are plenty of questions regarding this ...
1
vote
3answers
182 views
What different ways are there to model restitution in a physics engine?
In my physics engine I give a body a value for restitution between 0 and 1. When two bodies collide there seems to be different views on how the restitution of the collision should be calculated. To ...
1
vote
1answer
128 views
Who should respond to collision: Unit or projectile?
In an RTS if a projectile hits a unit. Who should handle the collision?
If projectile handles the collision, it must be aware of all possible types of units, to know what damage to inflict. For ...
1
vote
1answer
104 views
What is going on in this SAT/vector projection code?
I'm looking at the example XNA SAT collision code presented here:
http://www.xnadevelopment.com/tutorials/rotatedrectanglecollisions/rotatedrectanglecollisions.shtml
See the following code:
private ...
1
vote
3answers
162 views
Implementing distance joint
I would like to implement something that behaves much like a distance joint / revolute joint in Box2D, however I do not want to throw a whole physics engine at this problem. I'm curious where I might ...
4
votes
4answers
474 views
Point of contact of 2 OBBs?
I'm working on the physics for my GTA2-like game so I can learn more about game physics.
The collision detection and resolution are working great.
I'm now just unsure how to compute the point of ...
3
votes
1answer
390 views
Engine for 2D Top-Down Physics-Based Skeletal Animation
I just watched at the Sui Generis video, and was completely amazed. Specifically, the part where the big troll thing is beating up the player with his flail.
This got me really excited, and I would ...
2
votes
2answers
253 views
What is the best way to check if there is overlap between player and static, non-collidable items in bullet physic engine
I'd like to add non collidable objects (eg: power ups, items, ...) in a game world using Bullet Physics Engine and to know if there is collision between player and them.
Some info : there is a lot ...
1
vote
1answer
100 views
Help with Collision Resolution?
I'm trying to learn about physics by trying to make a simplified GTA 2 clone.
My only problem is collision resolution. Everything else works great.
I have a rigid body class and from there cars and ...
0
votes
1answer
124 views
Player Movement DirectX
I'm reading on a Book that's about Gamedevelopment with C++ and DirectX 9.
There is something that interrests me:
It says that playermovements are increasing with the power of the CPU. Becouse a ...
1
vote
1answer
452 views
2D OBB collision detection, resolving collisions?
I currently use OBBs and I have a vehicle that is a rigid body and some buildings.
Here is my update()
private void update()
{
camera.setPosition((vehicle.getPosition().x * camera.getScale()) - ...



