一个基于 Flappy Bird 的魔改,对就是你想的那样。里面的音乐是借鉴别人的,但是 Frog 的图标是自己一个像素点一个像素点画的。好久之前弄得了,给大家图个乐呵,建议不要在实验室和办公室里玩,会笑出声的…… 谢谢大家
Github 地址: https://github.com/Yaoshicn/FlappyFrog
1
Phariel 2016-11-30 12:48:50 +08:00
Excited!
|
2
kokutou 2016-11-30 12:55:00 +08:00 2
2to3 处理一下就可以在 py3.5 上运行了。。。
``` kiritsugu@KIRITSUGU-PC C:\Python35\Tools\scripts $ 2to3 -w C:\Users\kiritsugu\Desktop\FlappyFrog-master\flappy.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored C:\Users\kiritsugu\Desktop\FlappyFrog-master\flappy.py --- C:\Users\kiritsugu\Desktop\FlappyFrog-master\flappy.py (original) +++ C:\Users\kiritsugu\Desktop\FlappyFrog-master\flappy.py (refactored) @@ -175,7 +175,7 @@ # adjust playery, playerIndex, basex if (loopIter + 1) % 5 == 0: - playerIndex = playerIndexGen.next() + playerIndex = next(playerIndexGen) loopIter = (loopIter + 1) % 30 basex = -((-basex + 4) % baseShift) playerShm(playerShmVals) @@ -262,7 +262,7 @@ # playerIndex basex change if (loopIter + 1) % 3 == 0: - playerIndex = playerIndexGen.next() + playerIndex = next(playerIndexGen) loopIter = (loopIter + 1) % 30 basex = -((-basex + 100) % baseShift) @@ -442,8 +442,8 @@ x1, y1 = rect.x - rect1.x, rect.y - rect1.y x2, y2 = rect.x - rect2.x, rect.y - rect2.y - for x in xrange(rect.width): - for y in xrange(rect.height): + for x in range(rect.width): + for y in range(rect.height): if hitmask1[x1+x][y1+y] and hitmask2[x2+x][y2+y]: return True return False RefactoringTool: Files that were modified: RefactoringTool: C:\Users\kiritsugu\Desktop\FlappyFrog-master\flappy.py ``` |
4
caomu 2016-11-30 13:41:12 +08:00 via Android
|
5
Garantion OP @caomu
我还是需要学习一个…… 那个是在线版的,我的声音素材是直接用的他的。 (主要我搞了个自动无限续的……你可以看看这个: https://github.com/Yaoshicn/DeepLearningFlappyFrog )/滑稽 |
6
wizardforcel 2016-11-30 15:19:20 +08:00
你们啊,_____!( 1 分)
|
7
ragnaroks 2016-11-30 16:32:46 +08:00 2
@wizardforcel 这是一道送命题
|
8
SourceMan 2016-11-30 17:01:34 +08:00
|
9
Garantion OP @wizardforcel naive
|
11
wsph123 2016-12-01 00:28:44 +08:00 1
|