Grid-based spirals

Good for placing objects around a grid cell! Like this:

A spiral spanning a 9x9 square grid. Points are numbered and lines show the path.
(try a newer browser for an interactive demo!)(enable JavaScript for an interactive demo!)
(click to interact)
Click/tap to select point

You give the function a grid XY and it tells you where the next point should be to have it go in a spiral.

Continue reading

Fast approximate arctan2/atan2 function

(click to interact)

Alternatively titled "exciting adventures in doing trigonometry without CRT".

Continue reading

Preparing your game for deterministic netcode

A person asks "What is NETCODE?"
If this looks slightly familiar, that's because it is

Considering that frequency at which people ask me about what it takes to do netcode (and what they need ready for it) continues to rise year-to-year, I figured that it's about time that I finally make a blog post about this.

This one's about deterministic netcode as it is by far most requested and also the kind where it's possible to give more specific advice than "it depends".

Continue reading