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
![](https://eu-images.contentstack.com/v3/assets/blt740a130ae3c5d529/bltba62518415cda0e2/652fe6ddbc479f8697ef691f/default-cubic.png?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
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
You May Also Like