Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tiagopog/flappy_bird
Flappy Bird written in Ruby with Ruby 2D.
https://github.com/tiagopog/flappy_bird
game game-development ruby ruby2d
Last synced: about 1 month ago
JSON representation
Flappy Bird written in Ruby with Ruby 2D.
- Host: GitHub
- URL: https://github.com/tiagopog/flappy_bird
- Owner: tiagopog
- Created: 2019-09-29T03:48:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-26T20:25:21.000Z (almost 4 years ago)
- Last Synced: 2023-08-06T18:52:30.702Z (over 1 year ago)
- Topics: game, game-development, ruby, ruby2d
- Language: Ruby
- Homepage:
- Size: 72.3 KB
- Stars: 37
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
Flappy Bird game written in Ruby with the awesome [ruby2d](http://www.ruby2d.com/) framework.
![ruby2d_flappy_bird_3](https://user-images.githubusercontent.com/760933/65826039-c0b92480-e254-11e9-91a9-043bf80b3d07.gif)
> Note: the low frame rate here is due to the GIF recording not the game itself.
## Goals
- Learn more about game physics and collision detection;
- Separate game logic from graphics.## Todo
- [ ] Improve opening scene;
- [ ] Improve game over scene (add medals and best score);
- [ ] Improve bird's flight and fall animations.PRs are welcome :-)
# Install
Make sure you have installed:
* [simple2d](https://github.com/simple2d/simple2d):
```
brew tap simple2d/tap
brew install simple2d
```* [ruby2d](https://github.com/ruby2d/ruby2d):
```
gem install ruby2d
```Then clone the source code to your local:
```
git clone https://github.com/tiagopog/flappy_bird.git
```## Ubuntu / Debian
```bash
$ sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libgles2-mesa-dev
$ url='https://raw.githubusercontent.com/simple2d/simple2d/master/bin/simple2d.sh'; which curl > /dev/null && cmd='curl -fsSL' || cmd='wget -qO -'; bash <($cmd $url) install
```# Play
```
cd flappy_bird
ruby main.rb
```Bird control:
* Jump: space bar
* Restart (game over): space bar