Quick context for coding agents working on BabySmash.
- BabySmash is a keyboard-smash game for babies/kids.
- Two frontends:
- Windows WPF app:
BabySmash.csproj(net10.0-windows) - Linux Avalonia app:
BabySmash.Linux/BabySmash.Linux.csproj(net10.0)
- Windows WPF app:
- Shared assets live in
Shared/Resources/and are embedded into both apps.
- Windows WPF entry points:
App.xaml.cs,MainWindow.xaml.cs,Controller.cs - Linux Avalonia entry points:
BabySmash.Linux/Program.cs,BabySmash.Linux/App.axaml.cs,BabySmash.Linux/MainWindow.axaml.cs - Shapes:
- Windows:
Shapes/ - Linux:
BabySmash.Linux/Shapes/
- Windows:
- Animation helpers:
- Windows:
Tweening/ - Linux:
BabySmash.Linux/Core/Animation/
- Windows:
- Windows:
dotnet rundotnet publish -c Release -r win-x64 --self-contained
- Linux:
dotnet run --project BabySmash.Linuxdotnet publish BabySmash.Linux -c Release -r linux-x64 --self-contained
- Windows auto-update is handled by Updatum in
App.xaml.cs. - Updates are pulled from GitHub Releases for
shanselman/babysmash. - The update is checked before launch so a parent can handle it before the game starts.
- Windows uses a low-level keyboard hook to block system keys in
App.xaml.cs. - Linux currently relies on Avalonia key events (no global hook).
- Auto-update (Windows) uses Updatum in
App.xaml.cs.
- Sounds:
Shared/Resources/Sounds/*.wav - Localization:
Shared/Resources/Strings/*.json - Word list:
Shared/Resources/Words.txt
- Try to keep Windows and Linux behavior aligned where feasible:
- shape generation, sounds, word detection, fade/clear, cursor behavior
- Localization on Windows uses JSON resources; Linux TTS uses language mapping.
- Windows:
Properties/Settings.settingsandProperties/Settings.Designer.cs - Linux: JSON settings via
BabySmash.Linux/Platform/LinuxSettingsService.cs(~/.config/babysmash/settings.json)
- Windows gameplay:
Controller.cs,MainWindow.xaml.cs - Linux gameplay:
BabySmash.Linux/MainWindow.axaml.cs
- No automated test suite currently.
- Basic manual smoke checks:
- Windows: shapes render, sounds/tts fire, options dialog opens, update check does not block launch, keyboard hook blocks system keys.
- Linux: shapes render, sounds/tts fire (espeak/paplay installed), options dialog opens, multi-monitor windows appear.
- CI is defined in
.github/workflows/build.yml(Build BabySmash). - Runs on all branches and PRs; release jobs run only on tags
v*. - Versioning uses GitVersion in both Windows and Linux builds:
- SemVer from GitVersion is injected into
Version,AssemblyVersion, andFileVersion. - GitVersion config (
GitVersion.yml):mode: ContinuousDeliverytag-prefix: vassembly-versioning-scheme: MajorMinorPatchmainbranch incrementsPatchwith no label
- SemVer from GitVersion is injected into
- Windows artifacts are code-signed via Azure Trusted Signing (exe and installer).
- Linux builds produce three artifact types:
.debpackage (Debian/Ubuntu) via nfpm.rpmpackage (Fedora/RHEL) via nfpm- Tarball with
babysmash, desktop entry, icon, and README
- Release is created via
softprops/action-gh-releasewith all artifacts.
- Windows artifacts are built as self-contained single-file (
BabySmash.csproj). - Linux artifacts are built as self-contained single-file (
BabySmash.Linux/BabySmash.Linux.csproj). - Installer is configured in
installer.iss(Windows) andnfpm.yaml(Linux). - nfpm configuration:
- Defines package metadata, dependencies, and file locations
- Post-install/post-remove scripts in
scripts/update icon cache - Automatically declares dependencies:
espeak,pulseaudio-utils | alsa-utils
- Avoid breaking kiosk-style behavior on Windows (keyboard hook).
- Keep Windows and Linux in functional parity where reasonable.
- Preserve embedded resources and their names; they are used at runtime by name.
- Avoid large dependency additions without a clear cross-platform plan.
- Keep changes minimal and test on both platforms when possible.