Distance field transparency

2 Jun 2023

Edges of partially transparent textures and sprites look pixelated and jagged when magnified. To increase the quality of these edges, signed distance fields can be used to render smooth edges that don't lose detail when zoomed in. This article provides a fast method and a tool to generate SDFs, and it goes into several ways of rendering them.

Digital koi breeding

12 Jun 2022

In my fish breeding game Koi Farm, an infinite number of koi patterns can be explored through crossbreeding. The techniques I've used to simulate pattern mutation and crossbreeding are explained in this article, and an interactive javascript based pattern generator and mutator is included to demonstrate the algorithms.

Rendering symmetry

23 Feb 2021

Symmetry or reflections can be rendered by defining plane surfaces through which things need to be reflected and mirroring the scene through the planes. This article details a shader algorithm that can be used to render geometry with one or more symmetry planes applied to it in real time.

Random procedural generation

11 Feb 2021

Procedural content randomization can lead to interesting outcomes, but randomness needs to be limited and guided for good results. This article illustrates several techniques that can be used to achieve that goal with interactive javascript examples.

Evolving Lindenmayer systems

20 Oct 2020

Lindenmayer systems have been developed to model plant growth. An evolutionary algorithm can be used to simulate competitive plant evolution using L-systems. The systems themselves represent DNA, while the structures they produce represent plants. This technique gives rise to interesting yet familiar plant-like structures.

Simulating hydraulic erosion

14 Jun 2020

Terrain features are to a high degree shaped by hydraulic erosion. Several algorithms exist for simulating this process that vary in realism and computational complexity. This article proposes a simple and fast method that produces realistic looking results.

Neuroevolution in squids

24 Apr 2020

Artificial neural networks can be trained to perform certain tasks, but they can also be the product of simulated evolution. Evolved nervous systems are created according to a genetic blueprint. This article demonstrates squids swimming efficiently using tentacles controlled by an evolved neural network.

Layered voxel rendering

11 Nov 2019

Voxels scenes can be rendered using layered voxel rendering by splitting the scene into image layers and pre-shading the voxels. The method is trivial to implement and surprisingly performant. This article walks through the process and demonstrates a procedural island generator using this technique.

Convolutional textures

7 Jan 2019

Self-updating textures can be used to achieve impressive visual effects using the GPU. In this article I demonstrate four interactive applications of this technique, ranging from simple cellular automata to displacing vegetation and simulating waves in a body of water.

Simulated ecosystems

3 Dec 2018

Ecosystems can be simulated to observe and understand their behaviour. In a closed ecosystem, nothing enters or leaves the system from the outside world. I simulate and explore such a system in this article, and I discuss its real world similarities and applications.

Swarm behaviour

1 Feb 2018

Swarm behaviour can be simulated using a few simple rules. Implementing these rules enables us to simulate flocking birds, schooling fish and swarming crowds. In this article, I walk through the process of implementing this algorithm.

Lindenmayer systems

16 Dec 2017

Lindenmayer systems (or L-systems) can be used to produce intricate patterns by repeatedly applying production rules. Rendering these systems results in interesting fractals that can be useful in procedural generation. A method for rendering 3D Lindenmayer systems is demonstrated.

2D platformer physics

7 Nov 2017

In this tutorial I walk through the process of writing a simple grid based platformer in javascript. The result is a universal platform physics engine suitable for any platformer. This implementation uses edge collisions instead of cell collisions, which allows for more compact level design.

Cubic noise

31 Oct 2017

Coherent random noise can be used to create a great variety of effects. The algorithm for generating cubic noise is explained. An interactive cubic noise generator is inclued, as well as a procedural terrain generator.