Code Monkey home page Code Monkey logo

world-generator's Introduction

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.

world-generator's People

Contributors

moneyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

yazici hengle

world-generator's Issues

Update SFML to version 2.5.1

It's been a few years since this project was worked on. If it doesn't require an major changes then SFML should be updated to it's newest version.

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.

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.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.