C++ Text Geared Toward Physics Engines?

Click For Summary

Discussion Overview

The discussion revolves around recommendations for texts focused on creating physics engines using C++. Participants explore the complexities involved in physics engine development, including numerical integration, collision handling, and the mathematical modeling of objects within a game environment.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants inquire about good texts for creating physics engines in C++, with a specific mention of a text by O'Reilly that covers the topic in some detail.
  • One participant describes the process of using current conditions to calculate accelerations and the challenges of collision handling in game physics engines.
  • Another participant emphasizes the importance of understanding numerical integrators and geometry for effective physics engine development, noting the need for both collision detection and response mechanisms.
  • Spatial classification methods, such as BSP trees, are mentioned as a basic approach to organizing scenes, with a suggestion that various techniques exist for this purpose.
  • Participants discuss the necessity of incorporating game-specific elements that may deviate from realistic physics to achieve desired effects.
  • Open source game engine physics engines are suggested as practical examples for understanding the discussed concepts.

Areas of Agreement / Disagreement

Participants express a range of views on the complexities of physics engine development, with no clear consensus on the best texts or methods. The discussion remains open-ended with multiple competing ideas and approaches presented.

Contextual Notes

Limitations include the need for a deeper understanding of numerical integrators and geometry, as well as the unresolved nature of specific techniques for collision detection and spatial classification.

Who May Find This Useful

Readers interested in game development, physics simulation, and those seeking resources for learning about physics engines in C++ may find this discussion relevant.

Saladsamurai
Messages
3,009
Reaction score
7
Does anyone know of any good texts that are geared towards creating Physics Engines using c++? Or at the least, a text on creating physics engines in general? Any personal recommendations would be great.
 
Technology news on Phys.org
In the case of a physics engine for a game, current conditions such as position, velocity, and control inputs are used to calculate accelerations, then numerical integration is used to calculate a new velocity and position, based on some time step. The numerical integration is fairly straight forward. Collision handling can be tricky. For a game that tries to emulate reality, the difficult part is creating a mathematical model for the objects in a game, such as tires and suspension on a car, aerodynamics on a plane, ... . Most physics engines run at some fixed rate, but I don't know what is used to control the timing on a PC for rates that aren't multiples of 1 milli-second (a common timer) such as 360hz (versus 333hz).
 
Saladsamurai said:
Does anyone know of any good texts that are geared towards creating Physics Engines using c++? Or at the least, a text on creating physics engines in general? Any personal recommendations would be great.

There is a text by O'Reilly that covers this in a little detail:

http://shop.oreilly.com/product/9780596000066.do

But you will need to do a lot on top of reading just this alone.

You have to understand issues about numerical integrators to see when things blow up and go unstable and also need to understand any 'hacks' that are put into stop stuff like this from happening.

Also on top of this understand geometry in a very detailed manner.

The reason is that numerical integrators are good for the 'response' part but for the 'detection' part you need collision primitives and this is a whole other kettle of fish.

Also it's not just static, you will want your scene spatially organized and any kind of dynamic information like momentum (angular and non-angular) need to be taken into account with the spatial classification that is assigned.

If you want a basic idea of spatial classification then the simplest one is the BSP tree which basically keeps dividing the space in half with each plane.

It's not the best way but there are a lot of approaches to spatial classification and its important that you realize that the classifier doesn't have to be straight, and you could even use a specialized data structure and a 'search' algorithm to do some funky stuff.

But yeah aside from 'response' (integration issues, function definition etc) and 'detection' (collision and everything else), then you need 'games' specific stuff because games are not realistic and sometimes you want to have 'wacky' effects that are clearly not real.

After you combine these three then you get a physics engine that allows a template for collision detection and response and that allows you to tweak specific variables to implement 'physics models' which include things like gravity, dampening coeffecients and other things.

If you can get some open source game engine specific physics engines you will see what I mean when I say the things I say in my post.
 
This is great info chiro. Thanks for the reply. :smile:
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K