Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMGridGeneratorRandomWalk Class Reference

Generates a grid with a path carved by a drunkard walk algorithm See http://pcg.wikidot.com/pcg-algorithm:drunkard-walk More...

Inheritance diagram for MoreMountains.Tools.MMGridGeneratorRandomWalk:
MoreMountains.Tools.MMGridGenerator

Static Public Member Functions

static int[,] Generate (int width, int height, int seed, int fillPercentage, Vector2Int startingPoint, int maxIterations)
 Generates a grid with a path carved by a drunkard walk algorithm More...
 
- Static Public Member Functions inherited from MoreMountains.Tools.MMGridGenerator
static int[,] PrepareGrid (ref int width, ref int height)
 Prepares the grid array for use in the generate methods More...
 
static bool SetGridCoordinate (int[,] grid, int x, int y, int value)
 Carves or adds to the grid More...
 
static int[,] TilemapToGrid (Tilemap tilemap, int width, int height)
 Converts a tilemap's contents into a grid More...
 
static void DebugGrid (int[,] grid, int width, int height)
 Outputs the contents of a grid More...
 
static int GetValueAtGridCoordinate (int[,] grid, int x, int y, int errorValue)
 Returns the int value at the specified coordinate on a grid More...
 
static int[,] InvertGrid (int[,] grid)
 Inverts the contents of a grid (1 becomes 0, 0 becomes 1) More...
 
static int[,] SmoothenGrid (int[,] grid)
 Smoothens a grid to get rid of spikes / isolated points More...
 
static int[,] ApplySafeSpots (int[,] grid, List< MMTilemapGeneratorLayer.MMTilemapGeneratorLayerSafeSpot > safeSpots)
 Carves "safe spots" with 0s into the specfied grid More...
 
static int[,] BindGrid (int[,] grid, bool top, bool bottom, bool left, bool right)
 Adds bounds (walls made of 1) to a grid, on the selected sides More...
 
static int GetAdjacentWallsCount (int[,] grid, int x, int y)
 Returns the amount of adjacent walls for a specific coordinate More...
 

Detailed Description

Generates a grid with a path carved by a drunkard walk algorithm See http://pcg.wikidot.com/pcg-algorithm:drunkard-walk

Member Function Documentation

◆ Generate()

static int [,] MoreMountains.Tools.MMGridGeneratorRandomWalk.Generate ( int  width,
int  height,
int  seed,
int  fillPercentage,
Vector2Int  startingPoint,
int  maxIterations 
)
static

Generates a grid with a path carved by a drunkard walk algorithm

Parameters
width
height
seed
fillPercentage
Returns

The documentation for this class was generated from the following file: