Pythonを使ったソフト開発に欠かせないのが「ライブラリー」です。Pythonには用途に応じて多くのライブラリーが用意されています。その中でゲーム作成に特化しているのが「PyGame」です。
今回はちょっと実用処理から離れてPythonでゲームを作ってみよう。Pythonにはさまざまなライブラリが用意されており、その中にはゲーム開発に特化したライブラリもある。今回はPyGameと呼ばれるライブラリの使い方を紹介する。PyGameで迷路ゲームを作って ...
import pygame from pygame.key import key_code from pygame.locals import * import sys import time #押されたキーの先頭の一文字を設定する def getInputkey(key_code): inputkey = key_code if inputkey == "" : inputkey = "-" ...
前回の記事でpygameを使って画面を出しましたが、今回はキャラクターを画面上に置いてみます。 画面にプレーヤーとして赤い四角、ゴールとして青い四角を置いてみます。ついでにキャラクターを配置する位置は画面サイズに依存するので、画面サイズを ...
With ctypes, you can mix C/C++ code with Python to gain the speed of compiled code with the awesomeness of Python. How much speed are we talking about? When compiled with optimizations enabled, the ...
So, you want to learn Python? That’s cool. A lot of people are getting into it these days because it’s used for all sorts of things, from building websites to analyzing data. If you’re looking for a ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する