-
-
Notifications
You must be signed in to change notification settings - Fork 588
New terrain generation for the vents #6591
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
base: master
Are you sure you want to change the base?
Changes from 16 commits
477978e
0f7edad
a1da19d
9ed168f
c523691
e20d081
1829868
831d473
dde59ef
fb1d39c
deeadaf
7012875
06c27ee
8cf131e
55f1fd6
531004b
3663457
fca6495
c75715a
082a4f3
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 |
|---|---|---|
|
|
@@ -188,8 +188,10 @@ public static class Constants | |
|
|
||
| public const float CLOUD_CHEAT_DENSITY = 16000.0f; | ||
|
|
||
| public const float TERRAIN_GRID_SIZE = 200; | ||
| public const float TERRAIN_GRID_SIZE_INV = 1 / TERRAIN_GRID_SIZE; | ||
| public const float TERRAIN_GRID_SIZE_X = 330; | ||
| public const float TERRAIN_GRID_SIZE_Z = 315; | ||
| public const float TERRAIN_GRID_SIZE_INV_X = 1 / TERRAIN_GRID_SIZE_X; | ||
| public const float TERRAIN_GRID_SIZE_INV_Z = 1 / TERRAIN_GRID_SIZE_Z; | ||
| public const float TERRAIN_EDGE_PROTECTION_SIZE = 1; | ||
|
|
||
| /// <summary> | ||
|
|
@@ -202,7 +204,16 @@ public static class Constants | |
| /// If too low, then pop in is visible and the spawn system can spawn stuff in that then gets covered | ||
| /// by the terrain. | ||
| /// </summary> | ||
| public const int TERRAIN_SPAWN_AREA_NUMBER = 4; | ||
| public const int TERRAIN_SPAWN_AREA_NUMBER = 1; | ||
|
|
||
| public const int TERRAIN_VENT_SEGMENTS = 6; | ||
| public const int TERRAIN_VENT_RINGS_MAX = 5; | ||
| public const int TERRAIN_VENT_RINGS_MIN = 2; | ||
| public const int TERRAIN_SECOND_VENT_RINGS_MIN_THRESHOLD = 3; | ||
| public const float TERRAIN_SECOND_VENT_CHANCE = 0.4f; | ||
| public const int TERRAIN_VENT_OVERLAP_MARGIN = 2; | ||
| public const int TERRAIN_VENT_RING_HEIGHT_REDUCTION = 10; | ||
| public const int TERRAIN_VENT_OUTER_RING_HEIGHT = -27; | ||
|
Comment on lines
+201
to
+208
Member
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. I haven't read all the code yet, but my impression is that these would be nice to configure from the JSON. |
||
|
|
||
| public const int MEMBRANE_RESOLUTION = 10; | ||
| public const int MEMBRANE_VERTICAL_RESOLUTION = 7; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -543,11 +543,12 @@ | |
| } | ||
| }, | ||
| "Terrain": { | ||
| "MinClusters": 0, | ||
| "MaxClusters": 5, | ||
| "MinClusters": 2, | ||
| "MaxClusters": 8, | ||
| "PotentialClusters": [ | ||
| { | ||
| "RelativeChance": 1, | ||
| "SpawnStrategy": 1, | ||
|
Member
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. Please use enum value names here in the JSON so that it is easy to read. |
||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -559,32 +560,18 @@ | |
| { | ||
| "Visuals": "PyriteTerrain1", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/PyriteTerrainChunk1.shape", | ||
| "Radius": 14.6, | ||
| "Radius": 13, | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "PyriteTerrain2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/PyriteTerrainChunk2.shape", | ||
| "Radius": 18, | ||
| "Radius": 13, | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
|
|
@@ -598,6 +585,7 @@ | |
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "SpawnStrategy": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -616,21 +604,7 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "ChalcopyriteTerrain2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/ChalcopyriteTerrainChunk2.shape", | ||
|
|
@@ -647,7 +621,8 @@ | |
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "RelativeChance": 2, | ||
| "SpawnStrategy": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -666,25 +641,11 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "SerpentiniteTerrain2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/SerpentiniteTerrainChunk2.shape", | ||
| "Radius": 17.5, | ||
| "Radius": 13.5, | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
|
|
@@ -697,7 +658,7 @@ | |
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "RelativeChance": 7, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -716,21 +677,7 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "BariteTerrainChunk2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/BariteTerrainChunk2.shape", | ||
|
|
@@ -747,7 +694,8 @@ | |
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "RelativeChance": 3, | ||
| "SpawnStrategy": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -766,21 +714,7 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "CalciteTerrainChunk2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/CalciteTerrainChunk2.shape", | ||
|
|
@@ -797,7 +731,8 @@ | |
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "RelativeChance": 3, | ||
| "SpawnStrategy": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -816,21 +751,7 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "QuartzTerrain2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/QuartzTerrainChunk2.shape", | ||
|
|
@@ -841,25 +762,11 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "QuartzTerrain3", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/QuartzTerrainChunk3.shape", | ||
| "Radius": 13.1, | ||
| "Radius": 12, | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
|
|
@@ -3265,11 +3172,11 @@ | |
| } | ||
| }, | ||
| "Terrain": { | ||
| "MinClusters": 4, | ||
| "MaxClusters": 8, | ||
| "MinClusters": 2, | ||
| "MaxClusters": 7, | ||
| "PotentialClusters": [ | ||
| { | ||
| "RelativeChance": 1, | ||
| "RelativeChance": 3, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -3288,21 +3195,7 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "CalciteTerrainChunk2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/CalciteTerrainChunk2.shape", | ||
|
|
@@ -3319,7 +3212,7 @@ | |
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "RelativeChance": 2, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
|
|
@@ -3338,21 +3231,7 @@ | |
| "z": 0 | ||
| }, | ||
| "RandomizeRotation": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "RelativeChance": 1, | ||
| "TerrainGroups": [ | ||
| { | ||
| "RelativePosition": { | ||
| "x": 0, | ||
| "y": 0, | ||
| "z": 0 | ||
| }, | ||
| "Chunks": [ | ||
| }, | ||
| { | ||
| "Visuals": "BasaltTerrainChunk2", | ||
| "CollisionShapePath": "res://assets/models/microbe_terrain/BasaltTerrainChunk2.shape", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,3 +16,4 @@ backgroundPlane = NodePath("BackgroundPlane") | |
| current = true | ||
|
|
||
| [node name="BackgroundPlane" parent="." instance=ExtResource("2_yrakl")] | ||
| transform = Transform3D(1.1, 0, 0, 0, 1.1, 0, 0, 0, 1.1, 0, 0, -10) | ||
|
Member
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. What's this change?
Contributor
Author
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. Like I said in the description, I lowered the background image a bit
Member
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. Ah, okay.
Contributor
Author
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. Well, I also increased the size of the background to negate it but I will have to check
Member
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. Somehow I missed that. Otherwise I would have made sure the size to UV ratio is the same so that the visuals aren't stretched differently than before. |
||
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.
These grid sizes seem a bit specific... Any reason why not a round number like 300?
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.
well, when I was messing with it it used to be more rectangular since the screens are wider, so that chunks would spawn further horizontally and less vertically (for example 200x300 but with such low difference now it doesn't make sense to keep it)
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.
That doesn't fully make sense to me because the spawn system spawn radius is a circle, so having more horizontal space doesn't really help with stuck-in-terrain spawns...