Python Map Generator

PythonGameDevTkinter

Wednesday, April 5, 2023

2D Map Generator Project with Cellular Automata Algorithm

Overview

This was a project for my study classes. The primary objective was to create a visually appealing and dynamic tool that could generate diverse landscapes and terrains with minimal input.

Project Goals

  1. Implement Cellular Automata: The core of this project was the integration of cellular automata algorithms. These algorithms are inspired by natural processes like erosion, vegetation growth, and terrain formation, making them perfect for generating realistic maps.
  2. Generate Diverse Landscapes: The map generator aimed to produce a wide range of landscapes, from island maps, to continents maps.

Map Generation Pipeline

  1. Initialization: The map starts with a random distribution of terrain types or initial conditions.
  2. Iterations: The cellular automata rules are applied iteratively, with each iteration refining the terrain based on predefined rules.
  3. Post-Processing: Additional algorithms may be applied post-generation to add finer details or enhance specific features of the map.

Visual Representation

Here are a few generated maps, you can find a video showcasing how the program works and the code here : https://github.com/jnyuu/random-map-generator

Big continent green 2D map

Medium continent frost 2D map

Islands green 2D map