Add NixOS and Go
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Kernel Panic
|
||||
|
||||
A Unity card battler about Linux distributions and programming languages. Native cards resolve immediately; Python uses a FIFO queue and Haskell a LIFO stack.
|
||||
A Unity card battler about Linux distributions and programming languages. Native cards resolve immediately; Python uses a FIFO queue, Haskell a LIFO stack, and Go persistent goroutines.
|
||||
|
||||
## Open and run
|
||||
|
||||
@@ -8,6 +8,34 @@ Use Unity **6000.4.8f1**, with Windows build support. Open this directory throug
|
||||
|
||||
Keep Unity `.meta` files alongside their assets in version control. `Library`, `Temp`, `Logs`, builds and local recovery scenes are excluded. Do not delete or regenerate metadata to resolve missing references.
|
||||
|
||||
In `ls ~/collection/languages`, unlocked playable languages offer **Learn more / practice fight**. C, Rust, Python, JavaScript, Haskell, Java, and Go each have a replayable guided fight with a fixed loan deck, followed by free practice. Exit with Escape or the training button; completion returns to the selected language, with a retry option. Practice does not replace campaign checkpoints, advance daily quests, award currencies, or change mandatory tutorial progress. Languages whose cards are still planned show an availability note instead.
|
||||
|
||||
The mandatory tutorial retains the basic queue/stack turn-order demonstration. Python's detailed preparation, automation, modifier and payload lesson now lives in its optional fight, where players perform the combo and watch the captured payload replay.
|
||||
|
||||
## NixOS and Go
|
||||
|
||||
NixOS is a standard-pool five-star distro with 60 Uptime, 6 RAM and 3 Cycles. Ownership unlocks Go; Haskell and Go are recommendations, so any two unlocked playable languages remain valid. Select four of its five exclusive cards for the usual twelve-card starting deck. Existing pity, package/distro odds, duplicate Merges and upgrade prices are unchanged.
|
||||
|
||||
The host's CPU GOVERNOR controls accept clicks or keyboard focus and Enter. The current-governor shortcut beneath the host name scrolls to the controls and focuses an available policy, including in short windows. Each wave starts in `schedutil`. Switch once per player turn for one Cycle; selecting the active governor or an invalid action spends nothing. Governors apply only to card damage and explicit card Shield, at resolution time. Package Shield, status damage, healing, recoil, draw and duration are unaffected.
|
||||
|
||||
| Version | Release | Cumulative benefit |
|
||||
| --- | --- | --- |
|
||||
| V1 | 24.05 | performance: +20% damage/-25% Shield; powersave: -20%/+30%; schedutil: +5%/+5% |
|
||||
| V2 | 24.11 | schedutil: +10%/+10% |
|
||||
| V3 | 25.05 | First successful switch each wave is free |
|
||||
| V4 | 25.11 | performance damage +30%; powersave Shield +40%; penalties retained |
|
||||
| V5 | 26.05 | Switching to performance deals 5, powersave grants 6 Shield, schedutil draws 1 |
|
||||
|
||||
V5 bonuses bypass card scaling and card-play/draw riders. Performance uses the selected living enemy, otherwise the first living enemy in process order; without one, the switch is disabled. The Haskell `nixos-rebuild switch` card grants Shield and draws; it does not switch governors.
|
||||
|
||||
Go deploys at most three goroutines, each with a stable PID and at most five remaining ticks. A deployed card leaves hand RAM and stays outside draw/discard piles until termination. At Interpret, eligible goroutines tick once in deployment order, then Python FIFO and Haskell LIFO resolve. Deployment-round work does not tick. Extensions change only remaining ticks. Select a scheduler PID before playing a management card, or play the card and then select an eligible PID; Escape cancels selection without spending resources. `rollback` still heals when nothing can be extended.
|
||||
|
||||
Each goroutine snapshots its card magnitude once, while governor, Compilation and source damage buffs are read independently at each tick through the existing damage pipeline. Ticks never replay card-play events or equipment hooks. A dead, removed or reviving target is replaced by the first living enemy; no living target means the tick is consumed without damage. Final ticks, cancellation, wave changes, defeat and run termination release the slot and dispose of the source card exactly once. No background threads or animation-driven gameplay timers are used.
|
||||
|
||||
Card assets follow one layout: distro exclusives in `Assets/Data/Cards/<Distro>/`, language starters in `Assets/Data/Cards/Languages/<Language>/`, and repository cards in `Assets/Data/Cards/Shop/`. Language deck definitions and their database stay directly under `Languages/`. NixOS and Go use these same folders, alongside `GoDeck.asset`, `NixOS.asset` and `NixRebuildSwitch.asset`, registered in the existing databases. Runtime integration is in `CombatManager.NixGo.cs`, `NixGovernorState.cs`, `GoroutineScheduler.cs` and `GoEffect.cs`; `CombatSceneController.NixGo.cs` supplies the compact governor controls and PID rows. Saves retain the existing schema and language enum values; the Goroutine track is appended without renumbering existing tracks.
|
||||
|
||||
`NixGoTests`, `NixGoProgressionTests` and `CombatLayoutTests` cover gameplay, content registration, equipment, progression and UI. A development player can run the isolated UI/combat check with `--kernel-panic-smoke --kernel-panic-nixos-go-smoke --kernel-panic-save-path <absolute-unused-path>`. The equivalent `--kernel-panic-language-training-smoke` checks all seven lessons. Neither harness uses the real profile.
|
||||
|
||||
## Test and build
|
||||
|
||||
Run the EditMode tests from Unity's **Window > General > Test Runner** window.
|
||||
|
||||
Reference in New Issue
Block a user