Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

I have several games created with Pygame and exported to the web.

As others have mentioned, Python is a high-level language, designed to be easy to use, but it's not hardware-optimized like some other languages, and Pygame, depending on your game's resolution, requires a lot of CPU cycles.

You can optimize by vectorizing, using parallel processing, or leveraging GPU acceleration, but all of these tend to cause problems with Pygbag. So, the truth is, not every game programmed in Pygame is playable on the web.

In my experience, the same game that runs at 165 FPS on the desktop version will drop to 30 or 20 FPS on the web version,  If you're going to use Pygbag, it's best if your game has a low resolution or is a slow-paced game, like an interactive fiction game.

Regardless, you should be aware that the performance you can achieve in web games will always be worse than what you can get natively. If your game is very demanding, you'll need to find a language that's well-optimized, and you'll likely have to make cuts or optimize your game.
(+1)

Thank you so much for sharing you experience, it's not just me then 😅 Anyway now that I'm done with the web version that I will release today, I'm not so sure about developing the game much more with the current framework. I mean small improvements/patches maybe, but now I'm aware about these performance issues, I'll think twice.