Inspiration
Fast-paced first-person parkour games feel incredible because every jump, dash, wall-run, and parry is tuned to the millisecond—yet almost no browser games deliver raw, 120+ FPS pointer-lock movement without input lag or heavy downloads. I wanted to build a zero-install WebGL movement and combat sandbox from the ground up where every physical constant is intentional, readable, and tunable in real time.
What it does
Velocity is a browser-based 3D first-person parkour and katana combat engine running at 120+ FPS (tested on an RTX 3050 Ti Mobile + i7-12700H):
- Momentum-Driven Traversal: Base run speed of \(10\text{ m/s}\) with \(0.3\text{ s}\) coyote time, \(1.55\text{ m}\) ledge mantling, downhill friction-scaled slide-hops (up to \(32\text{ m/s}\)), tangent wall-running with camera roll, and a \(24\text{ m/s}\) directional dash featuring a \(22.3^\circ\) vertical pitch dead zone.
- Arcade Grapple Hook: Scans a \(34\text{ m}\), \(35.5^\circ\) targeting cone using sphere-cast line-of-sight checks, accelerates the player along a committed line up to \(34\text{ m/s}\), and solves a ballistic ledge-vault arc (\(v_{\text{up}} = 6.2\text{ m/s}\)) so landings stay reliable from any angle.
- Sensory Boost & Katana Combat: Holding
Shiftmid-air scales world simulation time down to \(20\%\) using a cubic Hermite smoothstep curve while keeping full player control. Deflect incoming enemy bolts back at \(1.75\times\) speed inside a \(0.18\text{ s}\) parry window, curve homing shuriken, and chain dash-slash lunges with \(60\text{ ms}\) whole-world hit-stop and a procedural Bézier laser slash ribbon. - 8-Level Campaign + Live Level Editor: Play through an 8-sector campaign or click OPEN EDITOR at any time to place geometry, colliders, spawns, and triggers directly in the 3D scene and export/reload courses as JSON.
- Manim Physics Explainer: Alongside the game, I built a custom Manim Community animation on the showcase site (
velocity-game.pages.dev) that extracts the engine's real Rapier3D and combat equations to visualize how the math creates the game feel.
How we built it
- Game Engine: Built in strict TypeScript using Babylon.js 9 and Rapier3D (kinematic capsule controller with custom velocity integration, sphere-cast grapple LOS checks, and raycast projectiles) bundled with Vite.
- Physics Visualization: Rendered a 1080p60 math breakdown in Python using Manim Community and a custom centre-line aviation display typeface (
Monochrome Aviation). - Showcase & Deployment: Built an interactive showcase site in Next.js and Framer Motion with scroll-choreographed video playback, deployed across Cloudflare Pages.
Challenges we ran into
- Kinematic capsule ledge vaulting: Teleporting the player onto a grapple anchor shoved the capsule straight back into platform geometry; solving an explicit ballistic impulse arc landed the player cleanly on top of platforms without clipping.
- Preventing accidental wall-runs: Whitelisting dedicated
wallRunCollidersand enforcing strict non-overlapping slab geometry eliminated unintended camera tilts near platform edges. - Centralizing feel tuning: Keeping every movement, grapple, and combat constant isolated in typed configuration modules made iteration fast while keeping WebGL frame times locked at 120+ FPS.
What's next for Velocity
- Adding a multi-phase geometric final boss arena at the end of Sector 08.
- Expanding the live level editor with community level sharing and speedrun ghost leaderboards.
- Adding more levels
Built With
- babylon.js
- cloudflare-pages
- framer-motion
- gsap
- manim
- next.js
- python
- rapier3d
- typescript
- vite