Independent Project
June 2025

Royal Run — Procedural 3D Endless Runner

Expertise

Gameplay Engineering, Procedural Generation, Game Feel

Platforms

WebGL (Playable), Windows (Standalone)

Deliverables

  • Procedural world generator & chunk packs
Royal Run — Procedural 3D Endless Runner

Project Overview

Royal Run is a fast, procedurally generated 3D endless runner built in Unity. It started as a simple lane prototype and evolved into a physics-tuned experience with chunk-based level generation, escalating difficulty, and a strong focus on “game feel.” Along the way I doubled down on clean architecture—dependency injection where it helps, ScriptableObjects for data, and tight iteration loops to keep balance and pacing under control.

Core loop: read the pattern ahead, commit to a line, score with risk/reward pickups, and push deeper as the generator dials up speed, density, and hazard complexity.

Unity 6 Overview

Execution

Systems & implementation

  • Movement: character controller with coyote time, jump buffering, variable jump height, and air control clamps; fixed timestep input to keep handling predictable.
  • Procedural generation: chunk graph with socket rules (start/mid/end), spawn weights, and biomes for themed sets; seeded runs for reproducible testing.
  • Difficulty ramps: dynamic speed curves, hazard density, and pickup scarcity governed by progression score and survival time.
  • Hazards & set pieces: moving walls, rotating blades, laser gates, collapsing floors; spawner patterns with cooldowns and safety windows.
  • Pickups & power-ups: coins/shards, magnet, shield, speed boost, combo multipliers with decay and renewal rules.
  • Camera & juice: Cinemachine rigs with subtle follow offsets, FOV kicks on sprint, per-state damping; hit stop, screen shake, trails/particles, and clean audio cues.
  • Meta & scoring: distance + combo multipliers, death recap, and optional local leaderboard/ghost replays (extensible).
  • Content pipeline: ScriptableObjects for chunks/power-ups/curves, Addressables, object pooling to avoid GC spikes, and a simple save system.
  • QA & perf: Unity Profiler passes (CPU/GPU/GC), draw-call budget, overdraw checks on VFX, and regression scenes for tricky patterns.

Results

Measurable outcomes

  • Performance: median FPS ≈ 62 (WebGL) · CPU frame ≈ 8.9ms · GPU frame ≈ 9.8ms · GC alloc/frame ≈ 0.8 KB.
  • Stability: crash-free sessions 99.6% on latest playtest.
  • Build size: WebGL package 35 MB after texture/VFX import tuning.
  • Engagement: median session length 10.2 min · chunk survival rate (early → mid) 57%.

Before → After (snapshot)

Before: jitter on dense VFX clusters and occasional unfair spawns. After: pooled VFX + socket rules → GC spikes ↓ 54% and cleaner telegraphing on high-speed sections.