Procedural world generator written in C++. Uses SFML for map rendering.

Overview

World Generator

Archived as the code is a big mess and it'd be easier to start from scratch than to clean up this code.

A procedural world generator initially inspired by Dwarf Fortress. This was my first large programming project so the code is pretty bad and has several multi-thousand LOC files, a mess of classes and functions, and poor documentation. I don't plan on working on this again any time soon, just keeping this here as a backup and as a good reminder for myself on how not to design software.

The generator first creates a height map using simplex noise, and then applies temperature, rainfall, and river simulations to it to form a world map. It represents the final world as a 2D map and has options for multiple map views, including the biome map, heightmap, temperature map, rainfall map, region map, water region map, and more.

Gallery

This is a gallery of some select maps that had good generation results. The default generation settings might not create maps exactly like these without tweaks. The old noise library was replaced with something more versatile and generation settings that fit the old ones exactly haven't been found yet.

alt text Shaded biome map for a 400x256 world. blue = ocean, dark green = forests, light green = grasslands, sand colored = desert, golden = savannha.

alt text Height map for a 400x256 world. The brighter the color the higher the elevation.

alt text Temperature map for a 400x256 world. Red is warmer, blue is colder.

Issues
  • Replace TGUI with Dear ImGui

    Replace TGUI with Dear ImGui

    Dear ImGui is more regularly updated, and in my experience much easier to use than TGUI. Requiring less setup work to create a piece of a GUI and less work to make a GUI look good. It also comes with many more niceties built in. TGUI should be completed replaced with ImGui to improve the UX and GUI programming.

    Enhancement 
    opened by Moneyl 2
  • Replace simplex noise code with libnoise or one of it's variants.

    Replace simplex noise code with libnoise or one of it's variants.

    Replace simplex noise code with libnoise or one of it's variants, such as FastNoise or FastNoise SIMD. This should allow for much more interesting heightmaps. See here for examples on another one of my projects.

    Enhancement 
    opened by Moneyl 1
  • Remove boost::lexical_cast as a dependency

    Remove boost::lexical_cast as a dependency

    This goes along with #2 . Lexical_cast was only used to convert data for rapidjson's use. The new json library handles this conversion itself, so this dependency is no longer necessary. Also simplifies the project as it no longer depends on so many boost files.

    I was still very new to C++ when I started using rapidjson, so chances are that it has a similar functionality, and I just missed it then.

    Enhancement 
    opened by Moneyl 1
  • Replace rapidjson with Json for modern c++

    Replace rapidjson with Json for modern c++

    Rapidjson was originally chosen as I was looking for a fast json library. Turns out it was a massive pain to use. On later projects I tried out Json for Modern C++, and it was a much easier and straightforward library to use. Any possible speed differences are negligent since the json files are small and rarely loaded.

    Enhancement 
    opened by Moneyl 1
Owner
moneyl
moneyl
Procedural tree mesh generator (and editor)

ProcTree This is a liberally licensed procedural tree generator in c++, along with an editor HappyTree. (youtube video) The procedural generation itse

Jari Komppa 182 Jun 11, 2022
A lightweight C++14 parsing library for tmx map files created with the Tiled map editor

tmxlite Description A lightweight C++14 parsing library for tmx map files created with the Tiled map editor. Requires no external linking, all depende

Matt Styles 317 Aug 6, 2022
Simple Tetris clone written in C++ using SFML

stetris Simple Tetris clone written in C++ using SFML. The game has been tested only on GNU/Linux system so far. Building dependencies (on Linux) g++

sewe2000 3 Jun 14, 2022
A procedural geometry generation library for C++11

Generator - A procedural geometry generation library. The purpose of this library is to easily generate procedural meshes of geometric primitives such

Ilmola 149 Jul 25, 2022
Procedural Generation Experiments

Procedural Generation Experiments What is this? This application is a tool to create and paint L-System in a fully interactive and dynamic way. “But,”

Thomas Munoz 106 Aug 2, 2022
An efficient texture-free GLSL procedural noise library

Wombat An efficient texture-free GLSL procedural noise library Source: https://github.com/BrianSharpe/Wombat Derived from: https://github.com/BrianSha

Brian Sharpe 194 Jul 13, 2022
SFML-based Mandelbrot viewer program

mandelbrot SFML-based Mandelbrot viewer program. Dependencies CMake 3.16 C++17 SFML 2.5 Building cmake -B build -DCMAKE_BUILD_TYPE=Release cmake --bui

Chris Thrasher 13 May 14, 2022
SFML-based flocking simulation program

boids SFML-based flocking simulation program Requirements C++20 CMake 3.16 SFML 2.5 Building cmake -B build -DCMAKE_BUILD_TYPE=Release cmake --build b

Chris Thrasher 5 May 27, 2022
Ants simulation in C++ with SFML

ants Ants simulation in C++ with SFML Requirements In order to compile you need CMake and SFML 2.5 or greater # Mac brew install cmake sfml # Ubuntu

Simone Rossi Tisbeni 2 Dec 28, 2021
Gamepad support for SFML based on XInput and the game controller DB for SDL

SFML_GamepadSupport Gamepad support for SFML based on XInput and the game controller DB for SDL Installation Download the latest gamecontrollerdb.txt

Guido Dev 8 Apr 17, 2022
Create simple visual sketches in Lua using SFML

Luna What is Luna? Luna is a simple game engine programmed in C++ and Lua which lets you create sketches and games in Lua Features Program in Lua, eas

XyronLabs 17 Jan 9, 2022
Library for playing midi files with SFML

sfMidi sfMidi is a library for playing MIDI files with SoundFont 2 in SFML. Original Author Kerli Low (a.k.a. zorexx) [email protected] http://www.zo

Jonny 2 Sep 21, 2019
GPU 3D signed distance field generator, written with DirectX 11 compute shader

GPU SDF Generator GPU 3D signed distance field generator, written with DirectX 11 compute shader Building git clone --recursive https://github.com/Air

Z Guan 24 Jul 15, 2022
A tiny evolution simulator, which uses SDL2 and is written in C

evosim Evosim is a small evolution simulator. Evosim uses the SDL2 library for graphics. The program can be compiled by simply running make in the evo

Victor Ocampo 2 Nov 20, 2021
Manual map shellcode (aka byte array) injector

ShellJector This little tool can download DLL from the internet and inject it as shellcode (aka byte array) into process with manual map injection. Th

Александр Вольф 18 Aug 6, 2022
Loads a signed kernel driver which allows you to map any driver to kernel mode without any traces of the signed / mapped driver.

CosMapper Loads a signed kernel driver (signed with leaked cert) which allows you to map any driver to kernel mode without any traces of the signed /

null 118 Jul 26, 2022
Patches/unpatches an MCC CEA map to use client side hit detection for all weapons

MCC CEA Client-Side Hit Detection Map Patcher This program allows you to patch an MCC map so that all maps use client-side hit detection instead of ju

Snowy 4 Jun 20, 2022
Map joystick events to mouse/key events

enjoy map joystick events to mouse/key events Recently, I got a DevTerm and enjoy is specially written for this device to map joystick events to mouse

null 1 Nov 19, 2021