-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fba80e2
commit 459dd1c
Showing
11 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
Examples | ||
======== | ||
Pygame Zero has a collection of examples which you can use to learn by reading | ||
or modifying the code of the game. You can also play with them! These examples | ||
aren't provided with a normal installation of Pygame Zero but they're available | ||
in the source code repository. To download them, follow the following steps: | ||
|
||
- Download the source code of Pygame Zero on the | ||
`GitHub repository <https://github.com/lordmauve/pgzero>`_ by clicking in the | ||
big green button and choosing **Download ZIP** | ||
- Copy the ``examples`` folder whatever you want. | ||
- Delete the ZIP and the source code if you want to save space on your disk. | ||
|
||
Now you can play with them as another game that you might created. For example, | ||
to run the pong game, you should run:: | ||
|
||
pgzrun examples/pong/pong.py | ||
|
||
Reading & editing the source code is a great way to learn to code, so start | ||
hacking the code! | ||
|
||
List of example games | ||
--------------------- | ||
|
||
Asteroids | ||
^^^^^^^^^ | ||
.. image:: _static/asteroids.png | ||
:alt: Asteroids | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/asteroids/main.py | ||
|
||
Basic | ||
^^^^^ | ||
This a collection of simple examples that you can use to learn who to use key | ||
parts of Pygame Zero. Some of them are examples explained in the documentation. | ||
|
||
Flappybird | ||
^^^^^^^^^^ | ||
.. image:: _static/flappybird.png | ||
:alt: Flappybird | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/flappybird/flappybird.py | ||
|
||
Lander | ||
^^^^^^ | ||
.. image:: _static/lander.png | ||
:alt: Lander | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/lander/lander.py | ||
|
||
Memory | ||
^^^^^^ | ||
.. image:: _static/memory.png | ||
:alt: Memory | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/memory/memory.py | ||
|
||
Mines | ||
^^^^^ | ||
.. image:: _static/mines.png | ||
:alt: Mines | ||
:height: 300 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/mines/mines.py | ||
|
||
Pong | ||
^^^^ | ||
.. image:: _static/pong.png | ||
:alt: Pong | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/pong/pong.py | ||
|
||
Snake | ||
^^^^^ | ||
.. image:: _static/snake.png | ||
:alt: Snake | ||
:height: 300 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/snake/snake.py | ||
|
||
Tetra puzzle | ||
^^^^^^^^^^^^ | ||
.. image:: _static/tetra-puzzle.png | ||
:alt: Tetra Puzzle | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/tetra_puzzle/main.py | ||
|
||
Tron | ||
^^^^ | ||
.. image:: _static/tron.png | ||
:alt: Tron | ||
:height: 500 | ||
:align: center | ||
|
||
To play, run:: | ||
|
||
pgzrun examples/tron/tron.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ User Guide | |
installation | ||
repl | ||
ide-mode | ||
examples | ||
other-libs | ||
changelog | ||
|
||
|