I like it. I always have some ambient sound mod installed and its weird to hear birds but not see any at all. This fixes that well enough.
I made a couple tweaks to reduce the spawn rate of swarms. Too often, my skies would get unrealistically crowded, and so many moving shadows on the ground was distracting. Also, doubled the despawn distance, so they just fade nicely into the fog, instead of harshly popping off screen. This also improved performance.
What I'd like to see, is more variation in spawn altitude, and the ability for them to change altitude & direction, so they can actually fly around. I just don't know LUA well enough to contribute that much yet.
Also, just noticed a bug where birds can spawn with 0 (or near 0) velocity. They seem to eventually despawn anyway, but it is odd.
I made a couple tweaks to reduce the spawn rate of swarms
That 10 is "maximum size of a swarm - 1" because of the leading bird. Your swarms will be smaller but there will still be 100 birds in the sky. (see line 238) I'll might add a setting for it in the next version.
What I'd like to see, is more variation in spawn altitude,
I don't think that's a good idea. They might end up spawning in some larger building. I could make spawn height configurable though.
and the ability for them to change altitude, so they can actually fly around.
I might do that.
Also, just noticed a bug where birds can spawn with 0 velocity.
I think I had that too. It's weird because the math seems solid. Might have something to do with how the activation of the object is done.
This also improved performance.
It does because they are only rendered until a certain distance iirc. No different to reducing the spawn amount of birds.
@shaft Yeah, spawning in buildings would be frustrating but also, I don't think this engine has a build height limit? People like to build crazy things, and as it is, you'd have to, if you wanted to farm the birds. Perhaps the Minetest API has a way to tell if a given position is enclosed? Or maybe fire a ray upward from the lead bird, depending on the performance cost.
Also, after re-reading my OP, I realized I meant to say they should change altitude AND direction....I edited it to reflect.
I think what improved performance the most, was reducing the swarm size. I thought I had gotten the right line but I misread the code....I'm a Python & C programmer. LUA is quite foreign to me. Going to adjust the correct line and see what happens.
I like it. I always have some ambient sound mod installed and its weird to hear birds but not see any at all. This fixes that well enough.
I made a couple tweaks to reduce the spawn rate of swarms. Too often, my skies would get unrealistically crowded, and so many moving shadows on the ground was distracting. Also, doubled the despawn distance, so they just fade nicely into the fog, instead of harshly popping off screen. This also improved performance.
What I'd like to see, is more variation in spawn altitude, and the ability for them to change altitude & direction, so they can actually fly around. I just don't know LUA well enough to contribute that much yet.
Also, just noticed a bug where birds can spawn with 0 (or near 0) velocity. They seem to eventually despawn anyway, but it is odd.
Thank you for your review.
That 10 is "maximum size of a swarm - 1" because of the leading bird. Your swarms will be smaller but there will still be 100 birds in the sky. (see line 238) I'll might add a setting for it in the next version.
I don't think that's a good idea. They might end up spawning in some larger building. I could make spawn height configurable though.
I might do that.
I think I had that too. It's weird because the math seems solid. Might have something to do with how the activation of the object is done.
It does because they are only rendered until a certain distance iirc. No different to reducing the spawn amount of birds.
@shaft Yeah, spawning in buildings would be frustrating but also, I don't think this engine has a build height limit? People like to build crazy things, and as it is, you'd have to, if you wanted to farm the birds. Perhaps the Minetest API has a way to tell if a given position is enclosed? Or maybe fire a ray upward from the lead bird, depending on the performance cost.
Also, after re-reading my OP, I realized I meant to say they should change altitude AND direction....I edited it to reflect.
I think what improved performance the most, was reducing the swarm size. I thought I had gotten the right line but I misread the code....I'm a Python & C programmer. LUA is quite foreign to me. Going to adjust the correct line and see what happens.
Cheers and thanks for a nice mod!