How ojh050118/circle works
Project Type and Purpose
• This is a multi‐platform, fanmade game client (“Circle”) for the rhythm game “A Dance of Fire and Ice.”
• It targets Android, iOS, Linux, macOS, Windows and includes a core game engine, shared assets, platform‐specific frontends, deployment tooling, and automated tests.
• Core Engine (“Circle.Game”):
– Beatmap management (loading, parsing, caching)
– Rendering pipeline (graphics, shaders, containers)
– Input & rulesets (tile definitions, gameplay logic)
– UI Overlays & Screens (menus, playfield, settings)
– Converters (Adofai → internal format, JSON serializers)
– I/O subsystems (file readers, archive readers, storage abstractions)
• Shared Resources (“Circle.Resources”):
– Fonts, audio samples, shaders, textures
– Exposed via a resource‐provider layer to the core engine
• Platform Frontends:
– Android (“Circle.Android”): Activity entry point, AndroidManifest, Resources
– iOS (“Circle.iOS”): AppDelegate, storyboard, entitlements, Info.plist
• Deployment Tooling (“Circle.Desktop.Deploy”):
– Builders per OS (AndroidBuilder, IOSBuilder, LinuxBuilder, MacOSBuilder, WindowsBuilder)
– Uploader modules (GitHubUploader, VelopackUploader variants)
– Entry program orchestrating build+upload
• Testing Suite (“Circle.Game.Tests”):
– Visual test scenes for UI components, gameplay elements, overlays, selectors
– NUnit console runner configured in CI
Relationships & Data Flow
• All platform projects reference the Core Engine and Shared Resources.
• Core Engine loads assets via the IStorageResourceProvider abstraction.
• At runtime, Input → Game Logic → Rendering → Output on screen/sound device.
• Deployment tool consumes compiled platform binaries & templates → produces installers/packages → pushes to GitHub or Velopack.
• CI workflow (ci.yml) runs build → tests (report‐nunit.yml) → packaging → release artifacts.
Architectural Patterns & Principles
• Modular layering: separation of “Engine,” “Resources,” “Frontends,” “Deploy.”
• Dependency injection via interfaces (IBeatmapResourceProvider, IWorkingBeatmapCache, IStorageResourceProvider).
• MVC‐like screens/states for UI flow (Screen stack, overlays).
• Strategy pattern in Builders & Uploaders for platform‐specific packaging.
• Single Responsibility: each directory/class has a focused concern (graphics, IO, input, conversion).