Oath speech in the deep warrior voice, cinematic camera, crowd calls your name

Stand von main 730ac6a2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 21:43:38 +01:00
parent 9c433c61ba
commit 0454683fc3
29 changed files with 1249 additions and 57 deletions

View File

@@ -53,6 +53,8 @@ namespace GladiatorIdle.Arena
{
// Mauer: Kreisbogen um (CX, ·, ZC); vorderster Punkt bei z = ZC − R
const float CX = Camera.W / 2, ZC = 2400, R = 3800, WALL_H = 300, BACK_R = 6500;
/// Innenkreis der Arena (für die Kamera).
public static (Vector2 Center, float R) Ring => (new Vector2(CX, ZC), R);
// Ränge hinter der Mauer: Stufen (Höhe, Tiefe), Säulenreihe obenauf
const float ROW_H = 64, ROW_D = 118, COL_H = 330;
static float Floor => Stage.FloorY;
@@ -107,7 +109,7 @@ namespace GladiatorIdle.Arena
if (Assets.Sprite("tex_gate", "jpg") is Texture2D gate) _parts.Add(BuildGates(gate));
_parts.Add(BuildProps());
_banners = new Part { Tex = Assets.Sprite("tex_banner", "jpg"), Tint = _look.Banner.ToVector3() * 1.15f };
foreach (var a in new[] { -50f, -14f, 14f, 50f }) _bannerAt.Add((a, a * 0.13f));
foreach (var a in new[] { -50f, -14f, 14f, 50f, 85f, -85f, 150f, -150f }) _bannerAt.Add((a, a * 0.13f));
foreach (var p in _parts) p.Freeze();
_backdrop.Freeze();
@@ -115,6 +117,9 @@ namespace GladiatorIdle.Arena
if (Assets.Sprite($"spectator_{i}") is Texture2D idle) _fanTex.Add((idle, Assets.Sprite($"spectator_{i}_cheer") ?? idle));
_fanFx = new AlphaTestEffect(Assets.Device) { VertexColorEnabled = true, ReferenceAlpha = 110, AlphaFunction = CompareFunction.Greater };
if (_fanTex.Count > 0 && _rows > 0) SeatFans(arena);
// Stufen aller Texturen jetzt rechnen, nicht beim ersten Jubel mitten im Kampf (Ruckler)
foreach (var (calmTex, cheerTex) in _fanTex) { Assets.Mipmapped(calmTex); Assets.Mipmapped(cheerTex); }
foreach (var part in _parts) if (part.Tex != null && part.Tex != Assets.Pixel) Assets.Mipmapped(part.Tex);
_fanV = new VertexPositionColorTexture[_fanTex.Count * 2][];
_fanN = new int[_fanV.Length];
for (int i = 0; i < _fanV.Length; i++)
@@ -137,14 +142,14 @@ namespace GladiatorIdle.Arena
"marble" => (new Color(222, 214, 202), new Color(168, 156, 148)),
_ => (new Color(186, 172, 150), new Color(132, 120, 104)),
};
const int SEG = 80;
const int SEG = 180;
for (int i = 0; i < _rows; i++)
{
float yLow = i == 0 ? Floor - WALL_H - 14 : RowTop(i - 1), yTop = RowTop(i), r0 = RowR(i), r1 = r0 + ROW_D;
var shade = (i % 2 == 0) ? 1f : 0.94f;
for (int k = 0; k < SEG; k++)
{
float d0 = -78 + 156f * k / SEG, d1 = -78 + 156f * (k + 1) / SEG;
float d0 = -180 + 360f * k / SEG, d1 = -180 + 360f * (k + 1) / SEG;
var z0 = Vector2.Zero;
p.Quad(OnWall(d0, r0, yTop), OnWall(d1, r0, yTop), OnWall(d1, r0, yLow), OnWall(d0, r0, yLow), Inward((d0 + d1) / 2), riser * shade, z0, z0, z0, z0);
p.Quad(OnWall(d0, r1, yTop), OnWall(d1, r1, yTop), OnWall(d1, r0, yTop), OnWall(d0, r0, yTop), -Vector3.UnitY, tread * shade, z0, z0, z0, z0);
@@ -161,17 +166,17 @@ namespace GladiatorIdle.Arena
float h = _rows > 0 ? COL_H : COL_H + 160;
var stone = _look.Wall == "marble" ? new Color(226, 218, 204) : _look.Wall == "wood" ? new Color(206, 196, 178) : new Color(196, 184, 162);
float step = _look.Wall == "marble" ? 4.5f : 6;
for (float a = -78; a <= 78.01f; a += step)
for (float a = -180; a < 179.99f; a += step)
{
var c = OnWall(a, r, baseY);
p.Cylinder(c, 24, h, stone, 12);
p.Cylinder(c, 34, 18, stone * 0.9f, 10); // Basis
p.Cylinder(c + new Vector3(0, -h + 20, 0), 32, 20, stone * 0.9f, 10); // Kapitell
}
const int SEG = 80;
const int SEG = 180;
for (int k = 0; k < SEG; k++)
{
float d0 = -78 + 156f * k / SEG, d1 = -78 + 156f * (k + 1) / SEG;
float d0 = -180 + 360f * k / SEG, d1 = -180 + 360f * (k + 1) / SEG;
var z0 = Vector2.Zero;
float top = baseY - h, n = (d0 + d1) / 2;
// Gebälk vorn und oben
@@ -192,7 +197,7 @@ namespace GladiatorIdle.Arena
{
float r = RowR(i) + ROW_D * 0.42f;
float step = MathHelper.ToDegrees(gap / r);
for (float a = -77; a <= 77; a += step * (0.8f + 0.4f * (float)rng.NextDouble()))
for (float a = -180; a < 179; a += step * (0.8f + 0.4f * (float)rng.NextDouble()))
{
if (rng.NextDouble() < 0.1) continue; // freier Platz
float rad = MathHelper.ToRadians(a);
@@ -270,18 +275,21 @@ namespace GladiatorIdle.Arena
Part BuildBackdrop()
{
var p = new Part { Lit = false, Mirror = true, Fog = false, Tint = Vector3.Lerp(new Vector3(_look.BackdropLight), _look.Fog, 0.18f) };
const float SPAN = 30, EXTRA = 60;
const float SPAN = 30, EXTRA = 180;
float width = BACK_R * MathHelper.ToRadians(2 * SPAN), height = width * 9 / 16;
// Bildzeile "Horizon" (dort beginnt der gemalte Boden) liegt knapp unter der Mauerkrone
float wallTop = HorizonY();
float top = wallTop - _look.Horizon * height;
const int SEG = 40;
const int SEG = 120;
for (int i = 0; i < SEG; i++)
{
float d0 = -EXTRA + 2 * EXTRA * i / SEG, d1 = -EXTRA + 2 * EXTRA * (i + 1) / SEG;
float u0 = (d0 + SPAN) / (2 * SPAN), u1 = (d1 + SPAN) / (2 * SPAN);
p.Quad(OnWall(d0, BACK_R, top), OnWall(d1, BACK_R, top), OnWall(d1, BACK_R, top + height), OnWall(d0, BACK_R, top + height),
Inward((d0 + d1) / 2), Color.White, new Vector2(u0, 0), new Vector2(u1, 0), new Vector2(u1, 1), new Vector2(u0, 1));
// Himmel: oberste Zeile des Bildes weit nach oben gezogen
p.Quad(OnWall(d0, BACK_R, top - height * 2.5f), OnWall(d1, BACK_R, top - height * 2.5f), OnWall(d1, BACK_R, top), OnWall(d0, BACK_R, top),
Inward((d0 + d1) / 2), Color.White, new Vector2(u0, 0), new Vector2(u1, 0), new Vector2(u1, 0.004f), new Vector2(u0, 0.004f));
}
return p;
}
@@ -299,8 +307,8 @@ namespace GladiatorIdle.Arena
Part BuildFloor()
{
var p = new Part { Tex = Assets.Sprite("tex_sand", "jpg"), Wrap = true, Tint = _look.Sand * new Vector3(0.86f, 0.88f, 0.98f) };
const int NX = 40, NZ = 16;
float x0 = CX - 5200, x1 = CX + 5200, z0 = -(R - ZC) - 900, z1 = 900;
const int NX = 40, NZ = 40;
float x0 = CX - 5200, x1 = CX + 5200, z0 = -(R - ZC) - 900, z1 = ZC + R + 900; // rundum bis hinter die Kamera
Vector3 Pt(int i, int k) => new(x0 + (x1 - x0) * i / NX, Floor, z0 + (z1 - z0) * k / NZ);
Color Shade(Vector3 v)
{
@@ -330,8 +338,8 @@ namespace GladiatorIdle.Arena
{
var tint = _look.Wall == "wood" ? new Vector3(1.05f, 0.82f, 0.62f) : Vector3.One; // Holz wärmer als die graue Vorlage
var p = new Part { Tex = Assets.Sprite(WallTex, "jpg"), Wrap = true, Tint = tint };
const int SEG = 72;
const float FROM = -75, TO = 75;
const int SEG = 170;
const float FROM = -180, TO = 180; // rundum (Kinofahrten drehen bis 360°)
float tile = WALL_H * 3; // Textur 3:1
for (int i = 0; i < SEG; i++)
{
@@ -348,10 +356,10 @@ namespace GladiatorIdle.Arena
{
var p = new Part { Tex = Assets.Pixel };
var col = _look.Wall switch { "wood" => new Color(92, 66, 44), "marble" => new Color(214, 196, 150), _ => new Color(196, 184, 160) };
const int SEG = 72;
const int SEG = 170;
for (int i = 0; i < SEG; i++)
{
float d0 = -75 + 150f * i / SEG, d1 = -75 + 150f * (i + 1) / SEG;
float d0 = -180 + 360f * i / SEG, d1 = -180 + 360f * (i + 1) / SEG;
var z0 = Vector2.Zero;
float y = Floor - WALL_H;
p.Quad(OnWall(d0, R + 30, y - 14), OnWall(d1, R + 30, y - 14), OnWall(d1, R - 26, y - 14), OnWall(d0, R - 26, y - 14),
@@ -366,7 +374,7 @@ namespace GladiatorIdle.Arena
Part BuildGates(Texture2D gate)
{
var p = new Part { Tex = gate };
var at = _look.Wall == "marble" ? new[] { -30f, 0f, 30f } : new[] { -30f, 30f };
var at = _look.Wall == "marble" ? new[] { -30f, 0f, 30f, 180f, -120f, 120f } : new[] { -30f, 30f, 180f, -120f, 120f };
foreach (float a in at)
{
float half = MathHelper.ToDegrees(130 / R); // 260 breit