Tutorial: Map Generator - Complete Landscapes

This is the last part of the tutorial, in which complete landscapes will be discussed. After having completed this tutorial you should be fully equipped to generate dynamic maps yourself. Creating a complete landscape requires much more effort than writing a few lines of map generator code. The three examples in this part show a strategy on how to tackle the problems involved when creating maps suitable for an actual scenario.

Gold Mine

// Fills an overlay with random specks.
overlay RandomMat {
	algo=rndchecker; a=6;
	zoomX=-60; zoomY=-60;
	turbulence=100; lambda=3;
	loosebounds=1;
};

map Goldmine {
	// Use the sine algorithm for some small hills.
	overlay {
		mat=Earth; tex=earth;
		algo=sin;
		zoomX=40; zoomY=-100;
		ox=20; oy=40;
		// Use the rndchecker algorithm for some materials in the earth.
		RandomMat { mat=Earth; tex=earth_rough; };
		RandomMat { mat=Earth; tex=earth_dry; };
		RandomMat { mat=Ore; tex=ore; };
		RandomMat { mat=Coal; tex=coal; };
		RandomMat { mat=Sulphur; tex=sulphur; };
		RandomMat { mat=Gold; tex=gold; };
		RandomMat { mat=Rock; tex=rock_cracked; zoomX=-80; zoomY=-80; };
		// No materials on the surface.
		overlay {
			algo=border; a=2; b=2;
			mat=Earth; tex=earth;		
		};
	};
};

Iron Peak

Imagine we want to create a scenario where the player is required to extract all ore from the earth - also known as ore mine. As ore mine usually is a simple goal the landscape should provide the challenge, therefore we'd like to create a mountain peak. For some added difficulty we may add blizzards in script, therefore we imagine the peak at such an altitude that snow and ice appear naturally. We extend the map size from our standard 1000x1000 pixels to 1000x2000 pixels such that it is two times higher and we really have a peak. So the first design decision we make is that both the top and bottom of the map are open and that the peak should cover about 2/3 of the bottom and should end somewhere just below the top. To allow some methods of settlement to the player the shape of the peak should not be just a straight-lined triangle, but rather shaped more roughly. The outside of the peak should mainly consist of rock granite and ice, maybe with some minor entrances - read tunnel material - to the inside. The inside should contain all kinds of materials, amongst them at least ore, coal, sulphur, ice and rock.

The best strategy is to concern ourselves with the basic shape of the peak itself first and then constructing the out and insides.

overlay RandomMat {
	algo=rndchecker; a=8;
	zoomX=-50; zoomY=-50;
	turbulence=100;
	loosebounds=1;
};

map ExampleIronPeak {
	overlay {
		algo=poly;
		point { x=15%; y=100%; };
		point { x=47%; y=5%; };
		point { x=53%; y=5%; };
		point { x=85%; y=100%; };
		turbulence=100; lambda=2;
		mat=Earth; tex=earth;
		RandomMat { mat=Ore; tex=ore; a=12; };
		RandomMat { mat=Coal; tex=coal; a=12; };
		RandomMat { mat=Ice; tex=ice3; a=16; };
		RandomMat { mat=Tunnel; tex=tunnel; a=20; };	
		RandomMat { mat=Rock; tex=rock_cracked; };
		overlay {
			algo=border; a=5; b=5;
			mat=Rock; tex=rock;
			RandomMat { mat=Granite; tex=granite; a=12; };
			RandomMat { mat=Ice; tex=ice3; a=16; };
			RandomMat { mat=Tunnel; tex=tunnel; };	
			RandomMat { mat=Rock; tex=rock_cracked; };
		};
	}; 
};

Volcano

Exercise: Be Creative!

Now it's your turn to be creative, as your knowledge about the map generator is complete. The reason you worked your way through this sequence of tutorials is probably that you wanted to create your own dynamic landscapes. So this is not really an exercise but rather a invitation to create a dynamic landscape yourself. And most importantly to share your creation here, where user created landscapes are compiled. The landscapes there should be considered objects of study or inspiration for future landscape designers.

Summary

Congratulations! Now you know everything about the map generator. So please enrich the community with many dynamically landscaped scenarios.