Questions tagged [physics]

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

Physics in a game are the laws that are defined to govern the essence of motion within the game's world. This is about how things work at a core, mechanical level within the game engine, and is distinct from how the world setting's physics works at a conceptual, backstory level.

Questions with this tag deal with topics such as implementing gravity, controlling acceleration and velocity, or applying force in the game space to other objects.

Related tags include:

  • , which is specifically concerning physics within a 2D game space
  • , which is about handling genuine projectile motion calculations
  • , which is about handling the behavior and motion of rope-like entities
2395 questions
44
votes
2 answers

Water/Ocean simulation and physics

I'm looking for some references about water simulation, and how to model it's interaction with bodies (like boats, ships, submarines). I've found a lot of references on the visual aspects of water (waves, reflection, etc), but very little about how…
Alexandre
  • 565
  • 1
  • 4
  • 6
42
votes
6 answers

Analysis of Mario game Physics

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 interested in!
Jeff
  • 2,448
  • 4
  • 24
  • 29
31
votes
3 answers

Pros and cons of different integrators

When creating things like physics in games you need an integrator. I've seen Verlet integration mentioned several places as a great alternative to Euler integration. For instance in the famous document by Thomas Jakobsen. However in this article…
paldepind
  • 627
  • 2
  • 7
  • 11
31
votes
2 answers

How did EA DICE create destructible environments in Battlefield Bad Company 2 and Battlefield 3?

How did the folks at EA DICE create destructible environments in Battlefield Bad Company 2 and Battlefield 3? Did they just assemble the buildings out of predefined sub-regions, that break apart when there is an explosion or something similar? I…
Ryan Stull
  • 473
  • 4
  • 8
19
votes
1 answer

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 enough space to climb up?
doppelgreener
  • 7,184
  • 7
  • 42
  • 68
13
votes
4 answers

Physics engine recommendation which can simulate pool game correctly?

I'm making a pool-game like game. This game requires correct (or very accurate) reflective bounces. I tried Box2D and Bullet Physics, but they both have this problem. If there is a wall on top of this image, red line is expected course of a real…
Eonil
  • 959
  • 9
  • 24
12
votes
5 answers

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 terribly easy to handle anything from collisions, to…
peoro
  • 443
  • 2
  • 6
  • 16
10
votes
3 answers

How do fluid dynamics work?

How would I go about implementing fluid dynamics in a game, such as can be seen in this video?
Edgar Miranda
  • 401
  • 4
  • 9
10
votes
3 answers

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 working time to time engines?
Dvole
  • 1,865
  • 2
  • 19
  • 23
9
votes
3 answers

Physics simulation methods for large delta times?

What physics simulation methods are most suitable for really big delta time (hours to weeks)? In addition, would I face any problems combining different methods for big and small delta times?
fread2281
  • 191
  • 2
9
votes
3 answers

How to handle jumping up a slope in a runner game?

In an 2D endless runner, what should happen when the player is running "too fast" up a slope and jumps? For example, in a "normal" case: .O. . __..O_____ . / . / O/ _/ If he is moving to the right slowly enough, he will jump upwards and…
you786
  • 645
  • 5
  • 20
9
votes
5 answers

Destructible Terrain like worms

I have to develop a game with a dynamic destruction of the map, I searched the internet and even looked at some questions regarding this topic on this Website, but they did not help me much out. I made the map with tiled and used box2d to make…
Jizang
  • 91
  • 1
  • 3
7
votes
3 answers

Resources to learn programming rigid body simulation

Where I can start learning about simulating rigid bodys 2d and 3d ?
proog91
7
votes
4 answers

What are the advantages of constraint-based solvers?

I am a fairly competent programmer and I am not bad at math. I have been working on game physics simulations for around 2 years now. In some books and tutorials that I have read, they introduce constraints. They calculate Jacobian matrices and use…
tupcuhamdi
  • 118
  • 7
7
votes
2 answers

Simulation of supersonic, hypersonic flight with user defined surfaces

I want to create a small rocket-launching game, inspired by Kerbal Space Program. Since there's nothing in orbital mechanics, that I still don't know. I decided to make this as close to reality as possible. The only moment I needed to discover is…
1
2 3 4 5 6 7