Many, if not the most popular commercial games these days, include some kind of scripting engine for the logic of the game. Logical decisions on logic, for the most part, are not particularly sensitive to performance in that, for example, a rendering engine.
BTW - I do not require any insider knowledge of game development - this is pretty well known outside the industry. Some game publishers have even allowed users access to scripting materials and other game modding tools โ for many years.
If you find a game engine that will be used for use in Python, you will be dealing with the same basic principles. Write the logic of the game in Python, and you'll probably be fine.
PyGame is basically an SDL wrapped for Python, supporting basic 2D games for the most part (although OpenGL can be used for 3D in SDL - not sure about PyGame).
This is a good starting point. You may run into a performance issue by managing your game objects and starting the blit loop, since only very simple graphic material is processed by SDL, but you should find that this is just great for most things.
As Ignacio implies, worry about performance issues when you know that you have performance issues, not before. Some performance issues are predictable in advance, but if you are not writing a true game engine in Python, you should be fine - don't fall into the trap of premature optimization, IOW.
Steve314
source share