This is my first foray into game programming. I am using Monogame (XNA replacement).
I have begun playing around with a 2d map generator (Think Terraria) and have started off with generating the initial map using the Voronoi method. This is working successfully so far as a prototype. I'm currently just outputting the map as an array of ASCII characters to represent a material or biome type. Example: % = Granite, @ = Dirt etc.
I now want to be able to randomly create 'seams' of different material in this map, given a start and endpoint (x,y), magnitude, and a varying thickness of the material and to make the line of material change direction to a certain degree, especially if it is quite long.
Example map. What I am trying to achieve is represented by the letter 'G', 'S' and 'E' are start and endpoints (You may have to scroll the code view to the right)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoo%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%GGEG%%%%%%%%%%%
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxooo%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%GGG%%%%%%%%%%%%%
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoooo%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%GGGGG%%%%%%%%%%%%%%
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxooooo%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%GGGG%%%%%%%%%%%%%
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxooooo%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%GGG%%%%%%%%%%%%%%%%
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoooooo%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%GGG%%%%%%%%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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Setting the start and endpoints is easy enough but doing the rest eludes me. I've had disappointing results when writing code that simply decrements the y value by one, and then randomly decreasing/increasing x by 1 (With bias on a direction based on if the end position is left or right of start point) and changing the material at that point.
The above method I am using also doesn't work if the start and end are horizontal.
The aim is to pre-generate as much of the map as possible using a large 2-dimensional array which will then be used for placing the correct block material. The array will only be used at the start of the game world.
P.S. If anyone also has advice regarding the way I am going about generating a starting map please feel free to let me know if I'm to avoid generating the map as an array of ASCII chars :-)