Watched a video of Theprimetime exploring the code of Q1K3, a 13kb javascript interpretation of the original quake game.

The code is littered with fun little optimisations and tricks to cut down code and data size. Some of the most notable ones for me were:

  • not using textures as png but generating / reusing them with code
  • removing faces from models that are not being seen
  • reordering bytes in data to increase zip efficiency

Blog: https://phoboslab.org/log/2021/09/q1k3-making-of Video: https://youtu.be/XgNnfqodD5s?si=1iWnN04xxIHIBYTs