Live data from Hacker News

Pygame 2.0

github.com

31–40 of 63 posts

Re: Pygame 2.0

#31

Earlier quoted context omitted.

Are you sure you're not talking about an older version of Pygame regarding the software rendering? I haven't used it but the very first bullet point in the list of changes of this release says: > Support for Metal, Direct 3d, Vulkan, OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc), OpenGL ES, and other modern hardware accelerated video APIs across many platforms.

pygame team member here There's an important caveat: We provide an API for the SDL2 render system, and some functionality for up-scaling pixel art games on the GPU, but existing pygame 1.x games won't magically become faster by running on PyGame 2.0. They will be a little faster, because we have new, optimised blitting and drawing routines. To make use of GPU-based rendering, you will need to use the new APIs.

Would the pygame team be interested in presenting a talk at the Debian gaming mini-conf?

https://mdco2.mini.debconf.org/ https://wiki.debian.org/DebianEvents/internet/2020/MiniDebCo...

Re: Pygame 2.0

#33
post #22

Any uses of it for things that aren't games?

We used it (first directly, and then via PsychPy) for running vision experiments.

You need to be a little careful about timing, but otherwise it's not bad....

Re: Pygame 2.0

#34
It's really nice to see how type hints are spreading. I've been surprised how natural my adoption of them has been.

Re: Pygame 2.0

#35
post #34

It's really nice to see how type hints are spreading. I've been surprised how natural my adoption of them has been.

Indeed! I despised them initially thinking typing made code unreadable. But I've grown used to it and I only use type hints when necessary. I use Pydantic when I need more than just "hints" and when validating config file schemas.

Re: Pygame 2.0

#37
post #35
post #34

It's really nice to see how type hints are spreading. I've been surprised how natural my adoption of them has been.

Indeed! I despised them initially thinking typing made code unreadable. But I've grown used to it and I only use type hints when necessary. I use Pydantic when I need more than just "hints" and when validating config file schemas.

Pydantic is extremely useful for validation and tab-completion. We've begun using it everywhere.

Re: Pygame 2.0

#38
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 built a game engine and some games on top of Python, way back in the day when I was still learning programming. Pygame on its own really gives you none of the features that a proper game engine needs, such as support for animated sprites, a map loader, a camera system (in Pygame, everything is in screen coordinates, and you can't zoom in or out), a real physics engine, a particle system, tweening, and so on. And un…

Pygame is great if you want to enjoy the process of low-level game programming but also want to abstract away the lowest levels. If your goal is to build a product (rather than enjoy a process) picking up a game engine is probably going to yield faster results.

Re: Pygame 2.0

#39
post #9

Earlier quoted context omitted.

I've done a fair amount with Pygame. It's great for learning the fundamentals of 2D graphics and little toy games, it works well for writing simple programs to do things with image data, and I imagine you could use it to pretty easily get an OpenGL window to draw into. I would not recommend using Pygame to develop a serious game project. All of Pygame's provided functions use software rendering, so you won't be able…

Hello. pygame volunteer here. Here's some awesome libraries and frameworks that work with or are built on top of pygame. pygame_gui - gui elements for pygame. pymunk - 2d physics library. Lots of examples, very well maintained. Thorpy - a GUI library for pygame. pyscroll - Scrolling maps. Fast scrolling images easy. pyTMX - Reads Tiled Map Editors TMX maps. Can use a Map editor easily. spritesheetlib - loading sprite…

Can recommend PyScroll / PyTMX - made it very easy to make an RTS interface: https://github.com/EamonnMR/OpenLockstep

Re: Pygame 2.0

#40
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…

It's a friendly wrapper to SDL. The people saying "but it's not a serious engine" are letting the point of it fly over their head. If what you want is some raw control over I/O it's a fine choice, provided you aren't going for a compute-intensive main loop. I know of a few folks who shipped pygame stuff in the 2000's - that was an era when software rendering was still defacto the right choice for high compatibility, and of the options for speeding up development, a dynamic typed language offered some compelling advantages. If your game didn't scroll the screen, or targeted low res and 256 colors, or you mixed it with pyOpenGL, it was hardly the end of the world. The first comment in that Quora thread is from a student, who unsurprisingly has blamed the tool.

Emphasis on "pygame is slow" mostly comes down to "Python* is slow", and that, too, has an asterisk in that you can hybridize to add Cython or a C module. It will never be as fast as a good native code implementation, but when using all available tools to extend performance, you could easily accomplish just about anything from 90's-era gaming.

Post reply on HN