Skip to content

Instantly share code, notes, and snippets.

@drHyperion451
Created August 12, 2025 13:51
Show Gist options
  • Select an option

  • Save drHyperion451/3ee0ac2f401003683689f9953dc8b2ed to your computer and use it in GitHub Desktop.

Select an option

Save drHyperion451/3ee0ac2f401003683689f9953dc8b2ed to your computer and use it in GitHub Desktop.
Small powershell script to launch heretic or hexen using dsda-doom. It's recommended to compile it with ps2exe.
# File: launcher.ps1
# PowerShell 7+
# Path to dsda-doom.exe executable
$dsdaPath = "./dsda-doom.exe"
# Games and parameters (key: key STRING, value: [name, parameter array])
$games = @{
'1' = @("Heretic", @("-iwad", "../base/heretic/HERETIC.wad"))
'2' = @("Hexen: Beyond Heretic", @("-iwad", "../base/hexen/HEXEN.wad"))
'3' = @("Hexen: Deathkings of the Dark Citadel", @("-iwad", "../base/hexendk/HEXDD.wad"))
}
function Show-Menu {
Clear-Host
Write-Host "=== DSDA-Doom Game Selector ===" -ForegroundColor Cyan
foreach ($key in ($games.Keys | Sort-Object)) {
Write-Host "$key) $($games[$key][0])"
}
Write-Host ""
Write-Host ""
Write-Host "Q) Exit" -ForegroundColor Yellow
Write-Host ""
Write-Host "Press a number or 'Q' to quit (no need to press Enter)..."
}
while ($true) {
Show-Menu
$key = [System.Console]::ReadKey($true).KeyChar.ToString()
if ($key -ieq 'q') {
Write-Host "`nExiting..." -ForegroundColor Green
break
}
elseif ($games.ContainsKey($key)) {
$name = $games[$key][0]
$params = $games[$key][1]
Write-Host "`nRunning: $name" -ForegroundColor Green
& $dsdaPath @params
#Write-Host "`nGame finished. Press any key to return to menu..." -ForegroundColor Yellow
#[System.Console]::ReadKey($true) | Out-Null
}
else {
Write-Host "`nInvalid option. Press a valid key." -ForegroundColor Red
Start-Sleep -Seconds 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment