Technical Lead

Deterministic Baseball Simulation

Led development of mobile training application using Unity DOTS, integrating computer vision pose and velocity estimation with deterministic physics for frame-perfect replay and analysis.

Year: 2023-2024
Role: Technical Lead & Architect
UnityDOTSiOSCocoapodsComputer Vision

📋Overview

Led a small engineering team developing an innovative mobile baseball training application that combines computer vision pose and velocity estimation with deterministic physics simulation. The application enables coaches and players to capture batting mechanics using a standard smartphone camera, then replay and analyze the motion with frame-perfect accuracy. The technical challenge was creating a deterministic physics system that could reconstruct 3D motion from 2D pose estimates provided by computer vision algorithms. The system needed to run at high simulation rates (240fps) while maintaining 60fps rendering on mobile devices, requiring careful optimization of both the simulation and presentation layers. Architected the system using Unity's Data-Oriented Technology Stack (DOTS) to achieve the necessary performance characteristics while maintaining code maintainability.

🎯Challenges

  • Creating deterministic physics replay from inherently noisy computer vision data
  • Achieving 240fps simulation while maintaining 60fps rendering on mobile hardware
  • Integrating third-party Objective-C computer vision library with Unity on iOS
  • Architecting clean separation between simulation and presentation layers
  • Maintaining deterministic behavior across different iOS device generations
  • Building robust CI/CD pipeline for mobile deployment with external dependencies

💡Solutions

  • Leveraged Unity DOTS architecture to run simulation and rendering on separate threads with minimal coupling
  • Developed native plugin using CocoaPods to bridge Objective-C library with Unity, handling marshalling and memory management
  • Designed clear abstraction layers separating physics simulation from visual representation
  • Created extensive automated test suite validating deterministic replay across device types
  • Established Jenkins-based CI/CD pipeline with TestFlight integration for nightly builds and automated testing

🚀Outcomes & Impact

  • Achieved <2cm accuracy in motion reconstruction validation tests
  • Successfully maintained 240fps simulation with 60fps rendering on target devices
  • Reduced build and deployment cycle from days to hours, enabling rapid iteration

More Projects

Interested in Working Together?

I'm always open to discussing new projects and opportunities.

Get in Touch