
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
level-generator
Advanced tools
Randomly generate 2d levels in closed environments, as found in many roguelike games.
Randomly generate 2d levels in closed environments, as found in many roguelike games.

This module procedurally generates 2d levels in closed environments, as found in many roguelike games.
Levels are built by specifying tunnelers, which are agents that cut through the closed spaces, building corridors (tunnels,) anterooms, rooms, and doors along the way. The construction process uses a design file, which specifies the various tweakable parameters.
Though it is built with top-down perspective in mind, it may be useful for other perspectives like side-scrollers too.
based on this blog entry http://www.gridsagegames.com/blog/2014/06/procedural-map-generation/ which references dungeonmaker for it's tunneling algorithms.
The algorithms in this module are conceptually based on dungeonmaker, though none of it's code was used. http://dungeonmaker.sourceforge.net/DM2_Manual/
npm install level-generator
import LevelGenerator from 'level-generator'
level = new LevelGenerator()
built = false
while (!built) {
built = level.buildStep()
}
// level.objects now has all of the rooms, tunnels, anterooms, and doors
You can also pass in a design object, which will alter the way levels are constructed:
const design = { ... }
const level = new LevelGenerator(design)
look at design-default.js to see the default design settings to get an idea of how to modify this.
FAQs
Randomly generate 2d levels in closed environments, as found in many roguelike games.
We found that level-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.