This is a vanilla JavaScript implementation of a tile map editor. The program allows you to create a map using multiple layers of tiles. You can adjust the zoom level, move the map around and change the active tool to draw or erase tiles.
- Choose the active tool by clicking on the corresponding button in the toolbar.
- Click on a tile to draw or erase it on the active layer.
- Use the mouse scroll or the zoom buttons to adjust the zoom level.
- Click on the map and drag to move it around.
game.html
: The main HTML file that contains the map and tools.blocks.js
: Contains the block definitions and helper functions for working with blocks.mapsGen.js
: Contains the functions for generating the map using Perlin Noise.eventListeners.js
: Contains the event listeners for user interactions.script.js
: Contains the main script for initializing and updating the map.tools.js
: Contains the tool definitions and helper functions for working with tools.utils.js
: Contains utility functions for creating and manipulating arrays.perlin.js
: Contains the Perlin Noise library used for generating the map.
You can customize the generated map by modifying the parameters in the mapsGen.js file:
seed
: Controls the randomization of the map. Change this value for a different map.groundLevel
: Determines the overall height of the island above the sea.mapLayers
: The number of layers in the 3D map.mapSize
: The size of the map in columns and rows. You can also add new blocks and tools by modifying theblocks.js
andtools.js
files.
https://benjaminaster.com/2d-css-minecraft/
https://codepen.io/rdfriedl/pen/bdvrjM
https://codepen.io/DrKain/pen/RaOmGx
https://www.redblobgames.com/maps/terrain-from-noise/#elevation-redistribution https://www.redblobgames.com/maps/mapgen4/
-
Make more vivid height and sands with shores at the same level
-
Use function sumNeighbors() to detect almost islands
https://azgaar.wordpress.com/2017/06/30/biomes-generation-and-rendering/
https://github.com/josephg/noisejs Robert Friedl - initial implementation in JQuery. MBUKH.DEV - vanilla JavaScript implementation.