Python_pygame library study notes (1): the origin, characteristics and module introduction of pygame

The origin of the Pygame library:

In 2000, the author Pete Shinners was moved by the simplicity of Python and SDL (Simple DirectMedia Layer: C language constructs a cross-platform game development library, lowering the threshold of game development), and had the idea of ​​combining the two into one.
At that time, a programmer named Mark Baker combined the two to develop PySDL, which was comprehensive in content, but the author of pygame was not satisfied with this, thinking that the library was written with the taste of C language, and then the PySDL library failed. Pete Shinners also successfully launched his new project - pygame, and set the development principle: easy things are easy to do, difficult things are intuitive to do.

Is Python suitable for developing games?

According to the authors of the Pygame library, it depends on the type of game.
Game development is divided into two parts: engine and logic. In 2001, there was a precedent for game development with self-made 3D engine + python language logic.
It is very good to develop 2d games with pygame. The (SDL) library has a very high degree of freedom and gives you a sense of control, but it also means that you must always know what you want and what you are doing.

Pygame installation

Like other libraries, just mention
windows: pip install pygame

Introduction to Pygame Modules

Alt
Content source: Pygame official website: https://www.pygame.org/docs/tut/PygameIntro.html

Guess you like

Origin blog.csdn.net/weixin_45980989/article/details/125731389