u/mefistofeles57

▲ 21 r/pygame

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!

u/mefistofeles57 — 9 days ago
▲ 31 r/pygame

Spent too long figuring out road forks for my pygame pseudo-3D racer

Back with an update on Cool Racing, my pseudo-3D racer in Python + pygame, inspired by the 80s/90s arcades.

Road forks were way harder than I expected. In the end I copied Outrun's trick: symmetrical forks, one road mirrored. I wrote up the details in the devlog (link in the comments).
Still lots to do, more biomes are next. Any feedback is very welcome!

u/mefistofeles57 — 16 days ago