Code: Select all
git clone -b valleys_c --single-branch https://github.com/duane-r/valleys_c.git;
I'm pretty new in this things, I guess the compiler is from build-essential and there g++ and gcc?
Code: Select all
git clone -b valleys_c --single-branch https://github.com/duane-r/valleys_c.git;
You're getting the CaveV7plus issue too... Well, the easiest way to take care of that is to revert the cavegen files, which I've just done. Try it now.Xanthin wrote:I got the same error yesterday after it hit 100%. I tried it on Lubuntu 14.04, using the one-line-script (with run_in_place) just with
Code: Select all
git clone -b valleys_c --single-branch https://github.com/duane-r/valleys_c.git;
I'm pretty new in this things, I guess the compiler is from build-essential and there g++ and gcc?
Code: Select all
git clone -b valleys_c --single-branch https://github.com/duane-r/minetest.git
The ubuntus are using 5.2.1. Even my Debian stable is up to 4.9.2. If anyone is still using 4.8, they might want to consider upgrading.Ivà wrote:As far as I know, gcc-4.8 throw the errors above but gcc-4.9 is ok. I don't know why anyway, sorry.
Ubuntu LTS and Linux Mint are still on 4.8.2. You must install explicitly the gcc-4.9-base package to get the 4.9.1 version.duane wrote:The ubuntus are using 5.2.1. Even my Debian stable is up to 4.9.2. If anyone is still using 4.8, they might want to consider upgrading.Ivà wrote:As far as I know, gcc-4.8 throw the errors above but gcc-4.9 is ok. I don't know why anyway, sorry.
Now that's conservative.Ivà wrote:Ubuntu LTS and Linux Mint are still on 4.8.2. You must install explicitly the gcc-4.9-base package to get the 4.9.1 version.
It should be pretty much the same, except that I removed as many 3D noises as I could. This is the actual terrain building code, complete with your comments:Gael de Sailly wrote:What have you changed precisely ? (just to know, you can merge it in the core anyway :) )
Code: Select all
float MapgenValleys::baseGroundFromNoise(s16 x, s16 z, float valley_depth, float terrain_height, float *rivers, float valley_profile, float inter_valley_slope, float *valley, float inter_valley_fill, float cliffs, float corr)
{
// The square function changes the behaviour of this noise:
// very often small, and sometimes very high.
float valley_d = pow(valley_depth, 2);
// valley_d is here because terrain is generally higher where valleys
// are deep (mountains). base represents the height of the
// rivers, most of the surface is above.
float base = terrain_height + valley_d;
// "river" represents the distance from the river, in arbitrary units.
float river = fabs(*rivers) - river_size;
*rivers = -31000;
// Use the curve of the function 1−exp(−(x/a)²) to model valleys.
// Making "a" vary (0 < a ≤ 1) changes the shape of the valleys.
// Try it with a geometry software !
// (here x = "river" and a = valley_profile).
// "valley" represents the height of the terrain, from the rivers.
*valley = valley_d * (1 - exp(- pow(river / valley_profile, 2)));
// approximate height of the terrain at this point
float mount = base + *valley;
float slope = *valley * inter_valley_slope;
// Rivers are placed where "river" is negative, so where the original
// noise value is close to zero.
if (river < 0) {
// Use the the function −sqrt(1−x²) which models a circle.
float depth = (river_depth * sqrt(1 - pow((river / river_size + 1), 2))) + 1;
*rivers = base;
// base - depth : height of the bottom of the river
// water_level - 2 : don't make rivers below 2 nodes under the surface
mount = fmin(fmax(base - depth, water_level - 2), mount);
// Slope has no influence on rivers.
slope = 0;
}
// The penultimate step builds up the heights, but we reduce it
// occasionally to create cliffs.
float delta = sin(inter_valley_fill) * slope;
if (delta != 0) {
if ((spflags & MG_VALLEYS_CLIFFS) && cliffs < 0.2)
mount += delta;
else
mount += delta * 0.66;
// Use yet another noise to make the mountains look more rugged.
if ((spflags & MG_VALLEYS_RUGGED) && mount > water_level && fabs(inter_valley_slope * inter_valley_fill) < 0.3)
mount += (delta / fabs(delta)) * pow(fabs(delta), 0.5) * fabs(sin(corr));
}
return mount;
}
I haven't really done any villages. I just put some lua in the support project to make random house schematics that get planted as decorations. They show up in ridiculous places sometimes, like hanging over a cliff.kaadmy wrote:How are villages done for the terrain?
Just pulled your branch and noticed:duane wrote:I haven't given up on getting Valleys C into the codebase, but it's still proving to be a challenge. Here are some screenshots of my latest attempts.
Thanks for the comments.sofar wrote:Just pulled your branch and noticed:
seed: 17472738859635311922
- spawn was quite deep under ground. I'm assuming you haven't paid attention to the spawn position yet.
- floating islands at y+=128, lots of them, clearly disjoint but related to the nearby high topography
- some cut-off trees (topside) suggesting chunks didn't properly finish generating
- lack of flat plains, could just be the seed (I travelled 4km or so +/-)
- could use some more water lilies in some of the near-water biomes, they're really quite rare as well
other than that, appears to work well and fast!
ok, I switched to valleys_c branch and that looks slightly different now (same seed)duane wrote: Make sure you're using the valleys_c branch. I'm going to delete the merge branch, just to avoid confusion. I haven't had any spawn problems since I updated the *AtPoint functions a few hours ago, but I'll check it.
The floating islands are there in the original lua too (in the exact same places). If there's a way of getting rid of them without getting rid of the nice mountains, I don't know it. Of course that's what I did with the fast flag option, but it lacks the character of the original
I want to keep the fast flag. I kind of like the terrain it generates, and it is about 25% faster so far. The simple caves were my take on your Intersecting mod, of course, and they're very light-weight.paramat wrote:Don't bother with the fast flag, if this 3D terrain noise is coded correctly it won't have much impact on mapgen speed, also the surface terrain should be faithful to the lua version and be interesting, however i agree the c++ version needs simple caves using 2 3D noises instead of 5. Am i right in thinking the current c++ cave code is your own duane? it looks fine to me.
Also, the c++ version should perhaps have a larger scale river noise than the original (noise 2 has spread 256 and 5 octaves, this creates small river systems with small river loops), however that can be tuned later when we set the default noise parameters.
Users browsing this forum: No registered users and 15 guests