大工至善|大学至真分享 http://blog.sciencenet.cn/u/lcj2212916

博文

[转载]【源码】MATLAB版本的RoteAugen/flappybir​d游戏

已有 1730 次阅读 2019-1-9 16:33 |系统分类:科研笔记|文章来源:转载


Flappybird for MATLAB 

Author: Mingjing Zhang


Flappy bird在下架之前是应用程序商店中最受欢迎的游戏之一,不需要进一步介绍。

As one of the most popular games on app stores before being taken down, Flappy Bird does not need any further introduction. 


现在,这款基于MATLAB版本的游戏又回来了。

Now, it has come back alive, on MATLAB.


本代码是为了复制原始游戏的用户体验,所有物理维度都是相同的

This implementation is intentionally made to replicate the user experience of the original game, with all physical dimensions of objects being identical. 


重力和“跳跃脉冲”也经过了仔细的调整,以便尽可能地与原版本匹配。

The gravity and 'jumping pulse' are also carefully adjusted so that they match the original as closely as possible.


为了获得最佳的图像性能,建议使用MATLAB R2014a

MATLAB R2014a is recommended for this game to achieve the best graphical performance


使用方法:直接执行flappybird.m文件,或者以MATLAB app的形式安装"Flappy Bird.mlappinstal"。

Simply execute flappybird.m. Alternatively, you can install "Flappy Bird.mlappinstal" as a MATLAB app.


游戏控制方法:

空格键:跳跃

回车键:开始游戏

向上的方向键:重新开始游戏

ESC:退出游戏

Control: 

Spacebar/Return/Uparrow/W/ -> Jump/Start game/Restart game; 

ESC -> Quit Game.


该游戏应用程序有几个技术突破,是作者在游戏中第一次使用。

This game app features a few technique breakthroughs that I utilize in a game for the first time.


例如,飞鸟精灵被表示为一个SURFACE对象,而不是IMAGE对象,因此它可以很容易地以任何角度旋转。

For instance, the bird sprite is represented as a SURFACE object, as opposed to an IMAGE object, so that it can easily rotate at any angle.


源码下载地址:

http://page5.dfpan.com/fs/4l4c3j0242219239160/


更多精彩文章请关注微信号:qrcode_for_gh_60b944f6c215_258.jpg




https://blog.sciencenet.cn/blog-69686-1156169.html

上一篇:[转载]【Tom M. Mitchell课件】机器学习——高斯朴素贝叶斯
下一篇:[转载]【新书推荐】【2019.10】每天10分钟学习SQL:Sams教你如何自学(第5版)
收藏 IP: 114.102.130.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-11 17:36

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部