Example #1
0
        public Planet(float radial_distance)
        {
            this.radial_distance = radial_distance;
            noisemodule = new Simplex();
            noise = new SharpNoise.Models.Sphere(noisemodule);
            equator_noise = new SharpNoise.Models.Line(noisemodule);
            equator_noise.Attenuate = true;
            equator_noise.SetStartPoint(0, 0, 0);
            equator_noise.SetEndPoint(360, 0, 0);

            float circumference = radial_distance * MathHelper.Pi;
            float blocks_around_circumference = circumference / 70;

            height_step = (float)(circumference / blocks_around_circumference * 2);

            int chunk_count = 2 * (int)Math.Round(blocks_around_circumference / (MineGame.chunk_size * 2));
            int block_count = chunk_count * MineGame.chunk_size;
            step = 360.0f / block_count;
            int total = block_count * (block_count / 2);
            chunks_latitude = chunk_count / 2;
            chunks_longitude = chunk_count ;
        }
Example #2
0
 public World()
 {
     this.noisemodule = new Simplex();
     this.p =  new SharpNoise.Models.Plane(noisemodule);
 }