예제 #1
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/SeaBeach")));

            // add ground texture for background (sand without dunes)
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureSpraySmooth,
                    noiseSelector: null));

            // add ground texture for overlay (sand with some dunes)
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSpraySmooth,
                    noiseSelector: new NoiseSelector(from: 0.4,
                                                     to: 0.65,
                                                     noise: new PerlinNoise(seed: 420557513,
                                                                            scale: 10,
                                                                            octaves: 1,
                                                                            persistance: 0,
                                                                            lacunarity: 1))));
            // add shells & pebbles decals
            settings.AddDecal(
                new ProtoTileDecal(ProtoTileDecal.CollectTextures("Terrain/Beach/ShellsNPebbles*"),
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   requiresCompleteProtoTileCoverage: true,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.9,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 742646592))));

            // add dry grass decals
            settings.AddDecal(
                new ProtoTileDecal("Terrain/Beach/Grass*",
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   requiresCompleteProtoTileCoverage: true,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.97,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 173453622))));

            // add large individual shells decals
            settings.AddDecal(
                new ProtoTileDecal("Terrain/Beach/Shell*",
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   requiresCompleteProtoTileCoverage: true,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.97,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 724531432))));
        }
예제 #2
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/LakeShore")));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureSpraySmooth,
                    noiseSelector: null));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSpraySmooth,
                    noiseSelector: new CombinedNoiseSelector(
                        new NoiseSelector(
                            from: 0.4,
                            to: 0.58,
                            noise: new PerlinNoise(seed: 785999248,
                                                   scale: 13,
                                                   octaves: 4,
                                                   persistance: 0.5,
                                                   lacunarity: 1.6)),
                        new NoiseSelector(
                            from: 0.4,
                            to: 0.58,
                            noise: new PerlinNoise(seed: 1643061459,
                                                   scale: 10,
                                                   octaves: 4,
                                                   persistance: 0.4,
                                                   lacunarity: 1.44)))));

            // add pebbles decals
            settings.AddDecal(
                new ProtoTileDecal(ProtoTileDecal.CollectTextures("Terrain/Lakeshore/LakeshorePebbles*"),
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   requiresCompleteProtoTileCoverage: true,
                                   noiseSelector:
                                   new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.975,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 12831623)),
                                       new NoiseSelector(
                                           from: 0.975,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 346263467)))));
        }
예제 #3
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Pit")));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: null));

            // add clay stones decals
            var clayStonesTextures      = ProtoTileDecal.CollectTextures("Terrain/Clay/ClayStones*");
            var clayStonesSize          = new Vector2Ushort(2, 2);
            var clayStonesNoiseSelector = new NoiseSelector(
                from: 0.5,
                to: 0.55,
                noise: new PerlinNoise(seed: 642571234,
                                       scale: 5,
                                       octaves: 4,
                                       persistance: 0.9,
                                       lacunarity: 3.9));

            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(clayStonesTextures,
                                           size: clayStonesSize,
                                           offset: (x, y),
                                           noiseSelector: clayStonesNoiseSelector));
                }
            }

            // add clay pit decals
            settings.AddDecal(
                new ProtoTileDecal("Terrain/Clay/ClayPit*",
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.95,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 306721460))));
        }
예제 #4
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Barren")),
                new AmbientSoundPreset(new SoundResource("Ambient/BarrenNight")));

            // ground
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: null));

            // ground with cracks
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: new NoiseSelector(from: 0.4,
                                                     to: 0.7,
                                                     noise: new PerlinNoise(seed: 90230104,
                                                                            scale: 30,
                                                                            octaves: 5,
                                                                            persistance: 0.7,
                                                                            lacunarity: 1.5))));
            // ground with dark "pit" areas
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTextureAtlas3,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: new NoiseSelector(from: 0.4,
                                                     to: 0.7,
                                                     noise: new PerlinNoise(seed: 345734573,
                                                                            scale: 25,
                                                                            octaves: 5,
                                                                            persistance: 0.7,
                                                                            lacunarity: 1.5))));

            // add grey stones decals
            var grayStonesTextures      = ProtoTileDecal.CollectTextures("Terrain/Barren/Stones*");
            var grayStonesSize          = new Vector2Ushort(2, 2);
            var grayStonesNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.63,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 12313213,
                                           scale: 5,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)),
                new NoiseSelector(
                    from: 0.63,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 45435435,
                                           scale: 8,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)));

            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(grayStonesTextures,
                                           size: grayStonesSize,
                                           offset: (x, y),
                                           noiseSelector: grayStonesNoiseSelector));
                }
            }

            // add stick decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/Barren/Stick*",
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.98,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 742646592))));

            // add bush thorn decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/Barren/BushThorns*",
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.98,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 634636172))));
        }
예제 #5
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileForestAmbientSoundProvider(
                daySoundPresetPlains: new AmbientSoundPreset(new SoundResource("Ambient/BorealPlains")),
                daySoundPresetForest: new AmbientSoundPreset(new SoundResource("Ambient/BorealForest")),
                nightSoundPresetPlains: new AmbientSoundPreset(new SoundResource("Ambient/BorealPlainsNight")),
                nightSoundPresetForest: new AmbientSoundPreset(new SoundResource("Ambient/BorealForestNight")));

            var groundTextureForest3 = new ProtoTileGroundTexture(
                texture: GroundTextureAtlas3,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: null);

            var groundTextureForest2 = new ProtoTileGroundTexture(
                texture: GroundTexture2,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: new NoiseSelector(from: 0.5,
                                                 to: 1,
                                                 noise: new PerlinNoise(seed: 392721487,
                                                                        scale: 15,
                                                                        octaves: 5,
                                                                        persistance: 0.6,
                                                                        lacunarity: 1.4)));

            var groundTextureForest1 = new ProtoTileGroundTexture(
                texture: GroundTexture1,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: new NoiseSelector(from: 0.4,
                                                 to: 0.65,
                                                 noise: new PerlinNoise(seed: 498651212,
                                                                        scale: 23,
                                                                        octaves: 5,
                                                                        persistance: 0.5,
                                                                        lacunarity: 1.4)));

            settings.AddGroundTexture(groundTextureForest3);
            settings.AddGroundTexture(groundTextureForest2);
            settings.AddGroundTexture(groundTextureForest1);

            // add smallBushes decals
            var smallBushesTextures      = ProtoTileDecal.CollectTextures("Terrain/ForestBoreal/SmallBushes*");
            var smallBushesDrawOrder     = DrawOrder.GroundDecalsUnder;
            var smallBushesSize          = new Vector2Ushort(2, 2);
            var smallBushesNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.8,
                    to: 0.97,
                    noise: new PerlinNoise(seed: 209123674,
                                           scale: 10,
                                           octaves: 3,
                                           persistance: 0.7,
                                           lacunarity: 1.5)),
                new NoiseSelector(
                    from: 0.85,
                    to: 1,
                    noise: new PerlinNoise(seed: 129308572,
                                           scale: 11,
                                           octaves: 3,
                                           persistance: 0.7,
                                           lacunarity: 3)));

            // add smallBushes decals with a four different offsets (to avoid empty space between neighbor smallBushes sprites)
            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(smallBushesTextures,
                                           size: smallBushesSize,
                                           offset: (x, y),
                                           drawOrder: smallBushesDrawOrder,
                                           canFlipHorizontally: false,
                                           noiseSelector: smallBushesNoiseSelector));
                }
            }

            // some random small bushes
            settings.AddDecal(
                new ProtoTileDecal(smallBushesTextures,
                                   size: smallBushesSize,
                                   drawOrder: smallBushesDrawOrder,
                                   canFlipHorizontally: false,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.85,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 643613342))));

            // add WhiteFlowers decals
            var whiteFlowersTextures      = ProtoTileDecal.CollectTextures("Terrain/ForestBoreal/WhiteFlowers*");
            var whiteFlowersSize          = new Vector2Ushort(2, 2);
            var whiteFlowersNoiseSelector = new NoiseSelector(
                from: 0.6,
                to: 0.65,
                noise: new PerlinNoise(seed: 25343634,
                                       scale: 8,
                                       octaves: 3,
                                       persistance: 0.6,
                                       lacunarity: 1.7));

            settings.AddDecal(
                new ProtoTileDecal(whiteFlowersTextures,
                                   size: whiteFlowersSize,
                                   noiseSelector: whiteFlowersNoiseSelector,
                                   requiredGroundTextures: new[] { groundTextureForest1, groundTextureForest3 }));

            // add the same whiteFlowers but with a little offset (to make a more dense diagonal placement)
            settings.AddDecal(
                new ProtoTileDecal(whiteFlowersTextures,
                                   size: whiteFlowersSize,
                                   offset: Vector2Ushort.One,
                                   noiseSelector: whiteFlowersNoiseSelector,
                                   requiredGroundTextures: new[] { groundTextureForest1, groundTextureForest3 }));

            // add VioletFlowers decals
            var violetFlowersTextures      = ProtoTileDecal.CollectTextures("Terrain/ForestBoreal/VioletFlowers*");
            var violetFlowersSize          = new Vector2Ushort(2, 2);
            var violetFlowersNoiseSelector = new NoiseSelector(
                from: 0.55,
                to: 0.65,
                noise: new PerlinNoise(seed: 245751427,
                                       scale: 5,
                                       octaves: 3,
                                       persistance: 0.6,
                                       lacunarity: 1.7));

            settings.AddDecal(
                new ProtoTileDecal(violetFlowersTextures,
                                   size: violetFlowersSize,
                                   noiseSelector: violetFlowersNoiseSelector));

            // add the same violetFlowers but with a little offset (to make a more dense diagonal placement)
            settings.AddDecal(
                new ProtoTileDecal(violetFlowersTextures,
                                   size: violetFlowersSize,
                                   offset: Vector2Ushort.One,
                                   noiseSelector: violetFlowersNoiseSelector));

            // add clover bush decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/ForestBoreal/CloverBush01*",
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.985,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 982356342))));

            // add fungi decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/ForestBoreal/Fungi01*",
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.985,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 474631892))));
        }
 public void Setup(ProtoTileDecal decal, Vector2Ushort position)
 {
     this.Decal    = decal;
     this.position = position;
     this.Refresh();
 }
예제 #7
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Rocky"),
                                       suppression: 1));

            // rock plates
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: null));

            // small rocks
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSprayRough,
                    noiseSelector: new CombinedNoiseSelector(
                        new NoiseSelector(from: 0.7,
                                          to: 1,
                                          noise: new PerlinNoise(seed: 436234631,
                                                                 scale: 23,
                                                                 octaves: 5,
                                                                 persistance: 0.5,
                                                                 lacunarity: 1.7)),
                        new NoiseSelector(from: 0.4,
                                          to: 0.6,
                                          noise: new PerlinNoise(seed: 623743472,
                                                                 scale: 64,
                                                                 octaves: 5,
                                                                 persistance: 0.5,
                                                                 lacunarity: 1.8)))));

            // add rocks
            settings.AddDecalDoubleWithOffset(
                ProtoTileDecal.CollectTextures("Terrain/Volcanic/VolcanicRocks*"),
                size: (2, 2),
                drawOrder: DrawOrder.GroundDecalsUnder,
                requiresCompleteProtoTileCoverage: true,
                noiseSelector:
                new CombinedNoiseSelector(
                    new NoiseSelector(
                        from: 0.9,
                        to: 1,
                        noise: new WhiteNoise(seed: 236508123)),
                    new NoiseSelector(
                        from: 0.9,
                        to: 1,
                        noise: new WhiteNoise(seed: 824532465))));

            // add large individual bones decals
            settings.AddDecal(
                new ProtoTileDecal("Terrain/Volcanic/VolcanicBones*",
                                   size: (1, 1),
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.995,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 856234981))));

            settings.AddDecal(
                new ProtoTileDecal("Terrain/Volcanic/VolcanicBonesLarge*",
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.995,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 23872153))));
        }
예제 #8
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Rocky"),
                                       suppression: 1));

            // rock plates
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: null));

            // small stones
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSprayRough,
                    noiseSelector: new CombinedNoiseSelector(
                        new NoiseSelector(from: 0.7,
                                          to: 1,
                                          noise: new PerlinNoise(seed: 345435345,
                                                                 scale: 23,
                                                                 octaves: 5,
                                                                 persistance: 0.5,
                                                                 lacunarity: 1.7)),
                        new NoiseSelector(from: 0.4,
                                          to: 0.6,
                                          noise: new PerlinNoise(seed: 1232132131,
                                                                 scale: 64,
                                                                 octaves: 5,
                                                                 persistance: 0.5,
                                                                 lacunarity: 1.8)))));

            // add grey stones decals
            var grayStonesTextures      = ProtoTileDecal.CollectTextures("Terrain/Rocky/GreyStones*");
            var grayStonesSize          = new Vector2Ushort(2, 2);
            var grayStonesNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.63,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 764567465,
                                           scale: 5,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)),
                new NoiseSelector(
                    from: 0.63,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 453443534,
                                           scale: 8,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)));

            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(grayStonesTextures,
                                           size: grayStonesSize,
                                           offset: (x, y),
                                           noiseSelector: grayStonesNoiseSelector));
                }
            }

            // add red grass decals
            var redGrassTextures      = ProtoTileDecal.CollectTextures("Terrain/Rocky/RedGrass*");
            var redGrassSize          = new Vector2Ushort(2, 2);
            var redGrassHidingSetting = DecalHidingSetting.AnyObject;
            var redGrassDrawOrder     = DrawOrder.GroundDecalsOver;
            var redGrassNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(from: 0.92,
                                  to: 1,
                                  noise: new PerlinNoise(seed: 534543534,
                                                         scale: 5,
                                                         octaves: 3,
                                                         persistance: 0.5,
                                                         lacunarity: 1.7)),
                new NoiseSelector(from: 0.92,
                                  to: 1,
                                  noise: new PerlinNoise(seed: 234234234,
                                                         scale: 5,
                                                         octaves: 3,
                                                         persistance: 0.5,
                                                         lacunarity: 1.7)));

            settings.AddDecal(
                new ProtoTileDecal(redGrassTextures,
                                   size: redGrassSize,
                                   noiseSelector: redGrassNoiseSelector,
                                   hidingSetting: redGrassHidingSetting,
                                   drawOrder: redGrassDrawOrder));

            // add the same redGrass but with a little offset (to make a more dense diagonal placement)
            settings.AddDecal(
                new ProtoTileDecal(redGrassTextures,
                                   size: redGrassSize,
                                   offset: Vector2Ushort.One,
                                   noiseSelector: redGrassNoiseSelector,
                                   hidingSetting: redGrassHidingSetting,
                                   drawOrder: redGrassDrawOrder));
        }
예제 #9
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileForestAmbientSoundProvider(
                daySoundPresetPlains: new AmbientSoundPreset(new SoundResource("Ambient/TropicalPlains")),
                daySoundPresetForest: new AmbientSoundPreset(new SoundResource("Ambient/TropicalForest")),
                nightSoundPresetPlains: new AmbientSoundPreset(new SoundResource("Ambient/TropicalPlainsNight")),
                nightSoundPresetForest: new AmbientSoundPreset(new SoundResource("Ambient/TropicalForestNight")));

            var groundTextureForest3 = new ProtoTileGroundTexture(
                texture: GroundTextureAtlas3,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: null);

            var groundTextureForest2 = new ProtoTileGroundTexture(
                texture: GroundTexture2,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: new NoiseSelector(from: 0.5,
                                                 to: 0.7,
                                                 noise: new PerlinNoise(seed: 23402375,
                                                                        scale: 4,
                                                                        octaves: 5,
                                                                        persistance: 0.6,
                                                                        lacunarity: 1.8)));

            var groundTextureForest1 = new ProtoTileGroundTexture(
                texture: GroundTexture1,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: new NoiseSelector(from: 0.4,
                                                 to: 0.55,
                                                 noise: new PerlinNoise(seed: 219461235,
                                                                        scale: 5,
                                                                        octaves: 5,
                                                                        persistance: 0.6,
                                                                        lacunarity: 1.6)));

            settings.AddGroundTexture(groundTextureForest3);
            settings.AddGroundTexture(groundTextureForest2);
            settings.AddGroundTexture(groundTextureForest1);

            // add JungleGrass1 decal
            var jungleGrass1Textures      = ProtoTileDecal.CollectTextures("Terrain/ForestTropical/JungleGrass1_*");
            var jungleGrass1NoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.5,
                    to: 0.57,
                    noise: new PerlinNoise(seed: 75432132,
                                           scale: 5,
                                           octaves: 5,
                                           persistance: 0.8,
                                           lacunarity: 2)),
                new NoiseSelector(
                    from: 0.73,
                    to: 0.8,
                    noise: new PerlinNoise(seed: 1232165326,
                                           scale: 7,
                                           octaves: 5,
                                           persistance: 0.8,
                                           lacunarity: 2)));

            settings.AddDecal(
                new ProtoTileDecal(jungleGrass1Textures,
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: jungleGrass1NoiseSelector));

            settings.AddDecal(
                new ProtoTileDecal(jungleGrass1Textures,
                                   size: (2, 2),
                                   offset: (1, 1),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: jungleGrass1NoiseSelector));

            // add JungleGrass2 decal
            var jungleGrass2Textures      = ProtoTileDecal.CollectTextures("Terrain/ForestTropical/JungleGrass2_*");
            var jungleGrass2NoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.5,
                    to: 0.57,
                    noise: new PerlinNoise(seed: 634231492,
                                           scale: 5,
                                           octaves: 5,
                                           persistance: 0.8,
                                           lacunarity: 2)),
                new NoiseSelector(
                    from: 0.73,
                    to: 0.8,
                    noise: new PerlinNoise(seed: 19831263,
                                           scale: 7,
                                           octaves: 5,
                                           persistance: 0.8,
                                           lacunarity: 2)));

            settings.AddDecal(
                new ProtoTileDecal(jungleGrass2Textures,
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: jungleGrass2NoiseSelector));

            settings.AddDecal(
                new ProtoTileDecal(jungleGrass2Textures,
                                   size: (2, 2),
                                   offset: (1, 1),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: jungleGrass2NoiseSelector));

            // add fern decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/ForestTropical/Fern*",
                                   size: (1, 1),
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 854712138)),
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 907512642)),
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 893146123)))));

            // add flower decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/ForestTropical/JungleFlower*",
                                   size: (1, 1),
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 654352413)),
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 219301646)),
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 1283912642)),
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 1283917341)),
                                       new NoiseSelector(
                                           from: 0.99,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 858366412)))));
        }
예제 #10
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileForestAmbientSoundProvider(
                daySoundPresetPlains: new AmbientSoundPreset(new SoundResource("Ambient/TemperatePlains")),
                daySoundPresetForest: new AmbientSoundPreset(new SoundResource("Ambient/TemperateForest")),
                nightSoundPresetPlains: new AmbientSoundPreset(new SoundResource("Ambient/TemperatePlainsNight")),
                nightSoundPresetForest: new AmbientSoundPreset(new SoundResource("Ambient/TemperateForestNight")));

            // add ground texture for pebbles ground
            var groundTextureForest3 = new ProtoTileGroundTexture(
                texture: GroundTextureAtlas3,
                blendMaskTexture: BlendMaskTextureSprayRough,
                noiseSelector: null);

            settings.AddGroundTexture(groundTextureForest3);

            // add ground texture for dry leaves
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureSprayRough,
                    noiseSelector: new NoiseSelector(from: 0.5,
                                                     to: 1,
                                                     noise: new PerlinNoise(seed: 2010709225,
                                                                            scale: 15,
                                                                            octaves: 5,
                                                                            persistance: 0.6,
                                                                            lacunarity: 1.4))));

            // add ground texture for dry twigs
            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSprayRough,
                    noiseSelector: new NoiseSelector(from: 0.4,
                                                     to: 0.65,
                                                     noise: new PerlinNoise(seed: 1059426846,
                                                                            scale: 23,
                                                                            octaves: 5,
                                                                            persistance: 0.5,
                                                                            lacunarity: 1.4))));
            // add moss decals
            var mossTextures      = ProtoTileDecal.CollectTextures("Terrain/ForestTemperate/Moss*");
            var mossDrawOrder     = DrawOrder.GroundDecalsUnder;
            var mossSize          = new Vector2Ushort(2, 2);
            var mossNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.8,
                    to: 0.97,
                    noise: new PerlinNoise(seed: 1298138103,
                                           scale: 10,
                                           octaves: 3,
                                           persistance: 0.7,
                                           lacunarity: 1.5)),
                new NoiseSelector(
                    from: 0.85,
                    to: 1,
                    noise: new PerlinNoise(seed: 38602111,
                                           scale: 11,
                                           octaves: 3,
                                           persistance: 0.7,
                                           lacunarity: 3)));

            // add moss decals with a four different offsets (to avoid empty space between neighbor moss sprites)
            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(mossTextures,
                                           size: mossSize,
                                           offset: (x, y),
                                           drawOrder: mossDrawOrder,
                                           noiseSelector: mossNoiseSelector));
                }
            }

            // some random moss
            settings.AddDecal(
                new ProtoTileDecal(mossTextures,
                                   size: mossSize,
                                   drawOrder: mossDrawOrder,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.85,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 306721460))));

            // add clover decals
            var cloverTextures      = ProtoTileDecal.CollectTextures("Terrain/ForestTemperate/GrassClover*");
            var cloverSize          = new Vector2Ushort(2, 2);
            var cloverNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.5,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 503902084,
                                           scale: 5,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)),
                new NoiseSelector(
                    from: 0.55,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 1884332513,
                                           scale: 8,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)));

            settings.AddDecal(
                new ProtoTileDecal(cloverTextures,
                                   size: cloverSize,
                                   noiseSelector: cloverNoiseSelector));

            // add the same clover but with a little offset (to make a more dense diagonal placement)
            settings.AddDecal(
                new ProtoTileDecal(cloverTextures,
                                   size: cloverSize,
                                   offset: (1, 1),
                                   noiseSelector: cloverNoiseSelector));

            // add bush decal
            settings.AddDecal(
                new ProtoTileDecal("Terrain/ForestTemperate/BushGreen*",
                                   size: (1, 1),
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.975,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 1092163963))));
        }
예제 #11
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Swamp")),
                new AmbientSoundPreset(new SoundResource("Ambient/SwampNight")));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexturePrimary,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: null));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTextureOverlay,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector:
                    new NoiseSelector(
                        from: 0.75,
                        to: 1,
                        new WhiteNoise(21893823))));

            // add moss decals
            settings.AddDecalDoubleWithOffset(
                ProtoTileDecal.CollectTextures("Terrain/Swamp/SwampMoss*"),
                size: new Vector2Ushort(2, 2),
                drawOrder: DrawOrder.GroundDecals,
                canFlipHorizontally: false,
                noiseSelector: new NoiseSelector(
                    from: 0.8,
                    to: 1,
                    noise: new WhiteNoise(seed: 219832163)));

            // some random small grass
            settings.AddDecalDoubleWithOffset(
                ProtoTileDecal.CollectTextures("Terrain/Swamp/SwampGrass*"),
                size: (1, 1),
                drawOrder: DrawOrder.GroundDecalsOver,
                noiseSelector: new NoiseSelector(
                    from: 0.77,
                    to: 1,
                    noise: new WhiteNoise(seed: 1459921236)));

            // some random small bushes
            settings.AddDecalDoubleWithOffset(
                ProtoTileDecal.CollectTextures("Terrain/Swamp/SwampBush*"),
                size: (1, 1),
                interval: (2, 2),
                drawOrder: DrawOrder.GroundDecalsOver,
                noiseSelector: new NoiseSelector(
                    from: 0.5,
                    to: 1,
                    noise: new WhiteNoise(seed: 975129352)));

            // some random fungi
            settings.AddDecal(
                new ProtoTileDecal(ProtoTileDecal.CollectTextures("Terrain/Swamp/SwampFungi*"),
                                   size: (1, 1),
                                   offset: (1, 1),
                                   interval: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   noiseSelector: new NoiseSelector(
                                       from: 0.6,
                                       to: 1,
                                       noise: new WhiteNoise(seed: 346223467))));

            // add branch decals
            settings.AddDecalDoubleWithOffset(
                ProtoTileDecal.CollectTextures("Terrain/Swamp/SwampBranch*"),
                size: (1, 1),
                interval: (2, 2),
                drawOrder: DrawOrder.GroundDecals,
                noiseSelector: new NoiseSelector(
                    from: 0.65,
                    to: 1,
                    noise: new WhiteNoise(seed: 754374734)));
        }
예제 #12
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Ruins"),
                                       suppression: 1));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSprayStraightSmooth,
                    noiseSelector: null));

            // add bricks decals
            var bricksTextures      = ProtoTileDecal.CollectTextures("Terrain/Ruins/Bricks*");
            var bricksSize          = new Vector2Ushort(2, 2);
            var bricksNoiseSelector = new CombinedNoiseSelector(
                new NoiseSelector(
                    from: 0.63,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 324921396,
                                           scale: 5,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)),
                new NoiseSelector(
                    from: 0.63,
                    to: 0.65,
                    noise: new PerlinNoise(seed: 324534534,
                                           scale: 8,
                                           octaves: 3,
                                           persistance: 0.6,
                                           lacunarity: 1.7)));

            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(bricksTextures,
                                           size: bricksSize,
                                           offset: (x, y),
                                           noiseSelector: bricksNoiseSelector));
                }
            }

            // add various single tile garbage decals
            settings.AddDecal(
                new ProtoTileDecal(ProtoTileDecal.CollectTextures("Terrain/Ruins/Bottle*"),
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.985,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 69435135)))));

            settings.AddDecal(
                new ProtoTileDecal(ProtoTileDecal.CollectTextures(
                                       "Terrain/Ruins/Bag*",
                                       "Terrain/Ruins/Cardboard*",
                                       "Terrain/Ruins/Tube*",
                                       "Terrain/Ruins/Tubes*"),
                                   // actually the size is 1x1 but we don't want them to spawn nearby
                                   size: Vector2Ushort.One,
                                   drawOrder: DrawOrder.GroundDecalsOver,
                                   hidingSetting: DecalHidingSetting.AnyObject,
                                   noiseSelector: new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.97,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 73453423)),
                                       new NoiseSelector(
                                           from: 0.98,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 12983622)))));
        }
예제 #13
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                daySoundPreset: new AmbientSoundPreset(new SoundResource("Ambient/Meadows")),
                nightSoundPreset: new AmbientSoundPreset(new SoundResource("Ambient/MeadowsNight")));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureSprayRough,
                    noiseSelector: null));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture2,
                    blendMaskTexture: BlendMaskTextureSprayRough,
                    noiseSelector: new NoiseSelector(from: 0.3,
                                                     to: 0.65,
                                                     noise: new PerlinNoise(seed: 1625285324,
                                                                            scale: 14,
                                                                            octaves: 5,
                                                                            persistance: 0.6,
                                                                            lacunarity: 1.45))));

            // add plants decals
            AddDecalDoubleWithOffset(
                settings,
                ProtoTileDecal.CollectTextures("Terrain/Meadows/MeadowPlants*"),
                size: (2, 2),
                drawOrder: DrawOrder.GroundDecalsUnder,
                noiseSelector: new CombinedNoiseSelector(
                    // pattern like ways
                    new NoiseSelector(
                        from: 0.5,
                        to: 0.65,
                        noise: new PerlinNoise(seed: 123729123,
                                               scale: 5,
                                               octaves: 3,
                                               persistance: 0.6,
                                               lacunarity: 1.7)),
                    // pattern like ways
                    new NoiseSelector(
                        from: 0.55,
                        to: 0.65,
                        noise: new PerlinNoise(seed: 742572457,
                                               scale: 8,
                                               octaves: 3,
                                               persistance: 0.6,
                                               lacunarity: 1.7)),
                    // random pattern
                    new NoiseSelector(
                        from: 0.9,
                        to: 1,
                        noise: new WhiteNoise(seed: 1238127464))));

            // add chamomile decals
            AddDecalDoubleWithOffset(
                settings,
                ProtoTileDecal.CollectTextures("Terrain/Meadows/Chamomile*"),
                size: (2, 2),
                noiseSelector: new NoiseSelector(
                    from: 0.85,
                    to: 1,
                    noise: new PerlinNoise(seed: 829895415,
                                           scale: 6,
                                           octaves: 4,
                                           persistance: 0.3,
                                           lacunarity: 1.2)));

            // add flowers decals
            AddDecalDoubleWithOffset(
                settings,
                ProtoTileDecal.CollectTextures("Terrain/Meadows/YellowFlowers*"),
                size: (2, 2),
                noiseSelector: new CombinedNoiseSelector(
                    new NoiseSelector(
                        from: 0.63,
                        to: 0.65,
                        noise: new PerlinNoise(seed: 457218345,
                                               scale: 5,
                                               octaves: 3,
                                               persistance: 0.6,
                                               lacunarity: 1.7)),
                    new NoiseSelector(
                        from: 0.63,
                        to: 0.65,
                        noise: new PerlinNoise(seed: 243492398,
                                               scale: 8,
                                               octaves: 3,
                                               persistance: 0.6,
                                               lacunarity: 1.7))));
        }
예제 #14
0
        protected override void PrepareProtoTile(Settings settings)
        {
            settings.AmbientSoundProvider = new TileAmbientSoundProvider(
                new AmbientSoundPreset(new SoundResource("Ambient/Pit")));

            settings.AddGroundTexture(
                new ProtoTileGroundTexture(
                    texture: GroundTexture1,
                    blendMaskTexture: BlendMaskTextureGeneric2Smooth,
                    noiseSelector: null));

            // add formations decals
            var formationsTextures      = ProtoTileDecal.CollectTextures("Terrain/SaltFlats/SaltFlatsFormations01*");
            var formationsSize          = new Vector2Ushort(2, 2);
            var formationsNoiseSelector = new NoiseSelector(
                from: 0.5,
                to: 0.58,
                noise: new PerlinNoise(seed: 470398528,
                                       scale: 5,
                                       octaves: 4,
                                       persistance: 0.9,
                                       lacunarity: 3.9));

            for (ushort x = 0; x <= 1; x++)
            {
                for (ushort y = 0; y <= 1; y++)
                {
                    settings.AddDecal(
                        new ProtoTileDecal(formationsTextures,
                                           size: formationsSize,
                                           offset: (x, y),
                                           noiseSelector: formationsNoiseSelector));
                }
            }

            // add pothole decals
            settings.AddDecal(
                new ProtoTileDecal("Terrain/SaltFlats/SaltFlatsPothole*",
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecals,
                                   noiseSelector: new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.97,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 901267462)),
                                       new NoiseSelector(
                                           from: 0.97,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 68091273)))));

            // add gully decals
            settings.AddDecal(
                new ProtoTileDecal(ProtoTileDecal.CollectTextures("Terrain/SaltFlats/SaltFlatsGully*"),
                                   size: (2, 2),
                                   drawOrder: DrawOrder.GroundDecalsUnder,
                                   noiseSelector: new CombinedNoiseSelector(
                                       new NoiseSelector(
                                           from: 0.98,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 981461233)),
                                       new NoiseSelector(
                                           from: 0.98,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 598236742)),
                                       new NoiseSelector(
                                           from: 0.98,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 98347443)),
                                       new NoiseSelector(
                                           from: 0.98,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 1324234897)),
                                       new NoiseSelector(
                                           from: 0.98,
                                           to: 1,
                                           noise: new WhiteNoise(seed: 324643342)))));
        }