Description
The flood fill is a very common programming algorithm used for a variety of purposes from filling in the confined area in paint program to finding a path from A to B to expanding water outward from a single source.
This asset contains a single flood fill script with a few utility scripts used within the main script in order to set a confined area of a ds_grid to a single value but easily modifiable for other purposes and if support is required to edit this to your needs it is available.
Usage : ds_grid_flood_fill(grid, start x , start y,value)
Utility scripts included
- ds_grid_in_bounds , this script checks if the given cell coordinates are within the grid.
- ds_grid_passable , this returns if the given cell coordinates are passable as defined by a passable value.
- ds_grid_same_value_neighbors, returns the neighboring cells to a particular cell in a ds_grid which have the same value as that cell as a ds_list.
These scripts are called from ds_grid_flood_fill but have utility usages which make accessing them from outside of the flood fill script useful.
End User Licence Agreement (EULA)