Shadow Link Awakening Engine Architecture Breakdown

Shadow Link Awakening Engine Architecture Breakdown

Why your 200MB WebGL indie slop is a skill issue and how 24 decoupled BEJSON 105 tables pwn three parity runtimes simultaneously.

Author: Leethaxor69 · Peer Review: Elton Boehnen Repository: github.com/boehnenelton/Sword-Slasher-v2 Target Architecture: BEJSON 105 (2.0.0-105) Multi-File Database + Tri-Runtime Simulation Engine Playable App: Sword Slasher: Shadow Link's Awakening (Fullscreen App) · Interactive Game Page Video Showcase: YouTube: Sword Slasher 2 Gameplay & Parity Architecture License: PolyForm-Noncommercial-1.0.0

+-----------------------------------------------------------------------------------+
|                      GAME_DATA/RAW (24 BEJSON 2.0.0-105 TABLES)                   |
|  105a.mfdb.bejson | levels.105 | actor_stats.105 | sprites_manifest.105a          |
|  items.105 | audio_manifest.105a | combat/*.105a.bejson (4 registries)            |
+--------------------+------------------------------+-------------------------------+
                     |                              |
         +-----------v-----------+      +-----------v-----------+      +------------+
         |  React / TS Client    |      |  Vanilla JS Mirror    |      | Compile.py |
         |  src/engine/          |      |  Engines/JS/          |      | Experimental|
         |  bejsonEngine.ts      |      |  config.json -> raw/  |      | Bundler    |
         +-----------+-----------+      +-----------+-----------+      +------+-----+
                     |                              |                         |
                     v                              v                         v
           GameViewport.tsx                   main.js (ES6)         standalone-game.html
     [BEJSONCanvasSpriteManager + lib_bejson_Gaming_npc_combat_ai + 13f Sword Frame Data]

Video Showcase & Gameplay Architecture

Watch the live multi-runtime simulation demonstration, 60 Hz sword frame data, and standard NPC combat AI in action: <img src="https://img.youtube.com/vi/MJPcbN8C4lM/maxresdefault.jpg" alt="Sword Slasher 2 Gameplay Video" loading="lazy"> Direct YouTube Link: https://youtu.be/MJPcbN8C4lM


Chapter 1: Zero-Coupling Mandate and Multi-Runtime Parity

Per my last message—and yes, I had to blow Cheeto dust out of my mechanical W switch before typing tthis—most "indie web game devs" on GitHub are straight-up clowns. You clone their repo, run npm install, and watch 400MB of node_modules trash download just to render a laggy 2D square inside a monolithic Game.tsx component where enemy HP, tilemap coordinates, and hitbox offsets are hardcoded inside useEffect hooks. That is suboptimal n00b code. Pure pebkac.

Shadow_Link_Awakening (Sword-Slasher-v2) completely pwns that garbage by enforcing one non-negotiable architectural law from AGENTS.md: the simulation engine must know nothing about the game itself. Source code (.ts, .js, .py) is a pure execution runtime; all game state, physics constants, actor archetypes, level dimensions, sprite sheets, audio synths, and combat tables live exclusively inside decoupled BEJSON 105 (2.0.0-105) files.

Vanilla JS Parity Engine Debug Chamber

1.1 Three Parity Runtimes, One Data Root

Because the data layer is 100% decoupled, Shadow_Link_Awakening runs three independent simulation targets off the exact same game_data/raw/ directory:

  1. **TypeScript / React Client (src/)**:
  • [src/engine/bejsonEngine.ts](https://github.com/boehnenelton/Sword-Slasher-v2/blob/main/src/engine/bejsonEngine.ts) fetches all 24 BEJSON documents from /data/ (public/data/, synced from game_data/raw/) and registers them into bejsonGaming.
  • src/components/GameViewport.tsx renders the 2.5D sorted canvas, HUD, and touch gamepad deck.
  1. **Vanilla ES6 JavaScript Mirror (Engines/JS/)**:
  • Zero framework overhead, zero bundler required. Engines/JS/config.json points raw_data_path to ../../game_data/raw and lib_path to ../../src/lib/lib_js.
  • Engines/JS/main.js loads the exact same .105.bejson and .105a.bejson files via relative URL resolution and runs the same simulation loop.
  1. **Experimental Single-File Compiler (Engines/Experimental/)**:
  • Engines/Experimental/Compiler/Compile.py walks game_data/raw/, packs all 24 datasets into compiled_game_bundle.105.bejson, and injects the entire game into a single offline-runnable standalone-game.html.
// Engines/JS/config.json — zero hardcoded absolute paths, 100% portable
{
  "raw_data_path": "../../game_data/raw",
  "lib_path": "../../src/lib/lib_js"
}

1.2 Why Other Web Indie Architectures Get Rekt

Let's compare the deliverable metrics like an actual systems engineer instead of a script kiddie:

Architectural Dimension Typical Indie Web Game Shadow_Link_Awakening
Game Data Coupling Hardcoded in .tsx / .js / .cs classes 100% decoupled in 24 BEJSON 2.0.0-105 tables
Runtime Portability Locked to React, Phaser, or Unity WebGL 3 parity targets (React/TS, Vanilla JS, Single-File HTML)
Payload Bloat 15MB–120MB WebGL / asset bundles Sub-200KB data + procedural Web Audio + 1x pixel sheets
Lookup Complexity Repeated Object.keys() / nested object traversal Map<string, number> Field Map Cache (getFieldValue)
Offline Distribution Requires Vite/Express dev server standalone-game.html runs directly from disk

When Elton Boehnen designed this separation, he made sure you could swap an entire enemy faction, rebalance weapon damage, or port the simulation loop to Python/Flask (Engines/PY/) without touching a single line of level data. If your engine breaks when you rename a JSON key, sit—that's a skill issue.


Chapter 2: BEJSON 105 (2.0.0-105) MFDB Envelope and Field Map Cache

If you're still storing 500 enemy records as an array of 500 JSON objects repeating "stat_max_health_points_count": 80 five hundred times, congratulations: you're burning RAM and network bandwidth on duplicate key strings. That's legacy garbage.

Shadow_Link_Awakening runs on **BEJSON 105 (Schema_Version: "2.0.0-105")**, a columnar-header + scalar-row matrix format governed by src/lib/lib_bejson_Core_bejson_core.ts. Every table declares Fields once, and Values is a tight 2D matrix of scalar primitives.

2.1 Canonical 2.0.0-105 Envelope Contract

Every valid table in game_data/raw/ enforces these exact top-level metadata keys and Fields[0] primary key placement:

{
  "Format": "BEJSON",
  "Format_Version": "105a",
  "Format_Creator": "Elton Boehnen",
  "Schema_Version": "2.0.0-105",
  "Parent_Hierarchy": "../manifest/105a.mfdb.bejson",
  "Write_Owner_Module": "lib_bejson_Gaming_bejson_assets.js",
  "Primary_Key_Field": "spr_uuid",
  "Type_Discriminator_Field": "spr_record_type",
  "Domain_Type_Field": "spr_animation_sheet_type",
  "Records_Type": ["SpriteAssetManifest"],
  "Fields": [
    { "name": "spr_uuid", "type": "string", "required": true, "primary_key": true }
  ],
  "Values": []
}

2.2 The Field Map Cache & Validation Gate (BejsonCoreEngine)

Look at src/lib/lib_bejson_Core_bejson_core.ts. Positional indexing (row[6]) is strictly banned because inserting or reordering a column would silently corrupt every lookup. Instead, BejsonCoreEngine builds a Map<string, number> once per document:

export class BejsonCoreEngine {
  private fieldMapCache: Map<string, Map<string, number>> = new Map();

  public buildFieldMapCache(docKey: string, fields: BejsonFieldDef[]): Map<string, number> {
    const map = new Map<string, number>();
    fields.forEach((f, idx) => {
      const cleanName = this.sanitizeString(f.name);
      map.set(cleanName, idx);
    });
    this.fieldMapCache.set(docKey, map);
    return map;
  }

  public getFieldValue(docKey: string, row: (string | number | boolean | null)[], fieldName: string): any {
    const map = this.fieldMapCache.get(docKey);
    if (!map) {
      throw new Error(`${E_BEJSON_FIELD_MAP_NOT_BUILT}: Field map cache not found for '${docKey}'`);
    }
    const cleanFieldName = this.sanitizeString(fieldName);
    const colIdx = map.get(cleanFieldName);
    if (colIdx === undefined || colIdx < 0 || colIdx >= row.length) return null;
    const val = row[colIdx];
    return typeof val === 'string' ? this.sanitizeString(val) : val;
  }
}

And before any dataset is trusted, validateDocument(doc) checks:

  1. Format === 'BEJSON' (E_BEJSON_INVALID_FORMAT)
  2. Format_Creator === 'Elton Boehnen' (E_BEJSON_INVALID_CREATOR)
  3. Format_Version in ['104a', '105', '105a', '105db'] (E_BEJSON_UNSUPPORTED_VERSION)
  4. row.length === fields.length for every row (E_BEJSON_RECORD_LENGTH_MISMATCH)
  5. required non-null checks (E_BEJSON_NULL_VIOLATION) and enum membership (E_BEJSON_ENUM_VIOLATION).

No silent undefined leaks, no NaN propagation in physics ticks. If a schema is broken, the barrier catches it at load time.


Chapter 3: The 24-Dataset World, Level, and Chunk Pipeline

Most web engines hardcode room transitions and spawn coordinates in a giant switch (roomName) block. In Shadow_Link_Awakening, the entire world graph is driven by game_data/raw/manifest/105a.mfdb.bejson (18 manifest rows linking SCHEMA, WORLD, ACTOR, ITEM, EVENT, ASSET, CHUNK, and RUNTIME tables) plus 6 runtime/combat stores—24 datasets total.

3.1 Levels, Biomes, and Portal Linking

Let's inspect game_data/raw/levels/levels.105.bejson. Each GameLevel row declares:

  • lvl_uuid (PK), lvl_environment_zone_type (CAVERN_DUNGEON, BOSS_ARENA, SAFE_HUB, OVERWORLD_FIELD), lvl_map_size_tier_type (MEDIUM_64X64, etc.), lvl_width_tiles_count (64), lvl_height_tiles_count (64), lvl_tile_unit_size_px (16).
  • Foreign keys lvl_biome_uuid_fk -> biomes.biome_uuid and lvl_bgm_audio_uuid_fk -> audio.aud_uuid.
105a.mfdb.bejson
  |-- biomes.105.bejson          (biome_uuid, ambient synth profile, floor palette)
  |-- levels.105.bejson          (lvl_uuid -> biome_uuid_fk, bgm_audio_uuid_fk)
  |-- portals.105.bejson         (source_lvl_uuid -> target_lvl_uuid, target_x, target_y)
  |-- cave_chunk_0_0.105.bejson  (64x64 tile matrix chunk)
  |-- objects.105.bejson         (breakables, pedestals, triggers)
  `-- object_rules.105.bejson    (collision & interaction rules)

In src/lib/lib_bejson_Gaming_engine.ts, bejsonGaming parses these tables into typed interfaces (GamingLevelRecord, GamingActorRecord, GamingItemRecord, GamingPortalRecord) using bejsonCore.getFieldValue. Notice what this buys us: zero Tiled JSON bloat, zero XML parsing, and deterministic foreign-key integrity across rooms (Debug Chamber, Ganon Sanctuary, Forgotten Cavern, Castle Courtyard).

Experimental Engine Debug Chamber Map

When the player steps onto a portal trigger or switches rooms in the test harness, the engine resolves the target level dimensions (64 * 16 = 1024x1024px), updates the active biome audio profile, and centers the camera viewport around (px, py) with zero map-folding artifacts.


Chapter 4: 1x Sprite Sheet Slicing and Canvas Pixel Rendering

Let's talk about a classic n00b mistake we caught and nuked during QA: **5-argument ctx.drawImage(img, x, y, 32, 32) on a multi-frame sprite sheet.** If you pass 5 arguments instead of 9 (sx, sy, sw, sh, dx, dy, dw, dh), Canvas squishes the entire 4x4 128x128 sheet (all 16 frames at once!) into a single 32x32 box. Literal clown behavior.

Shadow_Link_Awakening enforces strict 1x-scale sprite sheets in public/assets/sprites/ and public/assets/vfx/, indexed by game_data/raw/sprites/sprites_manifest.105a.bejson and sliced by BEJSONCanvasSpriteManager (src/lib/lib_bejson_Gaming_sprite_canvas.ts & Engines/JS/lib_bejson_Gaming_sprite_canvas.js).

Sprite Sheet Dimensions Grid Cell Size
shadow_link_sheet_32x32.png 128 x 128 4 x 4 32 x 32
shadow_link_bow_sheet_32x32.png 128 x 128 4 x 4 32 x 32
shadow_arrow_flight_32x32.png 128 x 32 4 x 1 32 x 32
hyrule_knight_sheet_32x32.png 128 x 32 4 x 1 32 x 32
hyrule_archer_sheet_32x32.png 128 x 32 4 x 1 32 x 32
hyrule_mage_sheet_32x32.png 128 x 32 4 x 1 32 x 32
vfx_arrow_impact_dynamics_48x48.png 192 x 192 4 x 4 48 x 48

Shadow Link Sprite Sheet Hyrule Knight Sprite Sheet Hyrule Archer Sprite Sheet Hyrule Mage Sprite Sheet

4.1 Crisp Nearest-Neighbor Cell Slicing

Every drawCell call disables bilinear blurring (ctx.imageSmoothingEnabled = false) and computes exact source coordinates (col * frameWidth, row * frameHeight):

public drawCell(
  ctx: CanvasRenderingContext2D,
  sheetKey: string,
  col: number,
  row: number,
  dx: number,
  dy: number,
  dw: number,
  dh: number,
  flipX: boolean = false
): boolean {
  const img = this.images.get(sheetKey);
  const cfg = this.sheets[sheetKey];
  if (!img || !cfg || !img.complete || img.naturalWidth <= 0) return false;

  const sx = col * cfg.frameWidth;
  const sy = row * cfg.frameHeight;

  ctx.save();
  ctx.imageSmoothingEnabled = false;
  ctx.drawImage(img, sx, sy, cfg.frameWidth, cfg.frameHeight, dx, dy, dw, dh);
  ctx.restore();
  return true;
}

Notice the img.complete && img.naturalWidth > 0 guard. If an asset is still streaming over HTTP, the renderer falls back cleanly without throwing InvalidStateError: HTMLImageElement provided is in the 'broken' state.


Chapter 5: 60 Hz Sword Frame Data, Handedness, and Sword Beams

Most browser games treat melee attacks like a single-frame rectangle flash. Shadow_Link_Awakening models real 60 Hz frame data inside Engines/JS/main.js and GameViewport.tsx:

  1. **13-Frame Slash Commitment (~216.7 ms)**: executeSwordSlash() sets slashAnim = { x: px, y: py, dir: playerFacing, timer: 13, maxTimer: 13, variation: varIdx } and swordCooldown = 13. Walking velocity zeroes out during those 13 frames, with zero post-swing recovery lock—you can immediately chain another swing on frame 14.
  2. 4-Frame Phased Swing Visuals: Instead of rendering a static full-arc pie wedge all at once, renderSwordSlash() quantizes progress into 4 discrete frames:
  • Frame 0 (Wind-up): -0.48 * sweepSpan, 0.68x blade reach.
  • Frame 1 (Active Strike): -0.08 * sweepSpan, 1.0x reach + stepped crescent trail.
  • Frame 2 (Peak Cleave): +0.32 * sweepSpan, 1.12x reach + previous-frame ghost afterimage.
  • Frame 3 (Follow-Through): +0.50 * sweepSpan, 0.82x reach, fading trail.
  1. Cardinal Handedness & Mirrored East Arc:
  • Facing UP, DOWN, or LEFT sweeps clockwise (sweepDir = 1).
  • Facing RIGHT mirrors the sweep counterclockwise (sweepDir = -1), matching ambidextrous horizontal sprite mirroring.
  1. **Sword-Hold Stance (isCharging)**:
  • Holding the blade extended locks playerFacing (allowing strafing and backpedaling without rotating), applies a 0.833x (~16.7%) movement speed penalty, and projects an active 20x20 poke hitbox 26px ahead (12 poke damage, 15f recoil, 24f i-frames).
  1. Full-Health Sword Beam:
  • When playerHp >= playerMaxHp, every standard slash spawns a sword_beam projectile (5.5 px/frame, 12 damage) along playerFacing.

JS Engine Full-Health Sword Beam Experimental Engine 4-Frame Sword Slash

// Cardinal handedness + 4-frame stepped slash in Engines/JS/main.js
const frameIdx = Math.min(3, Math.floor(progress * 4));
const phaseAngles = [-0.48, -0.08, 0.32, 0.50];
const phaseLengths = [0.68, 1.0, 1.12, 0.82];
const sweepDir = facing === 'RIGHT' ? -1 : 1;
const currentBladeAngle = baseAngle + phaseAngles[frameIdx] * sweepSpan * sweepDir;

Chapter 6: Standard NPC Combat AI and Staggered Frame Rules

Dumb indie games give every enemy if (dist < 200) moveTowardPlayer(). That's baby-mode AI. Shadow_Link_Awakening implements a deterministic Two-Tiered Standard NPC Combat AI in Engines/JS/lib_bejson_Gaming_npc_combat_ai.js (and src/lib/lib_bejson_Gaming_npc_combat_ai.ts) backed by actor_stats.105.bejson.

6.1 Global Status Modes vs. Local Sub-States

  • Global Status Modes intercept normal AI whenever active:
  • STUNNED (stunTimer > 0): Suspends patrol and attack timers while keeping the hurtbox open.
  • HURT / IFRAMES (hurtTime > 0, iframeTime > 0): Applies knockback decay (0.85 friction) and transitions to RETREAT (ranged) or COOLDOWN (melee).
  • Local Behavioral Sub-States: PATROL -> ALERT -> RETREAT / LOCK_ON -> CHARGE / FIRE -> COOLDOWN.

6.2 Staggered 1-in-4 Frame Rule & Linear Search Probes

To keep per-frame CPU flat even with crowded rooms, perception checks run on a staggered 1-in-4 frame cadence:

const evalFrame = ((tickCount ^ slotIndex) & 3) === 0;

Humanoid Hyrule Forces (guard, hyrule_knight, hyrule_archer, hyrule_mage) do not have 360-degree radar. During PATROL, they cast a 176px linear search probe (evaluateLinearSearchProbe) in 16px steps along their current cardinal facing direction, stopping on solid bounds or destructible props. That means Shadow Link can flank behind a patrol without triggering ALERT unless he enters their line of sight, touches them (dist < 26), or hits them.

6.3 Role Differentiation: Shield Knights & Ranged Flankers

  • **hyrule_knight (SHIELD_KNIGHT)**: isFrontalShieldBlock(enemy, playerFacing) checks if Shadow Link's slash or poke hits head-on opposite the knight's facing direction while unstunned. Frontal strikes clang off the kite shield for 0 HP; flanking from the side or rear deals full damage.
  • **hyrule_archer & hyrule_mage (RANGED_FLANKER)**: If Shadow Link closes inside 88px, they transition into RETREAT to re-establish standoff distance, snap to a cardinal firing axis in LOCK_ON, and spawn enemy_arrow (4.4 px/frame) or enemy_bolt (3.6 px/frame).

Chapter 7: Combat Registries, Impact Dynamics, and Cross-Tool Validation

Every serious studio eventually hits a schema drift bug between external asset generators and the runtime engine. Earlier in this repo's lifecycle, Gaming_Editor_Asset_Development emitted 4 combat .105a.bejson tables (shadow_link_combat_animations, weapons_combat_registry, projectile_combat_registry, projectile_impact_dynamics) using Python libraries_105/Lib_PY/Core conventions—implicit column-0 record_uuid (len(row) == len(Fields) + 1) and 2x-scaled PNGs (256x256).

Under Shadow_Link_Awakening's TypeScript bejsonCore.validateDocument, that caused immediate E_BEJSON_RECORD_LENGTH_MISMATCH failures and shifted every Field Map Cache lookup by 1 column. Instead of hacking positional exceptions into the runtime, export_ss2_compatible_pack.py cleanly bridges the two:

  1. Inserts the explicit *_uuid primary key at Fields[0] and *_record_type discriminator at Fields[1].
  2. Upgrades envelope metadata to Schema_Version: "2.0.0-105" with Parent_Hierarchy, Write_Owner_Module, Primary_Key_Field, Type_Discriminator_Field, and Domain_Type_Field.
  3. Downscales 2x PNGs to 1x (128x128, 128x32, 192x192) using Image.Resampling.NEAREST.
  4. Aligns weapon slugs (dark_bow) and audio_manifest.105a.bejson SFX cues (bow_loose, arrow_whistle, flesh_pierce).

Zero runtime hacks, 100% schema parity.


Chapter 8: Zero-Asset Procedural Web Audio Synthesis

Shipping 25MB of uncompressed .wav or .mp3 files for a 2D pixel-art game is pure amateur hour. Shadow_Link_Awakening stores every sound effect and BGM track as mathematical synthesis parameters inside game_data/raw/audio/audio_manifest.105a.bejson.

Each SoundEffectFrequencySpec and AudioAssetManifest row defines:

  • aud_waveform_type: sawtooth, square, triangle, sine, or noise
  • aud_start_freq_hz -> aud_end_freq_hz with aud_frequency_ramp_type (exponential, linear, constant, sequence)
  • aud_duration_ms_metric & aud_default_volume_ratio_metric
  • aud_filter_type (none, bandpass, highpass, lowpass), aud_filter_cutoff_hz, and aud_filter_q_factor
  • aud_note_sequence_json for multi-note chimes (heart_pickup, rupee_pickup, item_chime) and looping boss themes (ganon_theme).
["a0011223-3445-4556-8667-778899aabbd1", "SoundEffectFrequencySpec", "SFX_COMBAT", "bow_loose", "Dark Bow String Release", "triangle", 320.0, 140.0, "exponential", 110, 0.40, "none", 0.0, 0.0, "[]", false, "2026-11-16T07:32:00Z"]

Total audio footprint across 18 SFX + BGM tracks: ~6.2 KB of BEJSON. That's 4,000x smaller than a single bloated audio bank.


Chapter 9: The Single-File Experimental HTML Compiler (Compile.py)

This is where Shadow_Link_Awakening flexes on every web framework on the planet. Run Engines/Experimental/Compiler/Compile.py (option [1]):

  1. Reads Engines/Experimental/Compiler/config.json relative to COMPILER_DIR.
  2. Walks game_data/raw/ and ingests all 24 .bejson datasets (manifest/105a.mfdb.bejson, levels, actors, biomes, combat/*, sprites, audio, items, chunks, runtime_*).
  3. Emits Engines/Experimental/Compiled/compiled_game_bundle.105.bejson.
  4. Injects the entire BEJSON bundle and standalone Canvas 2D simulation engine into a single self-contained Engines/Experimental/Compiled/standalone-game.html.

No npm run build. No Vite server. No CORS headaches. You can drop standalone-game.html onto an Android phone, an air-gapped Linux box, or a USB stick, double-click it, and play the full game offline. Try doing that with your 180MB Unity WebGL build—kthxbai.

9.1 Live Playable CMS Standalone App Deployment

Because standalone-game.html is 100% self-contained (zero external network dependencies), the compiled game engine has been deployed directly into the BEJSON CMS Standalone Apps registry (storage/mfdb/standalone_apps/ffc32480-419a-47c6-bfa8-85c1c5e72ff6/) via cms-manage.py app add and embedded into the live site catalog via cms-manage.py page import --app:

# Register standalone game in BEJSON CMS
python3 src/cms-manage.py app add "Sword Slasher: Shadow Link's Awakening" \
  --desc "Top-down 2D action-RPG simulation prototype driven by 24 decoupled BEJSON 105 (2.0.0-105) tables..." \
  --entry "/storage/emulated/0/Admin/Dev/Repos/Shadow_Link_Awakening/Engines/Experimental/Compiled/standalone-game.html" \
  --image "ss2_js_debug_chamber.png"

# Embed standalone app into CMS as dedicated iframe game page
python3 src/cms-manage.py page import --app ffc32480-419a-47c6-bfa8-85c1c5e72ff6 \
  --title "Sword Slasher RPG: Shadow Link's Awakening" \
  --category "BEJSON"

Play the simulation engine directly in your browser:


Chapter 10: Automated Playwright QA and Benchmark Comparison

Real engineers don't "eyeball" a build and pray it works in prod—they automate headless browser verification. Using termux_playwright (native ARM64 Chromium on Android Termux), run_playwright_ss2.py spins up a local HTTP server mapping /assets/ and /data/ to public/, launches both Engines/JS/index.html and Engines/Experimental/Compiled/standalone-game.html, asserts 0 page errors and 0 failed asset requests, simulates room switching, directional movement, sword slashes, and item usage, and captures screenshots into Images/JS_Engine/ and Images/Experimental_Engine/.

That exact visual QA loop caught the 5-arg drawImage sprite-sheet bug in Compile.py and verified the 4-frame sword slash, full-health sword_beam, and Blue/White/Gold Hyrule Forces linear search probes.

Final Architectural Scorecard

Evaluation Metric Typical React / WebGL Indie Repo Shadow_Link_Awakening (Sword-Slasher-v2) Verdict
Data Decoupling Mixed into component state & scripts 24 BEJSON 2.0.0-105 MFDB tables PWNED
Runtime Portability 1 coupled runtime 3 parity runtimes (React/TS, Vanilla JS, Single-File HTML) PWNED
Audio & Asset Footprint 20MB–150MB external bundles 6.2KB procedural Web Audio + 1x pixel sheets PWNED
Combat Determinism Ad-hoc timers & setTimeout spaghetti 13f slash, 4f phased swing, 1-in-4 staggered NPC AI PWNED
Offline Distribution Requires web server Single-file standalone-game.html PWNED

Per my last message: stop shipping 100MB of framework bloat for a 2D game. Study Sword-Slasher-v2, decouple your data into BEJSON 105, and get good. ggnore.


Related Content