Live data from Hacker News

Pygame 2.0

github.com

51–60 of 63 posts

Re: Pygame 2.0

#51

Circa 2007 I started messing with pygame. Just this week I dug up some of my old code and typed `python main.py` thinking, no way this'll work. But it did. The first feature on the Pygame 2 page is "Backward compatibility". Pygame's been way behind the times and I'm excited to see it getting some attention. But major kudos to the team for maintaining that priority.

An alternative, but much more disappointing explanation for this is that Pygame saw almost no development from '09 until about a year ago: https://github.com/pygame/pygame/graphs/contributors

Re: Pygame 2.0

#52
post #8

As coincidences go, just the day before yesterday I looked into pygame and came across this Quora question: https://www.quora.com/Is-Pygame-fast-enough-for-modern-game-... The sentiment seems to be that it's not suitable for more than small toy games -- which in itself would still be interesting. I mean, it's clear that professional AAA studios are not the core target group. But has anyone here on HN additional hands…

From my limited experience with Pygame, I found that it struggles[1][2] with sprite rotations. I am assuming that this was happening due it being using software rendering instead of the GPU which might have changed now with Pygame 2.0.

[1] https://github.com/ducaale/nyan/blob/feature/lines/examples/...

[2] https://youtu.be/OfaZavigYUw

Re: Pygame 2.0

#53
post #51

Circa 2007 I started messing with pygame. Just this week I dug up some of my old code and typed `python main.py` thinking, no way this'll work. But it did. The first feature on the Pygame 2 page is "Backward compatibility". Pygame's been way behind the times and I'm excited to see it getting some attention. But major kudos to the team for maintaining that priority.

An alternative, but much more disappointing explanation for this is that Pygame saw almost no development from '09 until about a year ago: https://github.com/pygame/pygame/graphs/contributors

It's a valid theory, but the page you linked says 2.3k commits over that period. More than enough to annihilate backwards compatibility unless you're very deliberate about it.

Re: Pygame 2.0

#54
I think Python Arcade (https://github.com/pythonarcade/arcade) is/was a bit more active, right?

https://arcade.academy/pygame_comparison.html

When I checked PyGame, that was ages ago, and it looked a lot like a (higher-level) SDL wrapper to me, but more Pythonic. Although, coming from C++ and having used SDL before, I decided to use a more direct SDL wrapper instead. So I created my own simple ctypes-based wrapper (https://github.com/albertz/PySDL). But this is not really updated, and there are newer ones (e.g. https://github.com/marcusva/py-sdl2).

Anyway, I don't want to say these are better. It's great that PyGame is still active (again).

It's great to have such simple libraries to write games. Also for educational purpose, or just for fun. E.g. I wrote this (https://github.com/albertz/PyOverheadGame).

Re: Pygame 2.0

#55
Pygame sounds cool. All I want to know is what platforms does it support, suprised they dont list that anywhere easy to find.

This blog based project home page obscures the relevant in favor of the recent.

Found the relevance on the About page.

"Pygame is highly portable and runs on nearly every platform and operating system."

Would appreciate a list but Ok.

Oh snap here we go:

"Truly portable. Supports Linux (pygame comes with most main stream linux distributions), Windows (95, 98, ME, 2000, XP, Vista, 64-bit Windows, etc), Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS and OS/2, but these are not officially supported. You can use it on hand held devices, game consoles and the One Laptop Per Child (OLPC) computer."

Wonder if it supports an HTML player?

Re: Pygame 2.0

#56
I put together a halloween display using a Kinect and pygame for my front yard (very quickly hacked together by the way):

https://github.com/erahhal/kinect-halloween-skeleton

Pygame is nice and easy to use, though I think I'd go with something else next time, as it doesn't support multiple monitors or OpenGL very well. I see OpenGL stuff at the top of the Pygame 2.0 change list so maybe worth checking out.

Re: Pygame 2.0

#57

I put together a halloween display using a Kinect and pygame for my front yard (very quickly hacked together by the way): https://github.com/erahhal/kinect-halloween-skeleton Pygame is nice and easy to use, though I think I'd go with something else next time, as it doesn't support multiple monitors or OpenGL very well. I see OpenGL stuff at the top of the Pygame 2.0 change list so maybe worth checking out.

It supports multiple monitors and has better OpenGL support now.

Re: Pygame 2.0

#58
I've written a lot of stuff in pygame on the pi.

The major issue I ran into was no hardware acceleration, so performance came from (software) blits of only the updated part of the screen and similar techniques.

But I found it very fun to program in an environment with integrated graphics and sound and fonts and video and input devices and a event loop with timer ticks.

A lot of linux folks are thinking x vs wayland, but I'll bet if we replaced everything with an integrated environment that had everything necessary to support a game, we would have much better linux user interfaces.

Re: Pygame 2.0

#59

I self learned pygame in high school, 15 years later I’m still using it for mapping and rendering - I probably shouldn’t, but I find the library just so damn intuitive. Congrats To the pygame team, and thank you for being the core tool which truly taught my objective code, and many UI design concepts (:

That's cool, what kind of mapping and rendering are you doing with it?

Again things I shouldn’t be using it for. I plotted latency/ping on a map When I was having pretty bad internet trouble in early Uni. I rendered some pixel-perfect shapes when building a stub website (At the time I didn’t know how to use Inkscape). I think at some point I visualised exponential mathematical algorithms too.

My initial project was to build a media center similar to Kodi. It was horrible, pseudo-objective, and built UI components from event and pixel blitting primitives. It was a year 12 project (in a ‘pick your project’ non IT class). It probably actually pushed me to complete year 12, and gave me a good foundational basis for IT at uni. I was a ‘troubled’ student who hated school, was bullied pretty bad, and hung out with people actively abusing drugs and alcohol. 15 years on am thankful I’m not a methhead, I’m sure that Kodi project had a part in saving me no matter how unstable and poorly written it was.

Re: Pygame 2.0

#60
post #8

As coincidences go, just the day before yesterday I looked into pygame and came across this Quora question: https://www.quora.com/Is-Pygame-fast-enough-for-modern-game-... The sentiment seems to be that it's not suitable for more than small toy games -- which in itself would still be interesting. I mean, it's clear that professional AAA studios are not the core target group. But has anyone here on HN additional hands…

I can't speak to PyGame2, but PyGame circa 2010 was definitely super slow compared to, say, Java and SDL. For some kinds of games it was fine, and it was good for prototyping and if you were just getting in to game dev.

That was more or less Python's fault, rather than PyGame, which uses SDL also. I remember getting a huge speedup for one game with import psyco; psyco.full(). It's going to continue being true that Python + whatever is going to be slower than almost any other lang + whatever, even with more GPU support. But still, lots of games (even shippable ones) are possible, and lots of non-game applications. I'm still in love with the pygame/SDL1 way of doing 2D graphics, it was just so straightforward, and working with their interfaces and abstractions (pygame.sprite was nice) rather than SDL directly was always more pleasant too.
Post reply on HN