Skip to content
Draft
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions simulation_parameters/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Member

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?

Copy link
Contributor Author

@Patryk26g Patryk26g Jan 10, 2026

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)

Copy link
Member

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...

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>
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The 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;
Expand Down
177 changes: 28 additions & 149 deletions simulation_parameters/microbe_stage/biomes.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,12 @@
}
},
"Terrain": {
"MinClusters": 0,
"MaxClusters": 5,
"MinClusters": 2,
"MaxClusters": 8,
"PotentialClusters": [
{
"RelativeChance": 1,
"SpawnStrategy": 1,
Copy link
Member

Choose a reason for hiding this comment

The 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": {
Expand All @@ -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,
Expand All @@ -598,6 +585,7 @@
},
{
"RelativeChance": 1,
"SpawnStrategy": 1,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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",
Expand All @@ -647,7 +621,8 @@
]
},
{
"RelativeChance": 1,
"RelativeChance": 2,
"SpawnStrategy": 1,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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,
Expand All @@ -697,7 +658,7 @@
]
},
{
"RelativeChance": 1,
"RelativeChance": 7,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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",
Expand All @@ -747,7 +694,8 @@
]
},
{
"RelativeChance": 1,
"RelativeChance": 3,
"SpawnStrategy": 1,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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",
Expand All @@ -797,7 +731,8 @@
]
},
{
"RelativeChance": 1,
"RelativeChance": 3,
"SpawnStrategy": 1,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -3265,11 +3172,11 @@
}
},
"Terrain": {
"MinClusters": 4,
"MaxClusters": 8,
"MinClusters": 2,
"MaxClusters": 7,
"PotentialClusters": [
{
"RelativeChance": 1,
"RelativeChance": 3,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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",
Expand All @@ -3319,7 +3212,7 @@
]
},
{
"RelativeChance": 1,
"RelativeChance": 2,
"TerrainGroups": [
{
"RelativePosition": {
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/microbe_stage/MicrobeCamera.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay.
Did you test with the max multicellular zoom out distance to see if the edges of the plane are visible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The 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.

Loading