public static MapLayerBase GetLandformMapGen(long seed, NoiseClimate climateNoise, ICoreServerAPI api) { MapLayerBase landforms = new MapLayerLandforms(seed + 12, climateNoise, api); landforms.DebugDrawBitmap(DebugDrawMode.LandformRGB, 0, 0, "Landforms 1 - Wobble Landforms"); return(landforms); }
public static MapLayerBase GetClimateMapGen(long seed, NoiseClimate climateNoise) { MapLayerBase climate = new MapLayerClimate(seed + 1, climateNoise); climate.DebugDrawBitmap(0, 0, 0, "Climate 1 - Noise"); climate = new MapLayerPerlinWobble(seed + 2, climate, 6, 0.7f, TerraGenConfig.climateMapWobbleScale, TerraGenConfig.climateMapWobbleScale * 0.15f); climate.DebugDrawBitmap(0, 0, 0, "Climate 2 - Perlin Wobble"); return(climate); }
public MapLayerLandforms(long seed, NoiseClimate climateNoise, ICoreServerAPI api) : base(seed) { this.climateNoise = climateNoise; float scale = TerraGenConfig.landformMapScale; if (GameVersion.IsAtLeastVersion(api.WorldManager.SaveGame.CreatedGameVersion, "1.11.0-dev.1")) { scale *= Math.Max(1, api.WorldManager.MapSizeY / 256f); } noiseLandforms = new NoiseLandforms(seed, api, scale); int woctaves = 2; float wscale = 2f * TerraGenConfig.landformMapScale; float wpersistence = 0.9f; wobbleIntensity = TerraGenConfig.landformMapScale * 1.5f; noisegenX = NormalizedSimplexNoise.FromDefaultOctaves(woctaves, 1 / wscale, wpersistence, seed + 2); noisegenY = NormalizedSimplexNoise.FromDefaultOctaves(woctaves, 1 / wscale, wpersistence, seed + 1231296); }
public MapLayerClimate(long seed, NoiseClimate map) : base(seed) { this.map = map; }