Giter Site home page Giter Site logo

flappybird's Introduction

FlappyBird

​ 本项目设计并实现了基于Python中的Pygame和Tkinter实现的FlappyBird游戏,游戏中利用Pygame模块来实现游戏核心部分,包括游戏中角色的移动、障碍物的移动、玩家与游戏之间的交互,以及获取金币增加得分等功能,而游戏的登入界面则采用Tkinter模块进行设计,记录玩家的用户名以及分数。最终实现的FlappyBird游戏主要以清新简单的画面风格呈现,可以通过用户按键对游戏角色“小鸟”进行控制飞行来躲避障碍物“管道”和吃取游戏中随机出现的“金币”来获得分数,当“小鸟”与“管道”碰撞时则游戏结束,用户的得分将会被刊登在排行榜上。

如何运行?(以windows10 x64为例)

  1. 安装python 3.x或者python 2.x。(推荐使用python 3.x及以上版本) 下载

  2. 安装pip 下载

  3. 安装pygame

    运行-cmd命令行,在命令行中输入

    pip install pygame

    如果由于网络原因安装失败或者速度过慢,可以改为输入:

    pip install pygame -i https://pypi.tuna.tsinghua.edu.cn/simple

    以上是采用清华大学的镜像源安装pygame。

    如果依然无法安装,可以尝试更换镜像源。

    阿里云:http://mirrors.aliyun.com/pypi/simple/

    **科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

    华中理工大学:http://pypi.hustunique.com/

    山东理工大学:http://pypi.sdutlinux.org/

    豆瓣:http://pypi.douban.com/simple/

    将-i后面的链接替换为相应镜像源的链接即可。

  4. 运行源文件中的teamwork_flappybird.py

    5.使用 键或者 Space 键 来控制小鸟飞行,按 Esc 键退出游戏

相关项目

  • FlapPyBird

    该项目参考以上项目开发,对原作者表达感谢与敬意。

维护者

Ari:[email protected]

flappybird's People

Contributors

ariszn avatar

Watchers

 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.