r/pygame

▲ 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
▲ 2 r/pygame

Looking for a comprehensive book for learning Pygame

I very recently made a post about a Pygame CE programming book by Ralf Adams, which is readable here: https://github.com/adamsralf/pygame_book/blob/main/00%20pygamece.pdf.

The issue is I can't read it on my laptop after 30 pages and I can't download it. Are there any other books as comprehensive as this one? I really wanted to download the Ralf Adams book after but my laptop isn't able to do this for some reason.

I have already read Invent Your Own Computer Games by Al Sweigart and Object-Oriented Python: Master OOP by Building Games and GUIs by Irv Kalb. I'm willing to spend up to £200 on a book that can just teach me how to make any kind of 2D game with Pygame. I'm frustrated with the apparent lack of options available in regards to Pygame game development.

u/EasternTrajectory21 — 10 days ago