插曲是:crazy frog(疯狂的青蛙)
听听看是不是吧:
或者在线看看看:
直接用python的Tkinter模块写游戏不是很方便。 建议装pygame。
pygame主页projects分类下有大量游戏源码下载。
去pygame主页一看便知。引用一段pygame主页的FAQ:
Where can I find simple Pygame examples?
The book Making Games with Python & Pygame has the source code for several simple games (Tetris, Bejeweled, Nibbles, etc.) with detailed explanation.
The Pygame documents folder in the download contains several examples. These examples include the chimp program from the tutorials as well as two versions of aliens.
The Pygame Cookbook has some drop in code for doing various tasks in Pygame.
Another set of cookbook style example code is available from Simpson College here, this code also links to an on-line text that explains the answers and beginning coding concepts.
The Pygame Projects pages contain programs with a wide range of
sophistication, starting with beginning programmers first attempt. Have a look at the arcade and 2d tags. There are many versions of pong and snake. The source code for the book GAME PROGRAMMING by Andy Harris [ISBN-13: 978-0-470-06822-9] is here. The first Pygame example is in chapter four, Building a Game Example
相关标签: # python # 源代码 # 1124230171