$ErrorActionPreference = 'Stop' $Root = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..\..\..\..')) $Viewer = Join-Path $Root 'Standalone\bin\VoxelForgeCoreStandalone.exe' $Data = Join-Path $Root 'Standalone\data\owner_world.json' $SeedFile = Join-Path $PSScriptRoot 'seeds.txt' $LogDir = Join-Path $Root 'Saved\Linux' [IO.Directory]::CreateDirectory($LogDir) | Out-Null $Recipes = @( @{ Name = 'surface-world'; Camera = '0,-35,-487.94,0,-22' }, @{ Name = 'floating-islands'; Camera = '0,0,-32,0,-22' } ) $Seeds = @(Get-Content -LiteralPath $SeedFile | ForEach-Object { [int]$_.Trim() }) if ($Seeds.Count -ne 48) { throw "Expected 48 seeds in $SeedFile" } if (-not (Test-Path -LiteralPath $Viewer -PathType Leaf)) { throw "Viewer not found: $Viewer" } foreach ($Recipe in $Recipes) { foreach ($Seed in $Seeds) { foreach ($Workers in @(1, 12)) { $Arguments = @( $Data, "--seed=$Seed", "--recipe=$($Recipe.Name)", '--render-distance-chunks=0', "--workers=$Workers", '--world-assembler-prototype', '--stream-benchmark', '--stream-pipeline', '--stream-hash', '--force-generate', '--clip-radius=1', '--max-clip-level=0', "--camera=$($Recipe.Camera)", '--far-horizon-lod8-step=0', '--process-affinity=4095', '--process-priority=Normal', '--frame-limit=60' ) $Stem = "windows2-seed-$Seed-$($Recipe.Name)-w$Workers" $Log = Join-Path $LogDir "$Stem.log" Write-Host "& `"$Viewer`" $($Arguments -join ' ')" & $Viewer @Arguments *> $Log if ($LASTEXITCODE -ne 0) { throw "Viewer failed ($LASTEXITCODE); see $Log" } } } }