A* Pathfinding Explained: From Breadth-First Search to Greedy Best-First Search

2025-06-18
A* Pathfinding Explained: From Breadth-First Search to Greedy Best-First Search

This article provides a clear explanation of the A* pathfinding algorithm. Starting with the simple Breadth-First Search (BFS), it progressively introduces Dijkstra's algorithm (handling varying movement costs), Greedy Best-First Search, and finally, the A* algorithm. Through diagrams and code examples, the article clearly shows the operation and advantages and disadvantages of different algorithms, discussing their applicability in different scenarios such as map pathfinding and game AI. A*, by incorporating a heuristic function, finds the shortest path while improving search efficiency, making it a popular pathfinding algorithm in many games.

Read more

Generating Realistic Game Maps with Minimal Code: The Magic of Noise Functions

2025-06-01
Generating Realistic Game Maps with Minimal Code: The Magic of Noise Functions

This article presents a simple method for generating game maps using noise functions, requiring only a small amount of code to produce maps with details such as elevation and biomes. It thoroughly explains the influence of parameters like frequency, octaves, and amplitude on map generation, and how to adjust these parameters to control terrain features and biome distribution. Furthermore, the article explores creating wrap-around and island maps, and provides example code in various programming languages, making it ideal for game developers seeking a quick start.

Read more

Hexagonal Grid Spiral Coordinates Guide Updated

2025-03-15

The author updated their popular hexagonal grid guide with a new section on spiral coordinate systems. Despite not yet using them in a real project, they decided to stop waiting and share their current understanding, including unoptimized sample code. More variants will be added in the future. Additionally, they discovered a simplified angle sorting method using axial coordinates, which is detailed on a separate page.

Read more
Development spiral coordinates

Planetary Orbit Spirographs Based on Kepler's Laws

2025-01-23

Inspired by John Carlos Baez's post on the Pentagram of Venus, Red Blob Games created a set of planetary orbit spirographs. Using Kepler's Third Law to convert orbital periods to distances from the sun, the site generates heliocentric planetary orbit images resembling spirographs. Data includes Mercury, Venus, Earth, Mars, Ceres, Jupiter, Saturn, Uranus, and Neptune.

Read more