# grassblock2763/cuttherope-dx-web architecture

> Architecture diagram of the GitHub repository grassblock2763/cuttherope-dx-web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/grassblock2763/cuttherope-dx-web
- Repository: https://github.com/grassblock2763/cuttherope-dx-web

## Overview

#### Purpose and Delivery Model
This is a published browser build of a Cut the Rope-style game, not source code. The playable application runs locally in the browser as .NET WebAssembly, with a Core game assembly and SkiaSharp rendering dependency. Key artifacts: `wwwroot/index.html`, `wwwroot/_framework/CutTheRopeDX.Browser.mkuixgbals.wasm`, `wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm`.

#### Startup and Runtime Bootstrap
`wwwroot/index.html` is the browser entry point. It loads JavaScript bootstrap/application glue, then the .NET runtime from `wwwroot/_framework/dotnet.js`; the runtime loads native/runtime support and managed assemblies. `CutTheRopeDX.Browser.runtimeconfig.json` defines runtime settings, while `wwwroot/_framework/dotnet.native.tvczd2v3t5.wasm` supports execution in WebAssembly.

#### Game Application Boundary
The compiled Browser assembly is the platform host; the compiled Core assembly contains the reusable game domain/runtime. Because only binary output is present, internal scene, physics, level, and state APIs cannot be recovered from this tree. The principal managed boundary is `wwwroot/_framework/CutTheRopeDX.Browser.mkuixgbals.wasm` → `wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm`.

#### Rendering and Browser Interop
SkiaSharp is bundled as a managed WebAssembly dependency, indicating canvas/graphics rendering is driven by the .NET game runtime rather than conventional DOM UI. JavaScript adapters likely provide browser-specific capabilities: WebGL context setup in `wwwroot/glcontext.js`, cursor/input behavior in `wwwroot/cursor.js`, and loading feedback in `wwwroot/loading-progress.js`.

#### Content and Asset Loading
Game content is statically hosted under `wwwroot/content`. Asset metadata and initial packaging are represented by `wwwroot/content/assets.json`, `wwwroot/content/.build-manifest.json`, and `wwwroot/content/tier0.json`. The game runtime consumes themed images, fonts, music, and effect assets from this boundary; no remote content API is evident.

#### Audio, Media, and Client Persistence
Browser JavaScript bridges isolate non-rendering platform integrations from managed gameplay: `wwwroot/audio.js` for music/SFX playback, `wwwroot/video.js` for video, `wwwroot/storage.js` for client-side persistence, and `wwwroot/fetch.js` for browser fetch access. Audio content includes level/theme music and gameplay effects beneath `wwwroot/content/sounds`.

#### Offline Hosting and Infrastructure
This is a static/PWA deployment. `wwwroot/service-worker.js`, `wwwroot/service-worker-assets.js`, and `wwwroot/manifest.webmanifest` support installability and offline asset caching. `web.config` suggests IIS-compatible hosting, while precompressed `.br` and `.gz` variants enable server/CDN content negotiation. No backend service, database, authentication provider, or external API is visible.

Main entry points: [`wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm`](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm) (Core game runtime), [`wwwroot/index.html`](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/index.html) (HTML entry point), [`wwwroot/_framework/dotnet.js`](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/dotnet.js) (.NET bootstrap), [`wwwroot/service-worker.js`](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/service-worker.js) (Service worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bootstrap["Browser bootstrap"]
  node_browser(("Browser<br/>execution environment"))
  node_index["HTML entry point<br/>static entry<br/>[index.html]"]
  node_dotnet[".NET bootstrap<br/>runtime loader<br/>[dotnet.js]"]
end

subgraph group_managed[".NET game runtime"]
  node_runtimeconfig["Runtime configuration"]
  node_native["Native WASM runtime<br/>WebAssembly runtime"]
  node_browser_assembly{{"Browser host<br/>managed WebAssembly assembly"}}
  node_core_assembly{{"Core game runtime<br/>managed WebAssembly assembly"}}
  node_skia["SkiaSharp<br/>managed rendering dependency"]
end

subgraph group_interop["Browser integrations"]
  node_graphics["WebGL context adapter<br/>JavaScript bridge<br/>[glcontext.js]"]
  node_input["Cursor/input adapter<br/>JavaScript bridge<br/>[cursor.js]"]
  node_platform_bridges["Media and platform bridges<br/>JavaScript bridges<br/>[audio.js]"]
end

subgraph group_content["Static content"]
  node_content_manifest["Asset metadata<br/>content manifests<br/>[assets.json]"]
  node_game_assets["Game assets<br/>static content"]
end

subgraph group_offline["Offline delivery"]
  node_service_worker["Service worker<br/>offline cache worker<br/>[service-worker.js]"]
  node_worker_assets["Offline asset list<br/>cache manifest"]
  node_web_manifest["PWA manifest<br/>install manifest"]
  node_iis["IIS hosting config<br/>static hosting config<br/>[web.config]"]
end

node_browser -->|"loads"| node_index
node_index -->|"starts"| node_dotnet
node_dotnet -->|"reads"| node_runtimeconfig
node_dotnet -->|"loads"| node_native
node_dotnet -->|"loads"| node_browser_assembly
node_browser_assembly -->|"uses"| node_core_assembly
node_core_assembly -->|"renders through"| node_skia
node_core_assembly -.->|"uses"| node_graphics
node_core_assembly -.->|"uses"| node_input
node_core_assembly -.->|"uses"| node_platform_bridges
node_core_assembly -->|"reads asset metadata"| node_content_manifest
node_content_manifest -->|"indexes"| node_game_assets
node_platform_bridges -->|"plays media"| node_game_assets
node_browser -->|"registers"| node_service_worker
node_service_worker -->|"uses"| node_worker_assets
node_service_worker -.->|"caches"| node_index
node_service_worker -.->|"caches"| node_game_assets
node_web_manifest -.->|"describes installable app"| node_index
node_iis -->|"serves"| node_index

click node_index "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/index.html"
click node_dotnet "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/dotnet.js"
click node_runtimeconfig "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/CutTheRopeDX.Browser.runtimeconfig.json"
click node_native "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/dotnet.native.tvczd2v3t5.wasm"
click node_browser_assembly "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/CutTheRopeDX.Browser.mkuixgbals.wasm"
click node_core_assembly "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm"
click node_graphics "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/glcontext.js"
click node_input "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/cursor.js"
click node_platform_bridges "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/audio.js"
click node_content_manifest "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/content/assets.json"
click node_game_assets "https://github.com/grassblock2763/cuttherope-dx-web/tree/main/wwwroot/content"
click node_service_worker "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/service-worker.js"
click node_worker_assets "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/service-worker-assets.js"
click node_web_manifest "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/manifest.webmanifest"
click node_iis "https://github.com/grassblock2763/cuttherope-dx-web/blob/main/web.config"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser,node_index,node_dotnet toneBlue
class node_runtimeconfig,node_native,node_browser_assembly,node_core_assembly,node_skia toneAmber
class node_graphics,node_input,node_platform_bridges toneMint
class node_content_manifest,node_game_assets toneRose
class node_service_worker,node_worker_assets,node_web_manifest,node_iis toneIndigo
```

## Components

### Browser bootstrap

- **Browser**: execution environment · Runs the static WebAssembly game locally.
- [HTML entry point](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/index.html): static entry · `wwwroot/index.html`
- [.NET bootstrap](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/dotnet.js): runtime loader · `wwwroot/_framework/dotnet.js`

### .NET game runtime

- [Runtime configuration](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/CutTheRopeDX.Browser.runtimeconfig.json): runtime config · `CutTheRopeDX.Browser.runtimeconfig.json`
- [Native WASM runtime](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/dotnet.native.tvczd2v3t5.wasm): WebAssembly runtime · `wwwroot/_framework/dotnet.native.tvczd2v3t5.wasm`
- [Browser host](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/CutTheRopeDX.Browser.mkuixgbals.wasm): managed WebAssembly assembly · Platform host for the game application. · `wwwroot/_framework/CutTheRopeDX.Browser.mkuixgbals.wasm`
- [Core game runtime](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm): managed WebAssembly assembly · Reusable compiled game domain and runtime. · `wwwroot/_framework/CutTheRopeDX.Core.03r3wm98bj.wasm`
- **SkiaSharp**: managed rendering dependency · Provides graphics rendering for the managed game.

### Browser integrations

- [WebGL context adapter](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/glcontext.js): JavaScript bridge · `wwwroot/glcontext.js`
- [Cursor/input adapter](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/cursor.js): JavaScript bridge · `wwwroot/cursor.js`
- [Media and platform bridges](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/audio.js): JavaScript bridges · Audio, video, storage, and fetch browser capabilities. · `wwwroot/audio.js`

### Static content

- [Asset metadata](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/content/assets.json): content manifests · Initial asset packaging and tier metadata. · `wwwroot/content/assets.json`
- [Game assets](https://github.com/grassblock2763/cuttherope-dx-web/tree/main/wwwroot/content): static content · Themed images, fonts, music, and effects. · `wwwroot/content`

### Offline delivery

- [Service worker](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/service-worker.js): offline cache worker · `wwwroot/service-worker.js`
- [Offline asset list](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/service-worker-assets.js): cache manifest · `wwwroot/service-worker-assets.js`
- [PWA manifest](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/wwwroot/manifest.webmanifest): install manifest · `wwwroot/manifest.webmanifest`
- [IIS hosting config](https://github.com/grassblock2763/cuttherope-dx-web/blob/main/web.config): static hosting config · Supports IIS-compatible deployment. · `web.config`

## Connections

- Browser → HTML entry point: loads
- HTML entry point → .NET bootstrap: starts
- .NET bootstrap → Runtime configuration: reads
- .NET bootstrap → Native WASM runtime: loads
- .NET bootstrap → Browser host: loads
- Browser host → Core game runtime: uses
- Core game runtime → SkiaSharp: renders through
- Core game runtime → WebGL context adapter: uses
- Core game runtime → Cursor/input adapter: uses
- Core game runtime → Media and platform bridges: uses
- Core game runtime → Asset metadata: reads asset metadata
- Asset metadata → Game assets: indexes
- Media and platform bridges → Game assets: plays media
- Browser → Service worker: registers
- Service worker → Offline asset list: uses
- Service worker → HTML entry point: caches
- Service worker → Game assets: caches
- PWA manifest → HTML entry point: describes installable app
- IIS hosting config → HTML entry point: serves
