Welcome to physicsforgames.com!

🚧This Website is Under Construction

Feel free to look around at the existing pages! But please be aware that things will be broken/incomplete in many instances. The website itself should have some solid content by the end of the year.

Introduction

You're most likely here because you have some interest in the world of realtime physics simulation. Maybe you have some knowledge of rendering via OpenGL or Vulkan, and you want to see your up-until-now static scene come to life. Well, you're in the right place! In the course of this tutorial series I will walk you through building a variety of physics simulations - 2D and 3D rigidboy, soft body, collision algorithms - entirely in the web. All of this information will be extendable to other languages, but we will use C++ and OpenGL compiled to WebAssembly and WebGL in this tutorial series.

My primary goal in this website is to display how a competent programmer might implement different types of believable physics simulations. Because of this, I will not spend too much time discussing physics theory, unless it is absolutely necessary that I do so for a particualr section. Physics - especially the world Newtonian physics where most game engines spend their time - is a well-documented subject, and I would be doing a great injustice to the field if I were to consider myself qualified at explaining it. I am no physicst by trade, so I will leave that talk to the big brains at the universities.

Each of the tutorials on the sidebar are meant to be self-contained, so long as you have a good understanding of the fundamentals of vector calculus. Which leads me to my next disclaimer: I am assuming competency in both some programming language as well as vector calculus/linear algebra in these tutorials. The math that you need to know in order to implement these simualtions isn't all that difficult, but, as with fix, I consider myself hardly qualified at explaining them, as I only do math so much as it is useful to me. Many many books and stackoverflow posts have been written on these subjects, and I am sure that you will not encounter any trouble at all if you wish to study them yourself.

Finally, I feel the need to provide some references up front which I have found particularly useful in my studies of physics simulations. Those being: