Skip to main content
2 of 3
grammar
user avatar
user avatar

How much can I do with graphics using pyGame? Should I use something else?

I'm a begginer in programming, pursing game development as a hobby. My main tools have been Python and pyGame. I have created several simple games, but until now, I have focused on mechanics rather than graphics. The graphics in my games have been extremely rudimentary, consisting of basic shapes on black backgrounds.

I've recently decided to change that and create a 2D graphics engine supporting proper texturing, some animation, and most importantly, lighting. While researching these, especially the last, I've started doubting whether pyGame is the right tool for this.

Many tutorials concering implementation of lighting, shadows etc. recommend using techniques such as GPU shaders and various extensive pixel-level manipulation. Looking at the documentation of pyGame, I don't see anything that would let me implement such things with any degree of efficiency. I can access bitmaps directly with PixelArray, but doing any significant processing this way seems like it would be a performance nightmare, and something I'd rather want to be done in a native library, with GPU acceleration, not in my Python code.

So, my question is: what am I missing? Should I use some openGL binding? I know pyGame is a binding to the SDL library, does that library include some more advanced features that I can access "directly"? Am I completely misunderstanding how all of this works?

I'm sorry if I'm not completely clear on what I'm asking or being stupid in my explanations, but I'm operating on the edge of my understanding of what I'm doing and just struggling to understand how all these things (pygame, SDL, openGL, etc.) come together.

user44535