rdmbair15m5-changelog-20260919-1914-spacequest-ii-cleanroom-recreation
rdmbair15m5-changelog-20260919-1914-spacequest-ii-cleanroom-recreation
Native macOS clean-room recreation of Sierra On-Line's classic sci-fi AGI adventure Space Quest II: Chapter II โ Vohaul's Revenge (1987) with full 250-point game engine, 115-room topology, authentic status bar, CRT shaders, and 100% passing test suite replicated on rdmsm4x.
Scope
- Hosts:
rdmbair15m5(local),rdmsm4x(canonical dev root) - Projects:
/Users/richh/dev/apps/sierra/SpaceQuestII->rdmsm4x:~/dev/apps/sierra/SpaceQuestII
Exact Files Created/Modified
Package.swift: Swift package with SierraKit, SpaceQuestIILogic, SpaceQuestIIApp, and SpaceQuestIITests targetsSources/SierraKit/: Core AGI v2 runtime:Audio/SN76496Synthesizer.swift,Audio/ToneGenerator.swift: 3 square-wave voices + noise channel audioCommon/:AssetLoader.swift,AvisDurganCipher.swift,BinaryReader.swift,DirEntry.swift,EGAPalette.swiftFormats/:ObjectDecoder.swift,PictureDecoder.swift,SoundDecoder.swift,ViewDecoder.swift,WordsTokDecoder.swiftGraphics/:DualFramebuffer.swift,PriorityBands.swift,PatternTable.swift,DualFloodFill.swift,BresenhamLine.swiftVM/:AGIVirtualMachine.swift(9-phase interpreter cycle, hardened input parsing, Roger Wilco state, room transitions),ParserEngine.swift,ObjectManager.swift,LogicInterpreter.swift,LogicOpcodes.swift
Sources/SpaceQuestIILogic/:SQ2Inventory.swift: 23 inventory items (Broom, Supporter, Cubix, Watch, Order Form, Translator, Keycard, Spore, Berries, Gem, Whistle, Key, Rope, Rock, Plunger, Glass Cutter, Wire, Capsule, Paperclip, Toilet Paper, Wastebasket, Lighter, Gas Mask)SQ2Vocabulary.swift: Complete natural language dictionary mapping verbs, directions, controls, item synonyms, and environment keywordsSQ2RoomRegistry.swift: Full 115-room topology across Act 1 (1-15), Act 2 (16-70), and Act 3 (71-115) with strictly ordered room exitsSQ2PuzzleStateMachine.swift: Authentic 250-point schedule and action state machine covering all 55 game stepsSQ2WorldLogic.swift: Full room execution, entry triggers, edge exits, and room commands for all 115 roomsLogic0_MainLoop.swift: Executive main loop, hotkeys (F2 Sound, F9 Restart), inventory / score / help / movement handlers
Sources/SpaceQuestIIApp/:GameSession.swift: Observable game session managing AGIVirtualMachine, audio synth, and command routingAppMain.swift: SwiftUI macOS desktop entrypoint with Menu commandsViews/StatusBarView.swift: Authentic AGI status bar formatScore: 0 of 250 Sound: onViews/DialogBoxView.swift: Double-line border dialog box stylingViews/ParserPromptView.swift: Authentic prompt line with blinking block cursorViews/CRTCanvasView.swift: 160x200 EGA canvas with scanline CRT shader emulation
Tests/SpaceQuestIITests/:SQ2InventoryTests.swift: Catalog count, initial inventory, list formatting, keyword lookups (4 tests)SQ2RoomTopologyTests.swift: Act partitioning, 115 rooms existence, exit validations (4 tests)SQ2VocabularyTests.swift: Noise word filtering, parser tokenization, standard dictionary presence (3 tests)SQ2GameSessionTests.swift: Initialization, command execution, movement, sound toggling, restart (4 tests)SQ2WorldLogicTests.swift: Act 1, Act 2, and Act 3 puzzle interactions (6 tests)SQ2EndToEndWalkthroughTests.swift: Full end-to-end walkthrough test achieving 250 / 250 points and victory (1 test)
Commands Run & Verification Evidence
- Local:
swift test: 22 tests across 6 suites, 0 failures (100% green)swift build -c release: rc=0, release binary produced
- Remote Canonical (
rdmsm4x):git push rdmsm4x main: commit125294fpushed successfullyssh rdmsm4x "cd ~/dev/apps/sierra/SpaceQuestII && swift test": 22 tests across 6 suites, 0 failures (100% green)ssh rdmsm4x "cd ~/dev/apps/sierra/SpaceQuestII && swift build -c release": rc=0, release binary produced
How to Undo
- Remote:
ssh rdmsm4x "rm -rf ~/dev/apps/sierra/SpaceQuestII" - Local:
rm -rf /Users/richh/dev/apps/sierra/SpaceQuestII