Skip to content
Liam-RalphPublic

About

A map generation and png visualization console application in Python.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

BiomeGen

Released July 2025

Version 4.0.0

Updated November 2026


Description

BiomeGen is a C map generation tool that provides output in a png format. Customization options include map dimensions, island abundance, island size, coastline smoothing, and biome size. Generates water of varying depth and land with various biomes. Uses multiprocessing in C for increased efficiency. Includes a script for automating runs to create multiple results or test generation speed.


Operating System Support

Version 3.0.0 and above

  • Linux supported
  • MacOS and BSD OSs should be supported, but haven't been tested
  • Windows is not currently supported, but WSL should work
  • GCC used, but other compilers should work

Python Versions (v2.1.6 and below)

  • Any OS with Python 3.10+ should work (Linux Mint, antiX, and Windows tested)

License

This project is licensed under the GNU General Public License v3.0 (GNU GPLv3), as detailed in LICENSE, with the following exceptions:

  • result.png, a sample output, which is licensed under The Unlicense, as detailed in LICENSE_PNG. This includes any prior version of result.png.
  • Any image output generated by this program is yours. You are free to copy, edit, distribute, sell, and use any way you want. Credit is appreciated, but not required.

Compilation

Required libraries (outside standard libraries)

  • main.c: math.h and png.h
  • autorun.c: math.h

Compilation is setup for CMake, with the following commands:

  • cmake ..
  • cmake --build .

If you wish to compile with GCC, the following should work:

  • gcc main.c -o main -lm -lpng -Wall You may need to add -D_GNU_SOURCE, this was required in previous versions.
  • gcc autorun.c -o autorun -lm -Wall

Automation

This project includes the ability to run in an automated mode. There are two ways to do this:

  1. Add arguments when running main.c.

    E.g. ./main 1920 1080 100 120 50 5 5 8 file_path.png. The first 8 inputs are the same as with manual inputs, with the same restrictions. The last is the path for the created file. This option will only print the overall generation time. Beware there is no input sanitization on automated inputs. For reference, the order of inputs:

    • Map Width
    • Map Height
    • Map Resolutions
    • Island Abundance
    • Island Size
    • Coastline Smoothing
    • Biome Size
    • Number of CPU Threads
    • Output Path
  2. Use autorun.c and autrorun_tasks.txt.

    autorun.c runs the main program using automated inputs described above. It gets tasks from autorun_tasks.txt. Each line represents one task, empty lines and comments are not handled and will cause errors. Currently, it contains an example task 2:n:n:1920 1080 100 120 50 5 5 8 file_path.png. Each task is broken into four parts, separated by colons:

    1. 2 the number of repetitions to run
    2. n whether to show times for each repetition (y/n). Choosing 'n' will a progress bar instead.
    3. n whether to save each output (y/n). Choosing 'y' will cause each repetition's output to be saved to "result_pathX.png", where 'X' is the repetition's number (starting from 1).
    4. 1920 1080 100 120 50 5 5 8 file_path.png the inputs to be passed to the main program. Will be changed for each repetition if output saving is selected. This program will also generate statistics, including average generation time, pixels per second (Map Width * Map Height / Generation Time), and variability.

About

A map generation and png visualization console application in Python.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages