Autonomous Execution

© 2026 HY13dev™. All Rights Reserved.
Get in touch
HY13dev Logo
Home
Home
Projects Icon
ProjectsProjects
Education Icon
EducationEducation
Experience Icon
ExperienceExperience
Contact Icon
ContactContact
YlyaBot Icon
YlyaBotYlyaBot
Ylya Martchenko
2026
Back to Projects
Full Stack Developer•Senior Software Engineer•Next.js & React Expert•GenAI & RAG Systems Engineer•Full Stack Developer•Senior Software Engineer•Next.js & React Expert•GenAI & RAG Systems Engineer•

Vibe Heist

Sole Creator & Lead Systems EngineerActive Development (Phase 2: The Drive & Greybox)
Live Sync

Public entry point for Vibe Heist. Orchestrates submodules for the WebGPU engine, web portal, and the private game client. (In Development)

Project Overview

Vibe Heist is an ambitious, high-fidelity, open-world driving and action game designed to run natively inside a standard web browser tab. Rejecting standard web game development cliches (such as DOM-driven visuals or using React state to manage frame logic), the project implements a cutting-edge native-performance architecture. By dividing the system into an independent physics simulation core ('the Brain') written in Rust and compiled to WebAssembly (WASM), and a visual rendering engine ('the Eyes') written in TypeScript utilizing Babylon.js on the next-gen WebGPU standard, the game fully decouples state calculations from presentation. The two layers communicate asynchronously over a lock-free, zero-copy shared memory bridge leveraging SharedArrayBuffer and Atomics, achieving silky smooth 60+ FPS simulation speeds with virtually zero garbage collection stutter or thread synchronization latency.

View on GitHubOpen Live Demo

Specifications

  • My RoleSole Creator & Lead Systems Engineer
  • Development PhaseActive Development (Phase 2: The Drive & Greybox)
  • Languages
    RustTypeScriptWGSLHTMLCSSBash
  • Tools & Frameworks
    WebAssemblyWebGPUBabylon.jsRapier3DNext.js 16Vite

Execution Latency

Sub-1ms simulation updates (typically 0.15ms - 0.40ms per step in WASM) at 60Hz physics frequency.

UI Performance

Interpolated 60fps to 240fps rendering depending on screen refresh rate, with 0% garbage collection jank during gameplay loop.

Operational Cost

$0 server compute hosting cost, leveraging client-side WebAssembly execution (serverless launcher hosted on Vercel CDN).

Engineering Highlights & Achievements

1

Decoupled Multi-Threaded Engine: Strictly separates game logic and physics simulation (running at a fixed 60Hz timestep in a background Web Worker) from presentation and rendering (running up to 240Hz on the main thread), ensuring simulation determinism and preventing screen refresh jank.

2

Zero-Copy Shared Memory Bridge: Custom memory layout leveraging SharedArrayBuffer and atomic thread signaling to cast WASM memory heaps directly as JavaScript Float32Array views, completely avoiding main-loop allocations and slow postMessage JSON serialization.

3

Next-Generation WebGPU Renderer: Native WebGPU visual pipeline driven by Babylon.js v8.26 with shaders written in WGSL, supporting advanced visual techniques like percentage closer filtering (PCF) shadow generation, depth buffer testing, and custom emissive lighting materials.

4

Raycast Vehicle Physics in Rust: Custom multi-wheeled vehicle simulation utilizing Rapier3D's DynamicRayCastVehicleController, with configurable four-point raycast suspensions, mass calibration, linear/angular damping, and handbrake-induced oversteer steering drift.

Engineering Challenges (STAR Method)

Exhaustive situation-action-result breakdowns showcasing problem-solving and architectural execution.

CHALLENGE 1

Situation & Impediment

Garbage collection (GC) pauses and communication overhead when transferring heavy game state vectors (1,500+ entities) between a background physics thread and the main rendering thread caused severe frame drops (jank) in the browser.

Engineering Action

Designed a zero-allocation SharedArrayBuffer memory bridge. Calculated strict byte strides and offsets (e.g. PED_STATE_OFFSET, CAM_STATE_OFFSET) to project the Rust SimEngine memory layout directly into WebGPU-aligned Float32Array views on the main thread. Synchronized thread reading/writing atomically using Atomics.

Architectural Deep Dive

Low-level component relationships, system boundaries, and runtime flows.

The Vibe Heist engine is designed around a strictly decoupled, asymmetrical multi-threaded architecture that communicates via shared memory. The main thread handles presentation, input gathering, and WebGPU draw-call dispatch, while a dedicated Web Worker acts as the simulation thread (the WASM physics host). Inside the Web Worker, the Rust SimEngine runs a fixed 60Hz game loop (approx. 16.6ms intervals) utilizing Cargo packages like Rapier3D and Nalgebra to calculate physics steps, vehicle coordinates, player trajectories, and 1,500 agent crowd positions. 1) Input Phase: The main thread catches mouse movements and keyboard events, encoding buttons and camera angles into a shared RingBuffer using atomic write indices. 2) Simulation Phase: The Worker thread drains the RingBuffer atomically, passes these inputs into the physics engine, computes the state step, and writes the resulting translations, rotations, camera targets, and instanced ped matrices directly into a SharedArrayBuffer via raw WASM heap pointers. 3) Presentation Phase: Rather than waiting, the main thread reads the SharedArrayBuffer, interpolates between the last two physics frames to support high screen refresh rates (e.g. 144Hz), and immediately uploads the raw floats to WebGPU buffers via Babylon.js Thin Instances, keeping drawing overhead down to a single CPU-to-GPU memory transfer.

Lessons Learned & Core Takeaways

Developing Vibe Heist demonstrated that a native-grade, high-performance open-world game is entirely feasible in modern browsers when standard web overhead is systematically bypassed. A major takeaway is the power of zero-allocation game loops: by reusing Float32Array memory views and avoiding the generation of temporary vectors (e.g., 'new Vector3()') or serialization buffers in the update cycle, garbage collection pauses can be eliminated. Furthermore, building lock-free multi-threaded architectures in WebWorkers using SharedArrayBuffer and Atomics requires extreme precision regarding memory alignment and byte-stride layouts, but pays massive performance dividends that make modern browser standards like WebGPU shine at full capability.

Live Interactive Preview

Rendered live in real-time. Direct URL: /

If the preview remains blank, the site's security policies may restrict iframe embedding. Open the link directly instead.
/
SharedArrayBuffer
Atomics
Nalgebra
Tailwind CSS v4
wasm-pack
  • Stars0
  • Forks0
  • Last Updated5/25/2026
  • 5

    Boid-Flocking ECS Crowd Simulation: High-performance pedestrian simulation calculated inside the WASM thread, driving up to 1,500 independent agents utilizing collision avoidance (ped-to-ped, ped-to-player, ped-to-vehicle) and block/ramp height adjustments.

    6

    Hardware-Accelerated Instancing: Main thread rendering uses Babylon.js Thin Instances to batch and draw thousands of active crowd meshes in a single GPU draw call, minimizing CPU overhead and WebGPU API bottlenecking.

    7

    Next.js 16 Launcher Integration: Built a secure, high-performance launcher website using Next.js 16 and Tailwind CSS v4, supporting seamless launcher mechanics and static delivery targets.

    Quantifiable Result

    Completely eliminated serialization overhead, dropping state transfer time from 12ms to 0ms (zero-copy), and reduced garbage collection pauses to absolute zero during active gameplay.

    CHALLENGE 2

    Situation & Impediment

    A noticeable frame rate mismatch occurred because the core physics simulation runs at a fixed, deterministic 60Hz timestep in Rust, whereas the rendering thread scales dynamically with high-refresh-rate monitors (144Hz to 240Hz), causing visible visual stuttering.

    Engineering Action

    Developed a time-interpolated rendering layer. Tracked the worker's atomic frame counter and write indices. In the main Babylon.js render loop, implemented linear interpolation (lerp) for positions and camera targets, and spherical linear interpolation (slerp) for rigid-body rotation quaternions, smoothly bridging states between the last two completed physics cycles based on high-resolution timing deltas.

    Quantifiable Result

    Achieved perfectly fluid visual rendering that natively matches the monitor's high refresh rate, while preserving the mathematical determinism of the fixed 60Hz Rust physics simulation.

    CHALLENGE 3

    Situation & Impediment

    Simulating and rendering a dense crowd of 1,500 active pedestrians on the web typically causes severe CPU congestion from loop overhead and GPU draw-call bottlenecks.

    Engineering Action

    Offloaded boid-style crowd flocking, obstacle avoidance, and raycast height queries on blocks/ramps entirely to Rust. Combined this high-speed calculation with WebWorker thread decoupling, then updated instance matrices directly on the GPU using Babylon's Thin Instances.

    Quantifiable Result

    Allowed the browser to simulate and render 1,500 dynamic agents in real-time with full shadow casting, keeping browser CPU thread utilization under 15% and keeping framerate locks stable.