Archive for category Game Algorithms

Smooth random motions with differentiable random providers

Real-world movements are restricted by the laws of physics. E.g, body is required to move in a continuous motion without any sudden jumps. When modelling NPCs, a realistic movement is essential. Furthermore, mostly is is desirable for the NPC to move randomly. Most programming languages include random number generators, sometimes even for pre-defined probability distributions. […]

, , , ,

Leave a comment

Elastic collision of circles and spheres

Inspired by a question on StackOverflow I decided to write a short article about the physics of elastic collisions. The principle is always the same. But for reasons of simplicity I will explain everything by taking the example of sphere collisions. Due to the nature of spheres the algorithms can be used directly for hyper […]

, ,

Leave a comment

Simulating a day’s sky

A nice sky is very important for most games. However, creating a good-looking one is not that easy. Researchers of the University of Utah have found a good approximation for the sky during a day (Paper). In this article I am going to explain the fundamentals of this algorithm. The complete project can be downloaded […]

, ,

5 Comments

DirectX and Matrices

Fundamentals In DirectX, in most cases a matrix is a 4×4 row-major matrix with float components that can be visualized as a table: Note that matrices are column-major in OpenGL. While the general content of this article also applies to OpenGL, both vectors and matrices are transposed, which results in a reversed multiplication order. Keep […]

, ,

Leave a comment