My pseudo-3D racer now runs in the browser (pygame + pygbag)
Cool Racing, my pseudo-3D arcade racer in Python + pygame, is now playable in the browser!
Getting it to run in WASM took a lot of optimization: cache tuning, adaptive framerate, real-time scaling with sprite clipping for the near plane, RLE and colorkey blits, and refactoring the heaviest parts of the renderer.
The browser version isn't perfect: it reaches 30 fps, while desktop runs comfortably at 60. It plays the same, but with some sound glitches and less smoothly.
Also new this week: a desert biome with a canyon section, and transitions between biomes.
Any feedback is very welcome!