Game Smooth Curves And Motion
Use this skill to design path and curve systems where continuity, control, and
game feel matter more than exact mathematical purity.
Primary source: Geometry for Programmers by Oleksandr Kaleniuk
(https://www.manning.com/books/geometry-for-programmers), transformed and
paraphrased, especially chapters 5-7. Additional source: A Primer on Bezier
Curves by Pomax (https://pomax.github.io/bezierinfo/).
Core Workflow
- Identify what must be smooth: position, tangent direction, speed, curvature,
camera orientation, banking, or animation value.
- Choose the curve family that gives the needed controls with the least state:
linear segments, cubic Hermite, Catmull-Rom, Bezier, B-spline, NURBS, or a
custom polynomial piece.
- Define continuity targets:
- C0: pieces meet at positions.
- C1: tangents match for visually smooth direction.
- C2: curvature changes smoothly.
- Decide parameterization: uniform
t, chord length, centripetal, explicit
timing, or arc-length lookup.
- Separate authoring controls from runtime samples. Designers may edit points
and handles; the game may use baked lookup tables.
- Test extreme control points, sharp turns, closed loops, repeated points, and
speed variation.
Curve Selection
- Use linear segments for grid motion, debug paths, and intentionally sharp
routes.
- Use cubic Hermite when you know endpoint positions and tangent vectors.
- Use Bezier curves when control handles are the natural authoring interface.
- Use Catmull-Rom-style splines when paths should pass through waypoints with
minimal handle authoring.
- Use B-splines or NURBS when many control points, high continuity, or exact
conic sections matter.
- Avoid one high-degree global polynomial through many points. Split into
pieces to avoid oscillation and poor local control.
Motion Rules
- Smooth position does not imply smooth speed. Check derivative length along
the path.
- Constant
t increments rarely produce constant world-space speed.
- For nearly constant speed, precompute an arc-length table and map distance
traveled back to curve parameter.
- Tangent length affects both speed and curve shape in Hermite-like systems.
- Normalize tangent direction only when speed should be controlled separately.
- Keep gameplay collision separate from visual smoothing when curves are only
a presentation layer.
Implementation Checklist
- Curve type and continuity target are documented.
- Parameter range and units are explicit.
- Closed paths handle first/last continuity deliberately.
- Runtime evaluation is bounded and allocation-free in hot paths.
- Baked samples include position, tangent, optional normal/binormal, and
cumulative distance when needed.
- Debug view shows control points, handles, samples, tangents, and speed heat.
Common Mistakes
- Using interpolation that passes through every point when approximation would
be smoother and more stable.
- Assuming Bezier handles are points on the curve.
- Letting repeated or near-repeated points create undefined tangents.
- Moving a camera at constant parameter speed and calling the result constant
motion.
- Adding more control points to fix a curve that needs a different
parameterization or continuity target.
Source: hashgraph-online/awesome-codex-plugins → plugins/LVTD-LLC/skills/skills/game-smooth-curves-and-motion/SKILL.md
1---2name: game-smooth-curves-and-motion3description: Design smooth game motion with splines, Bezier curves, interpolation, derivative continuity, path parameterization, and speed control. Use when implementing camera rails, waypoint paths, vehicle routes, projectile trails, animation curves, roads, rivers, or any motion/path system that must feel smooth.4---567# Game Smooth Curves And Motion89Use this skill to design path and curve systems where continuity, control, and10game feel matter more than exact mathematical purity.1112Primary source: Geometry for Programmers by Oleksandr Kaleniuk13(https://www.manning.com/books/geometry-for-programmers), transformed and14paraphrased, especially chapters 5-7. Additional source: A Primer on Bezier15Curves by Pomax (https://pomax.github.io/bezierinfo/).1617## Core Workflow18191. Identify what must be smooth: position, tangent direction, speed, curvature,20 camera orientation, banking, or animation value.212. Choose the curve family that gives the needed controls with the least state:22 linear segments, cubic Hermite, Catmull-Rom, Bezier, B-spline, NURBS, or a23 custom polynomial piece.243. Define continuity targets:25 - C0: pieces meet at positions.26 - C1: tangents match for visually smooth direction.27 - C2: curvature changes smoothly.284. Decide parameterization: uniform `t`, chord length, centripetal, explicit29 timing, or arc-length lookup.305. Separate authoring controls from runtime samples. Designers may edit points31 and handles; the game may use baked lookup tables.326. Test extreme control points, sharp turns, closed loops, repeated points, and33 speed variation.3435## Curve Selection3637- Use linear segments for grid motion, debug paths, and intentionally sharp38 routes.39- Use cubic Hermite when you know endpoint positions and tangent vectors.40- Use Bezier curves when control handles are the natural authoring interface.41- Use Catmull-Rom-style splines when paths should pass through waypoints with42 minimal handle authoring.43- Use B-splines or NURBS when many control points, high continuity, or exact44 conic sections matter.45- Avoid one high-degree global polynomial through many points. Split into46 pieces to avoid oscillation and poor local control.4748## Motion Rules4950- Smooth position does not imply smooth speed. Check derivative length along51 the path.52- Constant `t` increments rarely produce constant world-space speed.53- For nearly constant speed, precompute an arc-length table and map distance54 traveled back to curve parameter.55- Tangent length affects both speed and curve shape in Hermite-like systems.56- Normalize tangent direction only when speed should be controlled separately.57- Keep gameplay collision separate from visual smoothing when curves are only58 a presentation layer.5960## Implementation Checklist6162- Curve type and continuity target are documented.63- Parameter range and units are explicit.64- Closed paths handle first/last continuity deliberately.65- Runtime evaluation is bounded and allocation-free in hot paths.66- Baked samples include position, tangent, optional normal/binormal, and67 cumulative distance when needed.68- Debug view shows control points, handles, samples, tangents, and speed heat.6970## Common Mistakes7172- Using interpolation that passes through every point when approximation would73 be smoother and more stable.74- Assuming Bezier handles are points on the curve.75- Letting repeated or near-repeated points create undefined tangents.76- Moving a camera at constant parameter speed and calling the result constant77 motion.78- Adding more control points to fix a curve that needs a different79 parameterization or continuity target.8081---8283**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/LVTD-LLC/skills/skills/game-smooth-curves-and-motion/SKILL.md`