Code Monkey home page Code Monkey logo

procedural-world-generation's Introduction

Procedural World Generation

This project generates a procedurally generated world using the Perlin Noise algorithm. You can navigate the world using the arrow keys and the mouse. You can also use the mouse wheel to zoom in and out. Demo

Features

  • Procedural world generation
  • Zoom in and out using the mouse wheel
  • Navigate the world using the arrow keys and the mouse
  • Editable seed
  • Browser URL is constantly updated with current seed, zoom level & position, so you can share or save your world
  • Stats
  • Settings (render resolution)

Demo Gif Demo2

Biomes

The world is generated using 3 'layers' of Perlin Noise. One for the oceans, one for the mountains, and one for the forests. These three layers are then combined into multiple biomes:

Oceans:

  • Beach (sand)
  • Coast (shallow water)
  • Ocean (water)
  • Deep Ocean (water)
  • Abyss (water)

Mountains:

  • Mountain (rock)
  • Subalpine (rock)
  • Alpine (rock)
  • Snow (well, snow)

Forests:

  • Vegetation (grass)
  • Forest (trees)
  • Dense Forest (lots of trees)

Everything else is set to 'grass'.

Details

This projects uses no external libraries. It is written in pure JavaScript and uses the HTML5 canvas element to render the map. I made the whole thing in a single day, so it's not perfect. If you find any bugs/flaws, don't hesitate to open an issue or a pull request. Also, feel free to use this project however you want!

procedural-world-generation's People

Contributors

urbainn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.