C# Class DivineRightGame.Managers.WorldGenerationManager

Show file Open project: Haedrian/Divine-Right

Public Properties

Property Type Description
CurrentStep string

Protected Properties

Property Type Description
isGenerating bool
regions DivineRightGame.Managers.HelperObjects.Region[]

Public Methods

Method Description
ColoniseWorld ( ) : void

Drops a number of settlements within the world

CreateBandits ( ) : void

Create bandit camps

CreateDungeons ( ) : void
CreateOrcCitadels ( ) : void

Creates Citadels on the map Will colonise areas not claimed by humans.

DetermineBiomes ( ) : void

Determines the biomes for each tile from their traits

DetermineDesirability ( MapBlock block ) : int

Determines the Desirability of a particular global tile

DetermineDesirability ( ) : void

This determines the base desirability for all tile by examining the tile itself

GenerateRains ( ) : void

Generates the amount of rain in the world

GenerateResources ( ) : void

Generates a number of resources on the map

GenerateRoads ( ) : void

Generates the roads

GenerateTemperatures ( ) : void

Generates the temperatures of the world

GenerateWorld ( ) : void

Generates the global map

GetBlocksAroundPoint ( MapCoordinate centre, int radius ) : DRObjects.MapBlock[]

Returns a filled square around a particular point

GetCircleAroundPoint ( MapCoordinate centre, int radius ) : DRObjects.MapBlock[]

Gets a 'circle' of points 'radius' distance away from it

GetPointOnGaussianCurve ( double peak, double centre, double width, double x ) : double

Plots a gaussian curve, and returns the value of f(x) for the given x

GetRandomGaussian ( ) : double

Gets a random number on a gaussian distribution with a mean 0.0 and standard deviation 1.0

HarvestResources ( ) : void

Replaces certain resources with sites instead

MarkHillSlopes ( ) : void

Marks certain places as having large slopes

Private Methods

Method Description
AssignRegionSizes ( ) : void

Assigns each region a different height

AssignRegions ( ) : void

Assigns each location to a different region

CreateSettlement ( bool capital, Settlement settlement, MapBlock block, int owner ) : SettlementItem

Puts settlement items on a particular location pertianing to a particular settlement.

ErodeWorld ( ) : void

Erodes the world's elevation

GenerateBorder ( ) : void

Generates the border, and sets the elevation to underwater

GeneratePathfindingMap ( MapBlock map ) : ].byte[
GenerateRivers ( ) : void

Generates a number of rivers according to the maximum river count assigned

Initialisation ( ) : void

Initialises the World Map in preperation. Creates the regions with empty ones, and sets the default tile settings

RoughSmooth ( ) : void

Runs a rough Interpolation on the world

Method Details

ColoniseWorld() public static method

Drops a number of settlements within the world
public static ColoniseWorld ( ) : void
return void

CreateBandits() public static method

Create bandit camps
public static CreateBandits ( ) : void
return void

CreateDungeons() public static method

public static CreateDungeons ( ) : void
return void

CreateOrcCitadels() public static method

Creates Citadels on the map Will colonise areas not claimed by humans.
public static CreateOrcCitadels ( ) : void
return void

DetermineBiomes() public static method

Determines the biomes for each tile from their traits
public static DetermineBiomes ( ) : void
return void

DetermineDesirability() public static method

Determines the Desirability of a particular global tile
public static DetermineDesirability ( MapBlock block ) : int
block DRObjects.MapBlock
return int

DetermineDesirability() public static method

This determines the base desirability for all tile by examining the tile itself
public static DetermineDesirability ( ) : void
return void

GenerateRains() public static method

Generates the amount of rain in the world
public static GenerateRains ( ) : void
return void

GenerateResources() public static method

Generates a number of resources on the map
public static GenerateResources ( ) : void
return void

GenerateRoads() public static method

Generates the roads
public static GenerateRoads ( ) : void
return void

GenerateTemperatures() public static method

Generates the temperatures of the world
public static GenerateTemperatures ( ) : void
return void

GenerateWorld() public static method

Generates the global map
public static GenerateWorld ( ) : void
return void

GetBlocksAroundPoint() public static method

Returns a filled square around a particular point
public static GetBlocksAroundPoint ( MapCoordinate centre, int radius ) : DRObjects.MapBlock[]
centre MapCoordinate
radius int
return DRObjects.MapBlock[]

GetCircleAroundPoint() public static method

Gets a 'circle' of points 'radius' distance away from it
public static GetCircleAroundPoint ( MapCoordinate centre, int radius ) : DRObjects.MapBlock[]
centre MapCoordinate
radius int
return DRObjects.MapBlock[]

GetPointOnGaussianCurve() public static method

Plots a gaussian curve, and returns the value of f(x) for the given x
public static GetPointOnGaussianCurve ( double peak, double centre, double width, double x ) : double
peak double
centre double
width double
x double
return double

GetRandomGaussian() public static method

Gets a random number on a gaussian distribution with a mean 0.0 and standard deviation 1.0
public static GetRandomGaussian ( ) : double
return double

HarvestResources() public static method

Replaces certain resources with sites instead
public static HarvestResources ( ) : void
return void

MarkHillSlopes() public static method

Marks certain places as having large slopes
public static MarkHillSlopes ( ) : void
return void

Property Details

CurrentStep public static property

public static string CurrentStep
return string

isGenerating protected static property

protected static bool isGenerating
return bool

regions protected static property

protected static Region[],DivineRightGame.Managers.HelperObjects regions
return DivineRightGame.Managers.HelperObjects.Region[]