Hey hey people, Mark here, and today I wanted to share with you a very small library for js13k games called natlib. It consists of (refactored and improved!) parts lifted from my previous years' js13k submissions, some of those were in top-20 or something.
Included in this version are:
Fixed-step mainloop code that I use everywhere
- Decouples world updates from rendering
- Prevents floating-point error accumulation
- Interpolate between the previous and the current state for smooth animation, especially noticeable when the rendering performance is low or inconsistent.
Mulberry32, a great little 32-bit PRNG