-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
10 changed files
with
120 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,120 @@ | ||
ゲームプログラムのサンプル | ||
========================== | ||
|
||
Pygame Zero にはゲームのコードを読んだり変更したりして学ぶためのサンプルのコレクションがあります。もちろんそのゲームで遊ぶこともできます! これらのサンプルは Pygame Zero の通常のインストールでは含まれていませんが、ソースコードリポジトリから入手できます。ダウンロード方法は以下の通りです。 | ||
|
||
- `GitHub リポジトリ <https://github.com/lordmauve/pgzero>`_ で緑の大きなボタンをクリックすると表示される **Download ZIP** を選択して Pygame Zero をダウンロードします。 | ||
- ダウンロードした zip ファイルを展開したら、その中の ``examples`` をフォルダごと好きな場所にコピーします。 | ||
- ディスクスペースを節約したければ、zip ファイルやそのほかのソースコードは削除してかまいません。 | ||
|
||
これであなたが作成したゲームと同じやり方でゲームを動かせるようになりました。たとえば、ピンポンゲームを起動するには次のように実行してください :: | ||
|
||
pgzrun examples/pong/pong.py | ||
|
||
ソースコードを読んだり、変更してみることはプログラミングのとても良い学習方法です。さあ、早速コードをハックしてみましょう! | ||
|
||
ゲームサンプルの一覧 | ||
-------------------- | ||
|
||
Asteroids | ||
^^^^^^^^^ | ||
.. image:: _static/asteroids.png | ||
:alt: Asteroids | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/asteroids/main.py | ||
|
||
基本のプログラム | ||
^^^^^^^^^^^^^^^^ | ||
以下のプログラムは Pygame Zero の主要機能を学ぶのに役立つ簡単なサンプルです。こららのいくつかはドキュウメントの中で説明されているものです。 | ||
|
||
Flappybird | ||
^^^^^^^^^^ | ||
.. image:: _static/flappybird.png | ||
:alt: Flappybird | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/flappybird/flappybird.py | ||
|
||
Lander | ||
^^^^^^ | ||
.. image:: _static/lander.png | ||
:alt: Lander | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/lander/lander.py | ||
|
||
Memory | ||
^^^^^^ | ||
.. image:: _static/memory.png | ||
:alt: Memory | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/memory/memory.py | ||
|
||
Mines | ||
^^^^^ | ||
.. image:: _static/mines.png | ||
:alt: Mines | ||
:height: 300 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/mines/mines.py | ||
|
||
Pong | ||
^^^^ | ||
.. image:: _static/pong.png | ||
:alt: Pong | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/pong/pong.py | ||
|
||
Snake | ||
^^^^^ | ||
.. image:: _static/snake.png | ||
:alt: Snake | ||
:height: 300 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/snake/snake.py | ||
|
||
Tetra puzzle | ||
^^^^^^^^^^^^ | ||
.. image:: _static/tetra-puzzle.png | ||
:alt: Tetra Puzzle | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/tetra_puzzle/main.py | ||
|
||
Tron | ||
^^^^ | ||
.. image:: _static/tron.png | ||
:alt: Tron | ||
:height: 500 | ||
:align: center | ||
|
||
実行方法 :: | ||
|
||
pgzrun examples/tron/tron.py |