How ferryyoungfan/virtualcockroach works
Project type and purpose
• This is a standalone desktop “pet” application built on the Adobe Air (Flash) runtime.
• Purpose: display and animate a virtual cockroach on the user’s Windows or macOS desktop, with interactive modules (feeding, roaming, shop, animations), system tray integration, and packaged for distribution as both .air and self-contained .exe/.zip.
File structure
• Top-level assets & source:
• VirtualCockroach.fla – the master Flash project containing code (ActionScript), timelines, UI layouts.
• Releases folder:
• Release_成品发布/Mac_Win_AirPack/*.air – Adobe-Air installer packages for both platforms.
• Release_成品发布/WinX86_exe_zip/*.zip / .exe – self-contained Windows executables and zipped versions.
• Historical versions in __Old__ for traceability.
• No separate backend or database directories—this is entirely client-side.
• Build/deployment is via Adobe Air SDK or the Flash IDE’s packaging tools.
README for additional insights
• Confirms use of Adobe Air, highlights features added over versions (tray menu, shop, animations, localization, bug fixes).
• No external web services or backend APIs—purely local desktop integration.
• Versioning and distribution methods (.air vs .exe) must be represented.
Main components & interactions
a. Components
1. Development environment
– Flash IDE / Adobe Animate + AIR SDK
– Source FLA files & asset library
2. Build/packaging pipeline
– AIR compiler
– .air package generator
– Captive runtime packager for Windows .exe/.zip
3. Runtime environment
– Adobe AIR runtime (captive or standalone)
4. Application modules inside AIR
– UI layer (window, animations, context menus)
– Behavior engine (roaming AI, feeding logic, shop logic, easter-egg triggers)
5. User Desktop
– OS-level interactions: system tray, window manager, user input (clicks, drag)
b. Relationships & data flow
• User ↔ AIR Runtime: input events flow into the UI layer.
• UI layer ↔ Behavior engine: UI triggers behavior modules (e.g., feed action).
• Behavior engine ↔ Asset manager: requests sprites/animations.
• Build pipeline → outputs → end user: packaging transforms FLA → .swf + descriptor → .air/.exe → installation
c. Architectural patterns/design principles
– Modular separation: UI vs. logic vs. asset management vs. system integration
– Single runtime host (Adobe AIR) encapsulates all modules
– Packaging pipeline decoupled from runtime logic
d. Key technologies/frameworks
– Adobe Flash/Animate (FLA for authoring, ActionScript 3)
– Adobe AIR (XML descriptor, captive runtime packaging)