Welcome
This is the new blog section for krvh.dev.
I use it to document programming projects, what I learned, and what I would do differently next time.
What to expect
- Project breakdowns
- Technical tradeoffs
- Postmortems and lessons learned
Interactive demos
MDX posts can render site components directly, including client components such as the platformer demo below.
Experiment: fake it or simulate it?
Both panels share the same world and controls. The left one runs an actual velocity-based solver with buffered jumps, coyote time, platform collision, and a live force overlay. The right one uses a state machine and a scripted vertical leap that you steer horizontally to chase the same feel with far less machinery.
Robust Physics
This version resolves movement with acceleration, drag, gravity, and collision passes. The overlay makes the cost visible.
Pure Fakery
This version is quicker to build because it never simulates gravity. Jumping is a timed vertical lift, and A or D steers the player through the air, but that expediency costs smoothness: some clipping remains and the motion can feel clunky.
The point is not that physics is wrong. It is that interaction feel can come from either a real simulation or from carefully staged motion, and the simpler option is often enough when the player only needs the illusion.
const note = 'Write in MDX, render components server-side.';
console.log(note);