GithubHelp home page GithubHelp logo

probabletrain / mapgenerator Goto Github PK

View Code? Open in Web Editor NEW
1.2K 47.0 126.0 60.54 MB

ProcGen American City Maps

Home Page: https://maps.probabletrain.com

License: GNU Lesser General Public License v3.0

JavaScript 1.30% HTML 0.26% TypeScript 98.12% CSS 0.32%

mapgenerator's Introduction

All Contributors


Logo

Map Generator

Create procedural American-style cities
Open Generator »

Read the Docs · Report Bug · Request Feature

Table of Contents

About The Project

Map Generator Screen Shot

This tool procedurally generates images of city maps. The process can be automated, or controlled at each stage give you finer control over the output. 3D models of generated cities can be downloaded as a .stl. The download is a zip containing multiple .stl files for different components of the map. Images of generated cities can be downloaded as a .png or an .svg. There are a few choices for drawing style, ranging from colour themes similar to Google or Apple maps, to a hand-drawn sketch.

Built With

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

  • npm
npm install npm@latest -g
  • Gulp
npm install --global gulp-cli

Installation

  1. Clone the mapgenerator
git clone https://github.com/probabletrain/mapgenerator.git
  1. Install NPM packages
cd mapgenerator
npm install
  1. Build with Gulp. This will watch for changes to any Typescript files. If you edit the HTML or CSS you will have to rerun this command. Gulp Notify sends a notification whenever a build finishes.
gulp
  1. Open dist/index.html in a web browser, refresh the page whenever the project is rebuilt.

Usage

See the documentation.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contributors ✨

Thanks goes to these wonderful people (emoji key):


trees-and-airlines

🚇

Keir

💻

Ersagun Kuruca

💻

Jason-Patrick

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Contact

Keir - @probabletrain - [email protected]

Project Link: https://github.com/probabletrain/mapgenerator

License

Distributed under the LGPL-3.0 License. See COPYING and COPYING.LESSER for more information.

mapgenerator's People

Contributors

allcontributors[bot] avatar ersagunkuruca avatar jason-patrick avatar probabletrain avatar salzian 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapgenerator's Issues

multiple rivers and inland cities.

the ability to have multiple rivers in the city, or the ability to have rivers branch and merge would be excellent, as well as the ability to completely remove the coastline to create inland cities.

More small parks

Parks only generated in major grid. Add parks recognised from minor grid.

Also

Public
A simple static site generator to publish short stories

Building Tools

What I'd like to see is the ability to build map parts for those with a "known" map, then randomly generate the rest.

Potential easy constraints. Using simple greyscale images.

Sorry, I don't know how to add tags... (enhancements)

The use of a greyscale image (or data-set), to determine the "building heights". Cities build buildings based on how solid the bedrock is below. It is kind-of an exponential value, of potential. The building heights also being a determination of the "layer complexity", of most buildings. Taller buildings naturally, for the most part, have some form of tapering elevation as they reach higher levels.

On a similar respect, to an extent, a topography in greyscale, could also aid in generic elevation. Such that the map uses this data to generate "terraced elevations", where possible. Further adding some character to the output of the city. Retaining simple locations to elevate roads, within a constrained elevation incline. Following the terraced lands with foundations that retain the buildings base-flatness.

Another use for greyscale or colorized data, would be for zoning identification. Some roads and building-styles are only found in certain locations. Again, treating the data as "suggestions", not exactly as literal placements. Simple things like parks, forests, swamps, housing, commercial, industrial, etc... They could all be indicated by the specific shades or color-blends.### ###

GPL => MIT License?

I was curious if you'd be open to switch GPL license to MIT?

I'd love to contribute to the project/build more stuff on top of it but I don't want to change all my open source projects to GPL license.

Note: I'm not a lawyer, and might be wrong here. I heard GPL requirements are much stricter when it comes to use/modifications: https://stackoverflow.com/questions/3902754/mit-vs-gpl-license so I always choose MIT in my projects

Better seeding

Use radial gradient + priority queue, instead of try limit. Reduces waiting time between stages

Building height selection and skyscrapers.

Im not sure if the building height can be tweaked to be honest, maybe I just missed something, I think id be cool to have the option to select a range at which most buildings will scale.

And maybe even an option for "skyscrapers", the same way in which theres a percentage selector for which buildings will be grouped up into one big block, there should be a percentage that are wayyy taller than the rest.

Its easy enough to do a few skyscrapers in blender, but a built-in option for greater variation to all buildings would be nice.

Algorithm Writeup

Hey, thanks for publishing the source code for this, it's super informative.

I was wondering if you could do a high-level writeup of how everything works, from the algorithm you use to generate the streets to path generation to rendering. I understand that you use a Tensor Field to determine the orientation of the streets, but everything that happens after you click generate is a bit of a black box without looking through the source code.

If that's too much effort then even a few links to outside resources would be super helpful.

Thanks!

Generate SVG groups or layers

I hope this is the correct way to address a feature. Would it be possible (or likely) for you to implement some kind of (optional) grouping to the elements in the SVG Export?
I think it would be universally useful, if Water, Main, Major, Minor, Parks and Buildings (or the same categories as in the STL-Archive) would form "groups" or "layers" within the SVG, if the format supports it (for Inkscape SVG that seems to be true). Thank you.

City limits

Better city limits so it doesn't suddenly end - e.g. island, walls

Large Parks Too Clustered

Large parks are generated tightly/clustered together: not distributed evenly throughout the map as one would expect.
image

Building Names

Hi! I was thinking that it might be cool to have a setting where the ai puts down building names. It doesn't necessarily have to be creative, just "store", "house", "apartment", etc. would be useful. I would like to create a city for a project I'm making, but I hate thinking this stuff up lol

Add Street Names

You should add street names to the generator so you can name the streets, roads, and highways. A district feature would also be cool.

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.