Sponsored By

Feature: 'An Easy Way Of Solving Complex Mathematical Models: The Finite Difference Scheme'

In <a href="http://www.gamasutra.com/view/feature/3697/an_easy_way_of_solving_complex_.php">this technical article</a>, veteran coder Raka Jovanovic looks at dynamic game-related effects like heat distribution models, explaining useful mathematical formul

Eric Caoili, Blogger

June 18, 2008

2 Min Read

In this technical article, veteran coder Raka Jovanovic looks at dynamic game-related effects like heat distribution models, explaining useful mathematical formulas that should help decrease the amount of programming. With new games calling for more and more realistic effects, the best way to achieve those realistic effects is by using correct physical models. Many of the models are represented with partial differential equations (PDE): "The solving of this type of equation is often avoided by using different types of tricks. It is sad to say, but in the end, tricks are just tricks, and they don't give the correct solution - just something that looks like it. There are two main reasons for using tricks. The first one is that they are usually much faster - but with the increase of CPU power we can give up some of the speed to get more reality. The second reason is that most people think solving PDEs is very complicated, and in many cases this simply isn't true. In this article we'll show a standard method of solving PDEs and how to implement it. This method is called Finite Difference Scheme (FDS). It is not the most exact and stable method that exists, but is much better than using tricks, and it is the easiest to understand and implement." One big problem with using the Finite Difference Scheme method is that there can be much more calculation than is actually needed. Jovanovic likens the dilemma to a long metal wire heated in the middle. Though the wire will be hot in the center, the heat is slowly moving to the ends: "The heat distribution near the fire will be changing quickly, while it will be almost constant at the ends. It is obvious that we need more precise calculations near the fire than at the ends. This is a situation that is quite common in many problems that we simulate with PDEs. Because of this characteristic, the idea of adding an adaptive grid (using different h at different parts of the problem space) to FDS appeared quickly. This is when it starts to show its real power - due to the large increase in the speed of calculation. There are many articles written about this subject, but most of them are dedicated to mathematical aspects." You can now read the full feature on what video game developers can learn from D&D's evolution (no registration required, please feel free to link to this feature from other websites).

About the Author(s)

Eric Caoili


Eric Caoili currently serves as a news editor for Gamasutra, and has helmed numerous other UBM Techweb Game Network sites all now long-dead, including GameSetWatch. He is also co-editor for beloved handheld gaming blog Tiny Cartridge, and has contributed to Joystiq, Winamp, GamePro, and 4 Color Rebellion.

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like