$ show AveYo/Gaming
AveYo/Gaming is a collection of Windows batch/PowerShell scripts, game configurations, and embedded C# libraries focused on optimizing Counter-Strike 2, Dota 2, and Steam for performance, stability, and quality-of-life. It provides a sophisticated CS2 launcher that dynamically switches desktop resolution to match game resolution to fix alt-tab and input lag issues, a crash dump reader (DmpChk) using the Windows debug engine, a GPU shader cache cleaner, a Steam launcher in 'Small Mode' to reduce resource usage, and a suite of CS2 performance benchmarking tools using in-game console automation and CSV output analysis. The repository also includes extensive game config files (autoexec.cfg for CS2 and Dota2) with performance tweaks, and scripts for offline play via a Steam emulator (SEMU). While tightly coupled to specific game paths and Windows APIs, several components are well-crafted and self-contained, particularly the custom C# SetRes display resolution library and the VDF file parsing routines.
The LLM identified 3 files worth highlighting for reuse:
A fully self-contained C# library compiled and loaded at runtime by the PowerShell wrapper. It wraps Win32 display functions (EnumDisplaySettings, ChangeDisplaySettingsEx) and leverages WinEvent hooks to monitor game focus and automatically switch desktop resolution to match the game's video settings on focus, then restore native resolution on alt-tab. It handles multi-monitor setups, DPI awareness, and fractional refresh rates. This component is reusable in any PowerShell/C# project that needs robust, non-destructive resolution switching without external dependencies.
An administrative script that locates Steam and specific game installations (CS2, Dota2) and empties all known shader cache directories (NVIDIA, AMD, Intel, DirectX, Steam shadercache, driver temp folders) using robocopy MIR to delete files without removing folders. It also clears Steam logs and crash dumps. The VDF parsing and game path detection logic is reusable for any Steam-related maintenance script.
A combined PowerShell and game console benchmark framework for Counter-Strike 2. It auto-detects the CS2 installation, generates benchmark.cfg and benchmark2.cfg files that execute a scripted bot match on de_ancient_night while logging frametimes via cl_showfps 4. The batch script later parses the resulting CSV profiler output to compute median, mean, mode FPS at various percentile thresholds (0.1%, 1%, 5%, 50%, 95%, 99%) and also extracts VProf data from the game's console.log. The cfg files demonstrate advanced use of alias chains, looping, and game state scripting to create a reproducible benchmark scenario. The stats parsing and CSV formatting logic can be adapted for any CSV performance data.