How to Make A Map Generator Using The MERN Stack And TypeScript — Part 2: Map Generation

Using the Diamond Square Algorithm

Quentin Musy
9 min readMay 3, 2023

--

Goal

The goal of this part will be to do a first iteration of the map generation. To do this, we will:

  • Implement the Diamond Square algorithm to generate a random height map
  • Draw the map on an image and store it in our server
  • Return the url of the map in our API

--

--

Quentin Musy

Full Stack Engineer | Writer | Musician | Knowledge is meant to be shared, not kept. That's why I write.