$ show HarbourMasters/Starship
Starship is a source port of Star Fox 64 (Lylat Wars) for modern platforms including Windows, macOS, Linux, and Nintendo Switch. It requires a legal copy of the original Nintendo 64 ROM (version 1.0 or 1.1 in .z64 format) to extract assets and run. The project reimplements the Nintendo 64's libultra SDK and game engine systems while adding modern enhancements such as mod support via OTR/O2R asset files, configurable graphics backends (OpenGL/DirectX/Metal), debugging tools, and quality-of-life features. The architecture centers around a cross-platform porting layer (libultraship) handling windowing, input, and rendering, with core game logic in src/engine/ and src/overlays/ managing game state, rendering, audio, and input. Key systems include a resource factory pattern for asset importing, an event-based communication system, audio heap management with caching, and an ImGui-driven UI for runtime configuration and mods.
The LLM identified 5 files worth highlighting for reuse:
A collection of isolated factory classes (AnimationFactory, SampleFactory, SkeletonFactory, etc.) that import various asset types from XML/binary formats into engine-usable structures. Each factory is self-contained, depends only on its product type and minimal utilities, and demonstrates the factory pattern with worker-thread decoding and caching integration. Easily extractable for reuse in other projects needing typed asset loading.
A priority-based event system enabling decoupled communication between game subsystems. Listeners can subscribe to events with priority levels and receive synchronous or asynchronous notifications. The system is isolated (depends only on basic threading primitives), thread-safe, and demonstrates non-trivial event dispatch logic with priority ordering and sync/async handling. Reusable in any application requiring event-driven architecture.
Manages audio memory pools with temporary/persistent caches for sequences, fonts, and sample banks. Implements LRU eviction via TTL (time-to-live) and deterministic allocation from fixed-size pools. Demonstrates sophisticated cache hierarchy and background loading patterns. While audio-subsystem coupled, the core pooling/caching logic could be adapted for managing any cacheable media resources in other projects.
Provides reusable ImGui widgets (checkboxes, sliders, comboboxes) bound to console variables (CVars) with automatic saving/loading of state. Isolated from game logic, depends only on ImGui and CVar system, and demonstrates skill in creating a persistent, uniform settings UI. Easily extractable for any ImGui-based application needing quick configuration panels with persistence.
Implements a double-buffered DMA system for audio data transfer with reuse queues to minimize stalls. Handles synchronous/asynchronous loading and completion signaling via OSMesgQueue. Shows skill in optimizing for hardware constraints while maintaining flexibility. The DMA/reuse queue pattern could be adapted for other streaming data scenarios, though it interacts with audio-specific global state.