Git Product home page Git Product logo

pygame.ghostleg.201707281457's Introduction

このソフトウェアについて

pygameであみだくじゲームを作った。

ゲームといえるか甚だ疑問。pygameを使った最初の試作品。3週間くらいかかった。

開発環境

ライブラリ

$ pip freeze > requirements.txt

requirements.txt

numpy==1.13.1
olefile==0.44
pgu==0.18
Pillow==4.2.1
pygame==1.9.3
PyOpenGL==3.1.0
PyOpenGL-accelerate==3.1.0
PyOpenGL-Demo==3.0.0

ライブラリの一括インストール

$ pip install -r requirements.txt

(このアプリで使っているのはpygameだけのはずなので他は不要かもしれない)

https://docs.python.jp/3/tutorial/venv.html#managing-packages-with-pip

実行

$ cd src
$ python Main.py
操作キー 説明
ESC 終了する。
←,A カーソルを左に移す
→,D カーソルを右に移す
Z,Space,Enter 決定する(カーソル決定、アニメーション省略、あみだくじ再開)

概要

あみだくじゲーム。

http://ytyaru.hatenablog.com/entry/2018/06/27/000000

pygame

  • メインループ
  • イベント処理(キーボード入力)
  • 描画
      • pygame.draw.line(...)
      • pygame.draw.lines(...)
    • 文字列
      • screen.blit(font.render(...))

ゲームとしての最低限要素

  • 結果の分岐(ランダム)
  • インタラクティブ性(ユーザとシステムの対話)
  • 演出(選択から結果までのアニメーション)

課題

  • コードを綺麗にしたい
    • Initialize, Finalizeフレームワークが使われていない
    • CalcSizeでCursor文字を参照できないからハードコーディングしている
    • GameCommand内にStateに参照させる必要のない描画メソッドがある(DrawGhostleg, DrawCursor)
  • アニメーション強制終了するとき瞬時に完了しない
  • 結果表示時、何らかの演出が欲しい(効果音等)

ライセンス

このソフトウェアはCC0ライセンスである。

CC0

以下、利用させていただいたもの。感謝。

ライブラリ

Library License Copyright
pygame LGPL pygame

フォント

Font License Copyright
M+ Free M+
美咲フォント Free 美咲フォント

pygame.ghostleg.201707281457's People

Contributors

ytyaru avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.