r/pythonhelp • u/[deleted] • May 31 '23
What is pygame?
Hi guys i started to learn python but didnt know if i should use it because i dont know what it does so can u guys explain in a simple way?
1
Upvotes
r/pythonhelp • u/[deleted] • May 31 '23
Hi guys i started to learn python but didnt know if i should use it because i dont know what it does so can u guys explain in a simple way?
1
u/[deleted] Jun 01 '23
As well as code you have written yourself in Python, you can avail yourself of code written by other people. This avoids you having to "re-invent the wheel".
Rather than you relying on a personal network of friends and colleagues for such code, well-defined packages of code are published to the PyPi repository, the default source for packages when you use the
pipcommand to install additions to Python.More complex packages are often known as frameworks or libraries.
You need to make your own judgement about the suitability of any package, support/community availability, whether it is well maintained with regular updates, and so on.
PyGame is a very popular, well-supported and long-established package that is very popular for saving you a lot of work in developing certain classes of games, and other programmes that can take advantage of similar presentation (appearance) and user interaction (UI) including scanning the keyboard, providing graphical output, dealing with additional devices such as joysticks, and so on.
Here's some useful reading from Real Python:
PyGame: A Primer on Game Programming in Python