Hacker News new | ask | show | jobs
by gnfedhjmm2 729 days ago
It’s funny I was thinking about writing some browser based games using Pyscript with web assembly. But now I think by the time I finish the games they’ll have ported enough of Python into web assembly that I might as well write it with Kivy or Pygame and then it would be cross platform. Pygame already in the browser, but slow and clunky IMO. In 6 months who knows?
1 comments

Don't let analysis paralysis deter you from writing games. Pyscript is fine. Other stuff is fine too. Pick whatever technology you want, and make quick games with rapid prototyping. Join some game jams and keep your scope small. It's better to create and ship many small games.

About pygame in the browser: check out pygbag.

Would like technical thoughts, not cheerleading. I’ve written many games before just not with a new shaky stack.
Oh but in technical terms my thoughts are completely opposite. Python wouldn't be my first choice for games in general, and much less for web games.

Really the only way to justify using Python in this domain is if you're more comfortable with Python than other languages, and what you are building is a small, lightweight game. But this is reason enough to validate the idea! So if you want to build a game with Python, go for it.

But if you're minimally comfortable with Typescript it would be a seriously better fit for this domain. Something like https://github.com/pixijs/pixijs will work much better than Pygame or anything. It's geared towards simple 2D games too.

One reason for that is dependencies. By using Python with Pyscript you will be constrained with what libraries you can use, because not all of them is compatible with Pyscript.

(I myself am more comfortable with Rust, and Rust libraries like https://github.com/not-fl3/macroquad can target browsers, desktop and mobile; and it's also meant for simple 2D games. And I prefer the Rust ecosystem of libraries, too)

Some of us appreciated the cheerleading though. :-)