Debian Codegraph @

doc/other-libs.rst

raw
1 Other libraries like Pygame Zero
2 ================================
3
4 Pygame Zero started a trend for Python "zero" libraries. Our friends have
5 created these great libraries. Some of these can be combined with Pygame Zero!
6
7
8 Network Zero
9 ------------
10
11 `Network Zero`_ makes it simpler to have several machines or several processes
12 on one machine discovering each other and talking across a network.
13
14 .. caution::
15
16 If you want to use Network Zero with Pygame Zero, make sure you don't let
17 it **block** (stop everything while waiting for messages). This will
18 interrupt Pygame Zero so that it stops animating the screen or even
19 responding to input. Always set the ``wait_for_s`` or ``wait_for_reply_s``
20 options to ``0`` seconds.
21
22
23 .. _`Network Zero`: https://networkzero.readthedocs.io
24
25
26 GUI Zero
27 --------
28
29 `GUI Zero`_ is a library for creating Graphical User Interfaces (GUIs) with
30 windows, buttons, sliders, textboxes and so on.
31
32 Because GUI Zero and Pygame Zero both provide different approaches for drawing
33 to the screen, they are not usable together.
34
35
36 .. _`GUI Zero`: https://lawsie.github.io/guizero/
37
38
39 GPIO Zero
40 ---------
41
42 `GPIO Zero`_ is a library for controlling devices connected to the General
43 Purpose Input/Output (GPIO) pins on a `Raspberry Pi`_.
44
45 GPIO Zero generally runs in its own thread, meaning that it will usually work
46 very well with Pygame Zero.
47
48 .. caution::
49
50 When copying GPIO Zero examples, do not copy the ``time.sleep()`` function
51 calls or ``while True:`` loops, as these will stop Pygame Zero animating
52 the screen or responding to input. Use :ref:`clock` functions instead to
53 call functions periodically, or the :func:`update()` function to check a
54 value every frame.
55
56 .. _`GPIO Zero`: https://gpiozero.readthedocs.io/
57 .. _`Raspberry Pi`: https://www.raspberrypi.org/
58
59
60 Adventurelib
61 ------------
62
63 `Adventurelib`_ is a library for creating making text-based games easier to
64 write (and which doesn't do everything for you!).
65
66 Writing text-based games requires a very different set of skills to writing
67 graphical games. Adventurelib is pitched at a slightly more advanced level of
68 Python programmer than Pygame Zero.
69
70 Adventurelib cannot currently be combined with Pygame Zero.
71
72
73 .. _Adventurelib: https://adventurelib.readthedocs.io/
74
75
76 .. tip::
77
78 Know of another library that belongs here?
79
80 `Open an issue <https://github.com/lordmauve/pgzero/issues/new>`_ on the
81 issue tracker to let us know!