Some semi-random thoughts on terrain generation
I made an attempt for an new foliage finisher. Do you think this is the way to do it or should it be done differently? I myself am pretty pleased with the first result (even though it only generates tall grass for now).


Attached Files Thumbnail(s)
   
Reply
Thanks given by:
Tall grass generating may use a different finisher than all the other foliage. Usually there should be rather uniform distribution of tall grass, while all the other foliage blocks would be better in clumps (like in the Nether clump foliage generator). For tall grass, a simple per-block noise value with a threshold should be enough. So which one did you do?
Reply
Thanks given by:
if (m_Noise.CubicNoise2D((float) xx + m_Noise.CubicNoise1D(xx), zz + m_Noise.CubicNoise1D(zz)) < GetBiomeDensity(a_ChunkDesc.GetBiome(x, z)))

but I want a clump generator for the flowers and mushrooms. But that's going to be pretty difficult(or long code) since flowers are now per-biome.
Reply
Thanks given by:
I'd recommend splitting these two. Name this one TallGrass and add it already; then make another one, ClumpFoliage, and do only flowers / mushrooms with it.

As for the per-biome settings, simply use the biome at the center of the clump to decide which block to generate, from a per-biome list of allowed blocks. Should be simple enough Smile
Reply
Thanks given by:
Ok that does seem to be the best option. I still have to add long tall grass though so I'll do that first.
EDIT:
But what about the sugar cane then?
Reply
Thanks given by:
Sugar canes are special, they need special placement, so yet another finisher.
Reply
Thanks given by:
I was thinking. Maybe we could create group finishers. For example "Vanilla" will create a cFinishGenWormNest, Trees, MineShafts, TallGrass etc.
EDIT:
Oh and I also create a pull request for the TallGrass finisher.
Reply
Thanks given by:
What about when we implement a new finisher that's closer to vanilla than what we currently have? Such as when you've now added the tall grass finisher. Should the group change, or not? Neither is a good solution.
Reply
Thanks given by:
I have created a super-simple super-fast algorithm for creating wiggly lines like these:
[Image: roughravines.png]
Do you think these would be good as ravines? They would probably look nothing like vanilla, but on the other hand they might look cool as our own feature Smile
Reply
Thanks given by:
Btw this is the (Delphi) code used to generate one such line:
procedure SubdivideLine(bmp: TBitmap; pt1, pt2: TPoint; Color: TColor);
var
	MidPt: TPoint;
	dx, dy: integer;
begin
	MidPt.X := (pt1.X + pt2.X) div 2;
	MidPt.Y := (pt1.Y + pt2.Y) div 2;
	dx := pt2.x - pt1.x;
	dy := pt2.Y - pt1.Y;
	MidPt.X := MidPt.x + dy div 5;
	MidPt.y := MidPt.Y - dx div 5;
	bmp.Canvas.Pixels[MidPt.x, MidPt.Y] := Color;
	if ((abs(dx) > 2) or (abs(dy) > 2)) then
	begin
		if (((random(255)) mod 2) = 0) then
			SubdivideLine(bmp, pt1, MidPt, Color)
		else
			SubdivideLine(bmp, MidPt, pt1, Color);
		SubdivideLine(bmp, pt2, MidPt, Color);
	end
end;

SubdivideLine(bmp, Point(100, 150), Point(800, 150), $ff);
Reply
Thanks given by:




Users browsing this thread: 21 Guest(s)