1. 程式人生 > >【原始碼】MATLAB版本的RoteAugen/flappybird遊戲

【原始碼】MATLAB版本的RoteAugen/flappybird遊戲

在這裡插入圖片描述
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/

更多精彩文章請關注微訊號:在這裡插入圖片描述