How marc-borrell/web-game works
1. Project purpose: This repository describes a web application that embeds an interactive Unity-based experience inside a modern browser application. The core architectural idea is not a standalone game or a pure web site, but a hybrid web + Unity client.
2. Primary subsystems: The architecture centers on two client-side runtimes:
- the browser/web app as the host UI and interaction layer
- the Unity runtime as the interactive/game engine content
3. Boundary between systems: The key architectural boundary is the integration bridge between the web layer and Unity. This is the main seam to show in a diagram, because it separates standard web UI concerns from Unity-driven interactive rendering and logic.
4. Bidirectional communication: The README explicitly highlights two-way communication between browser and game engine. That means data flows in both directions:
- browser → Unity: user actions, UI events, configuration, and control messages
- Unity → browser: game state, interaction events, feedback, and possibly status updates
5. Runtime composition: The Unity experience is not described as a separate desktop app; it is part of the browser-delivered experience. So the browser is the execution container that hosts the embedded Unity content.
6. Likely interaction model: The architecture implies a message-based integration pattern rather than tight coupling. In a diagram, this is best represented as an explicit communication channel or adapter layer between the two runtimes.
7. What is not visible here: The provided tree contains only the README, so there is no source-level visibility into backend services, build pipelines, asset management, or deployment topology. Those cannot be asserted from the current repository snapshot.
8. Diagram guidance: The most accurate high-level diagram would show:
- a web application shell in the browser
- an embedded Unity module/runtime inside that shell
- a two-way event/message channel connecting them
- optional annotation that the repo demonstrates integration rather than a larger multi-service system
9. Technology signal: The only concrete technology named in the repository description is Unity alongside a “modern web application.” No external services or server-side components are mentioned in the README.
Components 5
Browser App
Web application shell running in the browser and hosting the embedded experience.
- Web Shell · Top-level browser application that presents the user-facing experience and embeds Unity.
- Web UI · Browser-side interface for controls, interaction, and status display.
Unity Runtime
Embedded Unity engine and interactive content delivered inside the browser experience.
- Unity Runtime · Unity engine executing the interactive experience inside the browser context.
- Game Content · The embedded Unity-driven experience rendered and controlled by the engine.
Other components
- Message Bridge · Bidirectional communication layer between the web app and Unity runtime.
Connections 7
- Web Shell → Web UI: hosts · The browser shell presents the web UI.
- Web Shell → Message Bridge: embeds · The browser container includes the integration layer for Unity communication.
- Web UI → Message Bridge: user actions · User interactions and configuration are sent from the browser UI to Unity.
- Message Bridge → Unity Runtime: commands · Browser-originated control messages are delivered to the Unity runtime.
- Unity Runtime → Message Bridge: state events · Unity publishes game state and interaction feedback back to the browser.
- Message Bridge → Web UI: updates · Returned state and feedback update the browser UI.
- Unity Runtime → Game Content: runs · The engine executes the embedded interactive experience.