How coppersalts/html5b works
Purpose and Entry Points
HTML5b is a browser-only JavaScript/HTML5 port of the Flash game BFDIA 5b. It implements gameplay, level creation, and level exploration without a server runtime. The primary launch document is index.html; the main application/game implementation is concentrated in 5b.js. authredirect.html appears to support an external authorization/redirect flow.
Application Shell and Runtime
index.html establishes the browser page and loads the game assets/runtime. style.css supplies the UI presentation layer. The game runs directly in the client browser using DOM, canvas/media capabilities, and JavaScript rather than a framework or backend service.
• index.html
• 5b.js
• style.css
Core Game and Editor Engine
5b.js is the architecture-defining application module: based on the repository’s compact structure and README, it contains the translated ActionScript-derived mechanics for level execution, entities, collision/interaction behavior, UI state, the level creator, and explore workflows. It is the primary control-flow owner from initialization through input handling, simulation, rendering, and screen transitions.
• 5b.js
Level Data Boundary
Levels are stored as static repository data rather than fetched from an application API. The runtime reads level definitions from data/levels.txt, likely parsing them into the in-memory structures consumed by both gameplay and the creator/explorer features. This file forms the key persistence/content boundary for playable maps.
• data/levels.txt
• 5b.js
Asset Loading and Rendering
Visual content is organized under visuals/ by rendering role: backgrounds, blocks, entities, body parts, effects, borders, shadows, and UI components. The runtime maps game state to these static image assets, while data/images6.json likely provides image metadata or an asset manifest used during loading/rendering.
• visuals/bg
• visuals/blocks
• visuals/entities
• visuals/ui
• data/images6.json
Audio and Media
Gameplay audio is delivered as a static browser-playable WAV asset. There is no evidence of streaming, media processing, or an audio service; audio is packaged alongside game data and controlled by the client runtime.
• data/the fiber 16x loop.wav
• 5b.js
External/Offline Boundaries
The repository has no visible backend, database, package manifest, or deployment infrastructure. Browser hosting is sufficient. authredirect.html is the only visible integration-oriented boundary and may handle redirects for an external identity or hosting-related authorization process; its exact provider is not represented in the supplied tree.
• authredirect.html
• index.html
Main entry points: 5b.js Canvas and UI rendering · index.html Main launch page · levels.txt Level definitions · authredirect.html Authorization redirect
Components 14
Browser Shell
- Main launch page
index.html - UI styles
style.css - Authorization redirect · External redirect boundary; provider is unspecified.
authredirect.html
Game Runtime
- Game and editor engine · Owns initialization, screens, input, simulation, rendering, and editor/explorer workflows.
5b.js - Gameplay simulation · Level execution, entities, collisions, and interactions.
5b.js - Creator and explorer · Creates and explores level content within the client runtime.
5b.js - Canvas and UI rendering · Maps runtime state to browser visual output.
5b.js
Static Content
- Level definitions
data/levels.txt - Image metadata
data/images6.json - Gameplay audio loop
data/the fiber 16x loop.wav
Visual Assets
- Background images
visuals/bg - Block images
visuals/blocks - Entity images
visuals/entities - UI images
visuals/ui
Connections 15
- Main launch page → UI styles: applies
- Main launch page → Game and editor engine: loads
- Authorization redirect → Main launch page: returns to
- Game and editor engine → Gameplay simulation: runs
- Game and editor engine → Creator and explorer: runs
- Game and editor engine → Canvas and UI rendering: drives
- Game and editor engine → Level definitions: reads
- Creator and explorer → Level definitions: uses level content
- Gameplay simulation → Canvas and UI rendering: produces game state
- Canvas and UI rendering → Image metadata: uses metadata
- Canvas and UI rendering → Background images: renders
- Canvas and UI rendering → Block images: renders
- Canvas and UI rendering → Entity images: renders
- Canvas and UI rendering → UI images: renders
- Game and editor engine → Gameplay audio loop: controls playback