Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 3087099

Browse files
committed
make some planets smaller (fever starting positions)
1 parent 9efaa53 commit 3087099

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

sources/sdf.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace unnatural
3434

3535
Real sdfDisk(const Vec3 &pos)
3636
{
37-
return sdfCylinder(pos, 250, 1100) - 200;
37+
return sdfCylinder(pos, 200, 600) - 100;
3838
}
3939

4040
Real sdfBox(const Vec3 &pos)
@@ -44,17 +44,17 @@ namespace unnatural
4444

4545
Real sdfCube(const Vec3 &pos)
4646
{
47-
return sdfBox(pos, Vec3(650)) - 200;
47+
return sdfBox(pos, Vec3(450)) - 100;
4848
}
4949

5050
Real sdfTetrahedron(const Vec3 &pos)
5151
{
52-
return sdfTetrahedron(pos, 1000) - 200;
52+
return sdfTetrahedron(pos, 600) - 100;
5353
}
5454

5555
Real sdfOctahedron(const Vec3 &pos)
5656
{
57-
return sdfOctahedron(pos, 1400) - 200;
57+
return sdfOctahedron(pos, 800) - 100;
5858
}
5959

6060
namespace
@@ -70,12 +70,12 @@ namespace unnatural
7070

7171
Real sdfTriangularPrism(const Vec3 &pos)
7272
{
73-
return sdfTriangularPrismImpl(Vec3(pos[0], pos[2], pos[1]), 1700, 1000) - 200;
73+
return sdfTriangularPrismImpl(Vec3(pos[0], pos[2], pos[1]), 300, 900) - 100;
7474
}
7575

7676
Real sdfHexagonalPrism(const Vec3 &pos)
7777
{
78-
return sdfHexagonalPrism(Vec3(pos[0], pos[2], pos[1]), 900, 650) - 200;
78+
return sdfHexagonalPrism(Vec3(pos[0], pos[2], pos[1]), 300, 400) - 100;
7979
}
8080

8181
Real sdfTorus(const Vec3 &pos)
@@ -237,7 +237,7 @@ namespace unnatural
237237
Vec3 p = Vec3(pos[0], pos[2], 0);
238238
p = Quat(Rads(), Rads(), angle) * p;
239239
p = Vec3(p[0], pos[1], p[1]);
240-
return sdfHexagonalPrism(p);
240+
return sdfHexagonalPrism(Vec3(p[0], p[2], p[1]), 900, 650) - 200;
241241
}
242242

243243
namespace
@@ -327,7 +327,7 @@ namespace unnatural
327327

328328
Real sdfInsideCube(const Vec3 &p)
329329
{
330-
return -sdfCube(p);
330+
return -(sdfBox(p, Vec3(1300)) - 200);
331331
}
332332

333333
Real sdfAsteroid(const Vec3 &p)

sources/startingPositions.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace unnatural
4747
for (uint32 i : spatQuery->result())
4848
if (tiles[i].buildable)
4949
b++;
50-
static constexpr uint32 Threshold = CAGE_DEBUG_BOOL ? 400 : 2000;
50+
static constexpr uint32 Threshold = CAGE_DEBUG_BOOL ? 200 : 2000;
5151
return b < Threshold;
5252
});
5353
}
@@ -142,7 +142,7 @@ namespace unnatural
142142
if (!valid)
143143
continue;
144144
proposal.insert(p);
145-
if (proposal.size() >= 10)
145+
if (proposal.size() >= 20)
146146
break;
147147
}
148148
return std::move(proposal.unsafeData());
@@ -162,7 +162,7 @@ namespace unnatural
162162
for (uint32 attempt = 0; attempt < Limit; attempt++)
163163
{
164164
std::vector<uint32> proposal = proposeSolution(allCandidates);
165-
if (proposal.size() < 3)
165+
if (proposal.size() < 2)
166166
continue;
167167
if (proposal.size() < startingPositions.size())
168168
continue;

0 commit comments

Comments
 (0)