Just Sandbox

Systems-driven Sandbox Shooter • Unity 6 • WebGL / Mobile • 2026

EN RU

Overview

Just Sandbox is a modular sandbox shooter built as a systems-first gameplay framework. It focuses on emergent interactions, runtime extensibility, and predictable performance under WebGL and mobile constraints.

The design goal was not architectural purity, but long-term scalability, fast iteration, and stable runtime behavior under real production limits.

Real Constraints

  • Strict frame budget: 3–4 ms CPU time for all gameplay logic to maintain stable 60 FPS under WebGL overhead
  • Zero-allocation target: near 0 GC allocations during active gameplay to avoid runtime spikes on mobile and browser environments
  • Low-end hardware focus: optimized for mobile browsers with limited single-thread CPU performance

Role & Ownership

  • Full ownership from prototype to live operations
  • Designed modular system architecture with strict dependency boundaries
  • Developed core gameplay systems (AI, combat, interaction, progression)
  • Built data-driven pipeline for rapid feature iteration
  • Led a small engineering team (2 developers)
  • Maintained performance and architecture consistency across production updates

Engineering Approach

  • Event-driven architecture for cross-system communication
  • Strict low-coupling design with enforced module isolation
  • Profiling-driven optimization (CPU, GC, frame spikes)
  • Async Addressables streaming pipeline
  • Object pooling across all combat and AI-heavy systems
  • Deterministic gameplay pipelines for consistent simulation behavior

Key Technical Problems

  • Spatial query bottlenecks — replaced O(N) entity scanning system with Physics-based non-alloc queries
  • GC spikes in gameplay loops — removed per-frame allocations in input, AI, and event systems
  • Frame-time instability — eliminated hidden allocations and stabilized CPU spikes under combat load

Optimization work was strictly driven by profiling data rather than assumptions, focusing on worst-case runtime behavior.

Postmortems (Key Fixes)

Spatial Queries & AI Targeting

Issue: Severe FPS drops and micro-stutters during combat-heavy scenarios with multiple bots.

Root cause: Legacy O(N) spatial scanning over global entity collections, combined with per-frame allocations for query results.

Fix: Migrated spatial logic to Physics-based queries using non-alloc OverlapSphere calls and cached buffers.

Result: Eliminated combat-driven GC spikes and reduced peak script time from ~5-6 ms to ~1–2 ms.


Hidden GC Allocations in Core Loop

Issue: Frame spikes during movement and camera input under normal gameplay conditions.

Root cause: Implicit allocations in event dispatching and boxed value types in input pipeline.

Fix: Rewrote event system using strongly-typed non-alloc delegates and removed boxing in core update loops.

Result: Achieved near-zero GC allocation baseline during active gameplay.

Systems Design

  • Modular AI framework with interchangeable behaviors
  • Centralized world entity service with controlled access
  • Non-alloc event system for gameplay communication
  • Deterministic combat and damage pipeline
  • Addressables-based async streaming system

Results

  • Stable 60 FPS across WebGL and mobile targets
  • Significant reduction in GC spikes during combat scenarios
  • ~30–50% faster loading via async streaming optimizations
  • ~20–40% CPU reduction after profiling-driven refactors
  • Improved iteration speed through strict modular architecture

Scale & Usage

  • Total plays: ~35K
  • MAU: ~3K
  • Session length: 10–15 minutes
  • Platforms: WebGL, mobile

Tech Stack

Unity 6 C# Clean Architecture MVP Zenject Addressables UniTask DOTween

Media