Math for game devs
Vectors, matrices, quaternions, curves, easing and interpolation sit under almost everything in games. These guides explain the maths in an intuitive way, with visual examples and Unity code. Worth a read even if you have been shipping for years. 149 hand-picked Unity guides, tutorials, videos and repos, kept current.
- @freya.bsky.social: quaternion powers q², √q and qˣ scale a rotation
Raising a quaternion to a power scales its rotation: square doubles, square root halves, qˣ scales by x.
bsky.app · Sep 2026 - @freya.bsky.social: quaternion (x,y,z,0) is a 180° rotation about that axis
A unit vector as a pure quaternion gives a half-turn around it, with no trig or euler conversion.
bsky.app · Sep 2026 - Maths Archives - Alan Zucconi
Archive of Alan Zucconi's math tutorials for games.
alanzucconi.com · Aug 2026 - Xorshift Generators
Deep dive into xorshift pseudo-random number generators.
alanzucconi.com · Aug 2026 - Xorshift Generators: Appendix
Appendix listing maximal triplets and technical details for xorshift generators.
alanzucconi.com · Aug 2026 - I Tried Coding my own Graphics Libraryyoutube.com · Jul 2026
- @freya.bsky.social: random rotations equal uniform points on a 4D sphere
Uniformly distributed random rotation quaternions are exactly uniform random points on the 4D sphere surface.
bsky.app · Jul 2026 - @freya.bsky.social: analytic 2D lighting with complex numbers and conformal maps
Shader lighting via piecewise conformal maps of angular exposure yields fully analytic penumbras.
bsky.app · Mar 2026 - Coding Adventure: Additive Synthesisyoutube.com · Mar 2026
- @freya.bsky.social: A+B is the midpoint of A and B in homogeneous coordinates
In homogeneous coordinates adding two points gives their midpoint, a trick behind w=0 or w=1 handling.
bsky.app · Mar 2026 - @freya.bsky.social: many game quantities are better as rational numbers than flo
Time, UI sliders and line intersections can be exact fractions, avoiding float rounding issues.
bsky.app · Dec 2025 - Orbital Mechanics
Teaches orbital mechanics basics, from gravity simulation to Keplerian two-body orbits.
alanzucconi.com · Sep 2025 - Oskar Stålberg: Landscapes of Hex and Square - Summer School on AI and Games 2023
How to build procedural content systems on hex and square grids, from Bad North to Townscaper.
youtube.com · Feb 2025 - Freya's Guide to XYZ Axes and Handedness
Post showing a guide to XYZ axes and handedness across coordinate systems.
mastodon.social · Sep 2024 - Coding Adventure: Sound (and the Fourier Transform)youtube.com · Aug 2024
- Clean way to get meters per pixel in shaders
Post showing a clean way to compute meters per pixel in shaders.
mastodon.social · Aug 2024 - Lerp smoothing is broken
Explains why the common lerp smoothing pattern is frame-rate dependent and how to fix it.
youtube.com · May 2024 - Framerate-independent lerp smoothing
Post working out framerate-independent lerp smoothing.
mastodon.social · Feb 2024 - Easing functions: linear, smoothstep, smootherstep and elevator-style curves
Post comparing easing functions like linear, smoothstep, smootherstep and elevator-style curves.
mastodon.social · Jan 2024 - 3D Math Primer for Graphics and Game Development
Landing page of a 3D math textbook for graphics and game development.
gamemath.com · Nov 2023 - Why can't you multiply vectors?
Explains why vectors have no single multiplication, covering dot, cross and other products.
youtube.com · Oct 2023 - The Best Darn Grid Shader (Yet)
How to draw a clean, anti-aliased grid in a shader that holds up at any distance and viewing angle.
bgolus.medium.com · Oct 2023 - Unity 4D #4: Creating 4D Objects
Explains how to create four-dimensional objects for the Unity4D extension.
alanzucconi.com · Jul 2023 - Unity 4D #3: Rendering 4D Objects
Renders 4D objects in Unity with orthographic, perspective and cross-section projections.
alanzucconi.com · Jul 2023 - Unity 4D #2: Extending Unity to 4D
Extends Unity to support four-dimensional geometry.
alanzucconi.com · Jul 2023 - Unity 4D #1: Understanding the Fourth Dimension
Introduces the fourth dimension and how to create, manipulate and visualize 4D objects.
alanzucconi.com · Jul 2023 - How To Build Roads Procedurally In Unity with the Splines Package
Builds procedural roads along splines with Unity's Splines package.
youtube.com · Jun 2023 - Basic Quad/Octree Culling 2
Patreon post on basic quadtree and octree culling, part 2.
patreon.com · Mar 2023 - Mathfs: Catenary2D (solving the catenary root)
Repo: Mathfs library class for solving a 2D catenary curve in Unity.
github.com · Dec 2022 - The Continuity of Splines
Explains continuity of splines and what C0, C1 and C2 mean.
youtube.com · Dec 2022 - Coordinate system chart (Unity, Unreal, 3D math)
Post sharing a coordinate system chart for Unity, Unreal and 3D math.
mastodon.social · Nov 2022 - Quaternion swizzling for cheap 180-degree rotations in Unity
Repo: code snippet using quaternion swizzling for cheap 180-degree rotations in Unity.
github.com · Nov 2022 - The Art of Real-Time Mathematics (guest lecture)
Guest lecture on real-time mathematics for game and graphics programming.
youtube.com · Nov 2022 - Triangle wave function/modulation (cheap sine alternative)
Explains a triangle wave function as a cheap sine alternative for lerping textures in FX.
artstation.com · Nov 2022 - Linear Smooth Step material and Niagara functions
Shares linear smooth step material and Niagara functions for interpolation.
artstation.com · Nov 2022 - Math for Game Devs [2022, part 10] • Abstract Algebra, Procedural Animation & Splines
Math for game devs part 10 covering abstract algebra, procedural animation and splines.
youtube.com · Nov 2022 - Math for Game Devs [2022, part 9] • Solutions to the final assignments
Math for game devs part 9 reviewing solutions to the final assignments.
youtube.com · Nov 2022 - Math for Game Devs [2022, part 8] • Trajectories & Derivatives
Math for game devs part 8 on trajectories and derivatives.
youtube.com · Nov 2022 - Math for Game Devs [2022, part 7] • Interpolation & Point Physics
Math for game devs part 7 on interpolation and point physics.
youtube.com · Nov 2022 - Math for Game Devs [2022, part 6] • Solutions for Assignments 7-11
Math for game devs part 6 reviewing solutions for assignments 7-11.
youtube.com · Nov 2022 - Math for Game Devs [2022, part 5] • Trigonometry & Rotations
Math for game devs part 5 on trigonometry and rotations.
youtube.com · Oct 2022 - Math for Game Devs [2022, part 4] • solutions for assignments 4-6
Math for game devs part 4 reviewing solutions for assignments 4-6.
youtube.com · Oct 2022 - Math for Game Devs [2022, part 3] • Matrix4x4 & Cross Product
Math for game devs part 3 on Matrix4x4 and the cross product.
youtube.com · Oct 2022 - Math for Game Devs [2022, part 2] solutions for assignments 1-3
Math for game devs part 2 reviewing solutions for assignments 1-3.
youtube.com · Oct 2022 - Math for Game Devs [2022, part 1] • Numbers, Vectors & Dot Product
Math for game devs part 1 on numbers, vectors and the dot product.
youtube.com · Oct 2022 - Voronoi Derivatives
Catlike Coding tutorial on computing derivatives of Voronoi noise for surfaces.
catlikecoding.com · Oct 2022 - Perlin Derivatives
Catlike Coding tutorial on computing derivatives of Perlin noise for surfaces.
catlikecoding.com · Sep 2022 - Pseudorandom Surfaces: Simplex Derivatives
Calculates analytic derivatives of simplex noise for pseudorandom surfaces.
catlikecoding.com · Aug 2022 - How to rotate a vector
Explains how to rotate a vector in 2D and 3D.
youtube.com · Feb 2022 - SGC21- Oskar Stålberg - Beyond Townscapers
Experimental tile-based procedural generation beyond Townscaper: irregular grids, dual meshes and new tile setups.
youtube.com · Dec 2021 - ShaderQuest Part 6: Shaping functions
ShaderQuest part six on shaping functions in shaders.
halisavakis.com · Sep 2021 - The Beauty of Bézier Curves
Visual explanation of Bezier curves and how they are built.
youtube.com · Aug 2021 - Voronoi Noise
Catlike Coding tutorial on generating Voronoi noise variants in C#.
catlikecoding.com · Aug 2021 - EPC2021 | Q&A session with Oskar Stålberg | Oskar Stålberg
Q&A under Townscaper's hood: Marching Cubes plus WFC on an irregular quadrilateral grid at interactive speed.
youtube.com · Jul 2021 - Pseudorandom Noise: Noise Variants
Creates fractal and tiling variants of Perlin and value noise.
catlikecoding.com · Jul 2021 - Polar Coordinates
Explains polar coordinates in shaders for radial effects.
ronja-tutorials.com · Jun 2021 - Perlin Noise
Catlike Coding tutorial on implementing Perlin noise in C#.
catlikecoding.com · Jun 2021 - Value Noise
Catlike Coding tutorial on implementing value noise in C#.
catlikecoding.com · May 2021 - Distinctive Derivative Differences
A look at the different kinds of shader derivatives and how they differ in practice.
bgolus.medium.com · Apr 2021 - Pseudorandom Noise: Hashing
Builds a small xxHash-style hash function and visualizes hash output for pseudorandom noise.
catlikecoding.com · Mar 2021 - Piecewise Interpolation - Alan Zucconi
Explains piecewise interpolation for blending between multiple values.
alanzucconi.com · Jan 2021 - Linear Interpolation - Alan Zucconi
Explains linear interpolation for moving objects in code.
alanzucconi.com · Jan 2021 - Anastasia Opara - Rust for Artists. Art for Rustaceans. — RustFest Global 2020
Translating an artist's search process into code through a computational drawing algorithm in Rust.
youtube.com · Dec 2020 - The Mathematics of Catenary - Alan Zucconi
Explains the math behind catenary curves for hanging cables and chains in games.
alanzucconi.com · Dec 2020 - Implementing Catenaries for Games - Alan Zucconi
Implements catenary curves for hanging cables, wires and chains in games.
alanzucconi.com · Dec 2020 - Interpolation & Velocity • Math for Game Devs [Part 4]
Math for game devs part 4 on interpolation and velocity.
youtube.com · Nov 2020 - Trigonometry • Math for Game Devs [Part 3]
Math for game devs part 3 on trigonometry.
youtube.com · Nov 2020 - Spaces & Cross Product • Math for Game Devs [Part 2]
Math for game devs part 2 on spaces and the cross product.
youtube.com · Nov 2020 - Vectors & Dot Product • Math for Game Devs [Part 1]
Math for game devs part 1 on vectors and the dot product.
youtube.com · Nov 2020 - Math in Art - Game Dev Bill
Explains embedding math in art to make shaders cheaper.
gamedevbill.com · Sep 2020 - An Introduction to Floating-Point Arithmetic - Alan Zucconi
Explains how floating-point numbers work in C# and the surprising bugs they can cause.
alanzucconi.com · Aug 2020 - Improving Floating-Point Precision in C#
Techniques for improving floating-point precision in C# for high-precision simulations.
alanzucconi.com · Aug 2020 - An Introduction to Mie Theory
Introduction to Mie theory for atmospheric scattering (members-only post).
alanzucconi.com · Jul 2020 - Progressing in Circles
Medium post by Ben Golus on progressing in circles, a shader or math topic around circular shapes.
medium.com · ~Jun 2020 - Remote Math class for Game Devs (Stream Recording)
Stream recording of a remote math class for game developers.
youtube.com · Mar 2020 - Game Math: Dot Product, Rulers, And Bouncing Balls
Game math primer on dot products, projection and reflection with bouncing ball examples.
allenchou.net · Jan 2020 - https://www.ronja-tutorials.com/post/047-invlerp_remap/
Ronja tutorial on inverse lerp and remapping values in shaders.
ronja-tutorials.com · Jan 2020 - Inverse Lerp and Remap
Explains inverse lerp and remap functions in shaders.
ronja-tutorials.com · Jan 2020 - Portals: Part 3 - Matrix Clipping
Uses an oblique projection matrix to clip objects behind a portal correctly.
danielilett.com · Dec 2019 - Partial Derivatives (fwidth)
Explains the partial derivative functions ddx, ddy and fwidth in HLSL.
ronja-tutorials.com · Nov 2019 - Game Math: Inverse Trigonometric Functions, Slope Angles, And Facing Objects
Game math on inverse trigonometric functions, slope angles and facing objects.
allenchou.net · Oct 2019 - Math for Game Dev - An Improvised Live Course
Improvised live course on math for game development.
youtube.com · Sep 2019 - Unity Tips | Part 3 - Interpolation
Unity tips on interpolation methods for blending between values smoothly.
danielilett.com · Sep 2019 - Game Math: Trigonometry Basics – Tangent, Triangles, And Cannonballs
Game math on tangent, triangles and cannonball trajectories.
allenchou.net · Aug 2019 - Game Math: Trigonometry Basics – Sine & Cosine
Game math primer on sine and cosine.
allenchou.net · Aug 2019 - Sine and Cosine - A Visual Explanation
Visual explanation of sine and cosine.
youtube.com · Aug 2019 - The Dot Product - A Visual Explanation
Visual explanation of the dot product.
youtube.com · Aug 2019 - HSV Color Space
Explains the HSV color space and using it in shaders.
ronja-tutorials.com · Apr 2019 - Polygon Clipping
Clips a polygon shape in a shader against a list of points.
ronja-tutorials.com · Jun 2018 - Game Math: Deriving the Slerp Formula
Derives the slerp formula for spherical interpolation.
allenchou.net · May 2018 - Game Math: Swing-Twist Interpolation (…Sterp?)
Explains swing-twist interpolation for rotations, with source on GitHub.
allenchou.net · May 2018 - Color Interpolation
Interpolates between colors in shaders.
ronja-tutorials.com · May 2018 - Daily Pathtracer Part 3: C# & Unity & Burst · Aras' website
Part three of a path tracer series, implemented in C# with Unity and Burst.
aras-p.info · Mar 2018 - Basics: Mathematical Surfaces
Catlike Coding tutorial on describing mathematical surfaces and visualizing them with cubes.
catlikecoding.com · Jan 2018 - The Mathematics of Rayleigh Scattering
Introduces the mathematics of Rayleigh scattering that makes the sky blue.
alanzucconi.com · Oct 2017 - The Theory Behind Atmospheric Scattering
Starts deriving the equations behind volumetric atmospheric scattering.
alanzucconi.com · Oct 2017 - Intersecting The Atmosphere
Handles ray-sphere intersection to find how far light travels through the atmosphere in a scattering shader.
alanzucconi.com · Oct 2017 - The Mathematics of Thin-Film Interference
Explains the math behind thin-film interference and iridescent reflections.
alanzucconi.com · Jul 2017 - The Mathematics of Diffraction Grating
Explains the math of diffraction gratings that produce iridescent reflections.
alanzucconi.com · Jul 2017 - Improving the Rainbow – Part 2
Part two on physically based rainbow patterns, converting wavelengths to RGB in Unity and WebGL.
alanzucconi.com · Jul 2017 - Improving the Rainbow – Part 1
Part one on physically based rainbow patterns, converting visible wavelengths to RGB.
alanzucconi.com · Jul 2017 - The Nature of Light
Explains the nature of light as groundwork for iridescent materials in Unity.
alanzucconi.com · Jul 2017 - Inverse Kinematics for Robotic Arms
Moves robotic arms in Unity with inverse kinematics and procedural animation in C#.
alanzucconi.com · Apr 2017 - An Introduction to Gradient Descent
Introduces gradient descent as a way to solve inverse kinematics for procedural animation.
alanzucconi.com · Apr 2017 - Implementing Forward Kinematics
Implements forward kinematics in Unity with code, as part of an IK series.
alanzucconi.com · Apr 2017 - The Mathematics of Forward Kinematics
Explains the mathematics of forward kinematics behind procedural animation and IK.
alanzucconi.com · Apr 2017 - MathUtilities/Assets/Volume at master · zalo/MathUtilities
Repo: Collection of math and physics tricks for Unity, including volume calculations.
github.com · Feb 2017 - GitHub - zalo/MathUtilities: A collection of some of the neat math and physics tricks that I've collected over the last few years.
Repo: collection of math and physics tricks implemented for Unity.
github.com · Feb 2017 - Game Math: Curve Approximation via Curve “Projection”
Game math on approximating curves via curve projection.
allenchou.net · Feb 2017 - Game Math: “Projecting” a Curve onto Another
Game math on projecting one curve onto another.
allenchou.net · Jan 2017 - Rendering 1: Matrices
Rendering series part 1: matrices and transformations.
catlikecoding.com · Feb 2016 - The Transformation Matrix for 2D Games
Introduces the transformation matrix for translating, rotating and scaling 2D graphics.
alanzucconi.com · Feb 2016 - A Gentle Primer on 2D Rotations
Primer on 2D rotations for game developers.
alanzucconi.com · Feb 2016 - The Secrets of Colour Interpolation
Explains how color interpolation works and its pitfalls.
alanzucconi.com · Jan 2016 - Polygonal Planet Project – a study in tilesets
Playable browser study of marching-style tilesets wrapped around a polygonal planet surface.
oskarstalberg.tumblr.com · ~Jan 2016 - Practical trigonometry for 2D games
Practical trigonometry for 2D games (members-only post).
alanzucconi.com · Jun 2015 - Game Math: More on Numeric Springing
Game math on numeric springing, continued with more details.
allenchou.net · Apr 2015 - Game Math: Numeric Springing Examples
Examples of numeric springing for controlling motion.
allenchou.net · Apr 2015 - Game Math: Precise Control over Numeric Springing
Game math on precise control over numeric springing.
allenchou.net · Apr 2015 - Game Math: Interpolating Quaternions with Circular Blending
Interpolates quaternions with circular blending for skeletal animation data.
allenchou.net · Apr 2014
Showing the newest 120 of 149. See all 149.