-
-
Notifications
You must be signed in to change notification settings - Fork 11
Fractal Variety #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fractal Variety #472
Changes from all commits
465a283
b9973da
d2fdd78
b4df4f8
abb27ce
3aaa7de
91ed330
def78fb
dcc60ed
200934b
30f46bc
1ae770f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.faforever.neroxis.generator; | ||
|
|
||
| public record FractalFlattenParams( | ||
| float minHeight, | ||
| float maxHeight, | ||
| float destinationMinHeight, | ||
| float destinationMaxHeight, | ||
| float slope, | ||
| int blurAmount, | ||
| boolean hasRamps, | ||
| boolean spawnable, | ||
| float spawnMaskDeflate | ||
| ) {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.faforever.neroxis.generator; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public record FractalParams( | ||
| float waterHeight, | ||
| boolean useRandomWaterMask, | ||
| int noiseMapBlurAmount, | ||
| float noiseOctaveMultiplier, | ||
| float noiseExpMultiplier, | ||
| int teamSeparation, | ||
| List<FractalFlattenParams> fractalFlattenParams | ||
| ) {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| package com.faforever.neroxis.generator.style; | ||
|
|
||
| import com.faforever.neroxis.generator.WeightedOption; | ||
| import com.faforever.neroxis.generator.WeightedOptionsWithFallback; | ||
| import com.faforever.neroxis.generator.prop.BasicPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.BoulderFieldPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.HighReclaimPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.LargeBattlePropGenerator; | ||
| import com.faforever.neroxis.generator.prop.NavyWrecksPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.PropGenerator; | ||
| import com.faforever.neroxis.generator.prop.RockFieldPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.SmallBattlePropGenerator; | ||
| import com.faforever.neroxis.generator.resource.ResourceGenerator; | ||
| import com.faforever.neroxis.generator.resource.HighMexLandLowMexWaterResourceGenerator; | ||
| import com.faforever.neroxis.generator.terrain.FractalNavyLastTerrainGenerator; | ||
| import com.faforever.neroxis.generator.terrain.TerrainGenerator; | ||
|
|
||
| public class FractalNavyStyleGenerator extends StyleGenerator { | ||
| @Override | ||
| protected WeightedOptionsWithFallback<ResourceGenerator> getResourceGeneratorOptions() { | ||
| return WeightedOptionsWithFallback.of(new HighMexLandLowMexWaterResourceGenerator()); | ||
| } | ||
|
|
||
| @Override | ||
| protected WeightedOptionsWithFallback<TerrainGenerator> getTerrainGeneratorOptions() { | ||
| return WeightedOptionsWithFallback.of(new FractalNavyLastTerrainGenerator()); | ||
| } | ||
|
|
||
| @Override | ||
| protected WeightedOptionsWithFallback<PropGenerator> getPropGeneratorOptions() { | ||
| return WeightedOptionsWithFallback.of(new BasicPropGenerator(), | ||
| new WeightedOption<>(new BasicPropGenerator(), 1f), | ||
| new WeightedOption<>(new NavyWrecksPropGenerator(), 3f), | ||
| new WeightedOption<>(new BoulderFieldPropGenerator(), 2f), | ||
| new WeightedOption<>(new HighReclaimPropGenerator(), 1f), | ||
| new WeightedOption<>(new LargeBattlePropGenerator(), .5f), | ||
| new WeightedOption<>(new RockFieldPropGenerator(), 0.5f), | ||
| new WeightedOption<>(new SmallBattlePropGenerator(), 0.5f)); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package com.faforever.neroxis.generator.style; | ||
|
|
||
| import com.faforever.neroxis.generator.WeightedOption; | ||
| import com.faforever.neroxis.generator.WeightedOptionsWithFallback; | ||
| import com.faforever.neroxis.generator.prop.BasicPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.BoulderFieldPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.EnemyCivPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.HighReclaimPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.LargeBattlePropGenerator; | ||
| import com.faforever.neroxis.generator.prop.NeutralCivPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.PropGenerator; | ||
| import com.faforever.neroxis.generator.prop.RockFieldPropGenerator; | ||
| import com.faforever.neroxis.generator.prop.SmallBattlePropGenerator; | ||
| import com.faforever.neroxis.generator.terrain.FractalPlateauLastTerrainGenerator; | ||
| import com.faforever.neroxis.generator.terrain.TerrainGenerator; | ||
|
|
||
| public class FractalPlateauStyleGenerator extends StyleGenerator { | ||
| @Override | ||
| protected WeightedOptionsWithFallback<TerrainGenerator> getTerrainGeneratorOptions() { | ||
| return WeightedOptionsWithFallback.of(new FractalPlateauLastTerrainGenerator()); | ||
| } | ||
|
|
||
| @Override | ||
| protected WeightedOptionsWithFallback<PropGenerator> getPropGeneratorOptions() { | ||
| return WeightedOptionsWithFallback.of(new BasicPropGenerator(), | ||
| new WeightedOption<>(new BasicPropGenerator(), 1f), | ||
|
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BasicPropGenerator appears twice.
🤖 Prompt for AI Agents |
||
| new WeightedOption<>(new BoulderFieldPropGenerator(), .5f), | ||
| new WeightedOption<>(new EnemyCivPropGenerator(), .5f), | ||
| new WeightedOption<>(new HighReclaimPropGenerator(), .5f), | ||
| new WeightedOption<>(new LargeBattlePropGenerator(), .5f), | ||
| new WeightedOption<>(new NeutralCivPropGenerator(), 1f), | ||
| new WeightedOption<>(new RockFieldPropGenerator(), 1f), | ||
| new WeightedOption<>(new SmallBattlePropGenerator(), 1f)); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I feel this needs a bit of a re-balance.
I'm not sure what that balance should be...
But I guess this is what I think.
I felt the BasicStyleGenerator should be bumped to 2... This is arguably the best generator for ladder, in my opinion..
And bump the FLOODED one... It seems good to me, it's better than the fractal navy...
And I put the frcatal one's as 0.25 for ladder..
Maybe the FRACTAL_NAVY should be 0.1 for ladder? it's not super consist...
But it does make some good navy maps (some great navy maps maybe), but some maybe fringe.
(I guess every terrain generator can have some funky seeds)