# Archive for category Game Algorithms

### Smooth random motions with differentiable random providers

Posted by nicoschertler in .Net Programming, Game Algorithms, General on October 25, 2014

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. […]

### Elastic collision of circles and spheres

Posted by nicoschertler in Game Algorithms, Programming on October 7, 2013

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 […]

### Simulating a day’s sky

Posted by nicoschertler in .Net Programming, DirectX Programming, Game Algorithms on April 3, 2013

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 […]

### DirectX and Matrices

Posted by nicoschertler in DirectX Programming, Game Algorithms on January 27, 2012

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 […]