A micro-game "flappy bird".

Overview

1-o-flappy

A micro-game "flappy bird".

Gameplays

The game will be installed at /usr/bin . The name of it is "1-o-flappy". You can type "1-o-flappy" to start a game. When the game starts, the "bird" will go down automatically. Press enter to control the vertical moving of the "bird" and it will go up. When the "bird" falls down or touch any rolls, the game will be over and it will show "Game over!". Press Ctrl-C to pause in a game. You will never win this game.
The title bar of the game shows: date and time, the time that the game has run(Unit: second), vertical speed, horizontal speed, the range of the rolls, and the score.

Config

When a game starts, it will load a config file named ".1-o-flappy" that be at your home directory. If that file does not exist, the game will create it. If you want to see the default content of this file, please go to next page.
The file must contain these to run the game normally:

  • roll_skin -> a str
  • width -> an int(> 0)
  • p_skin -> a str
  • height -> an int(> 0)
  • blank_skin -> a str
  • speed_v -> an int or a float(> 0) or a str(eval(str) > 0)
  • v_border -> a str
  • speed_h -> an int or a float(> 0) or a str(eval(str) > 0)
  • h_border -> a str
  • high -> an int(> 0)
  • roll_range -> an int(> 0) or a str(type(eval(str)) == int and eval(str) > 0)
  • cooldown_tile -> an int(>= 0) or a str(type(eval(str)) == int and eval(str) >= 0)

roll_skin means the skin of the rolls(the default is "|").
p_skin means the skin of the "bird"(the default is "O").
blank_skin means the skin of the blank area(the default is " ").
v_border means the skin of the vertical border on the right(the default is "").
h_border means the skin of the horizontal border on the bottom(the default is "-").
You can color the skin(like "\033[42m").
The default content of the config file:

# The config file of Flappy.

# Skin config start
roll_skin = "|"
p_skin = "O"
blank_skin = " "
v_border = ""
h_border = "-"
# Skin config end

# Gameplay config start
width = 79
height = 18
speed_v = 20
speed_h = 4
roll_range = 3
cooldown_tile = 16
high = 15
# Gameplay config end

width means the visible width of the checkerboard(the default is 79).
height means the visible height of the checkerboard(the default is 18).
speed_v means the vertical(right to left) moving speed of the "bird"(the default is 20). It is also the speed of the refreshing.
speed_h means the horizontal moving speed of the "bird"(the default is 4).
roll_range means the passable range of the rolls(the default is 3).
cooldown_tile means the value of the least separation of two rolls(the default is 16).
high means the initial height of the "bird".
speed_v, speed_h, roll_range, cooldown_tile can be a str. If it is a str, the game will read it as eval(str). Be sure the eval value of it is a positive, and also be sure the type of the eval value of roll_range or cooldown_tile is an int. Else an error will occur.
Some usable values:

"(time.time()-start_time)" # the value of the time that game has run(Unit: s)
"(score)" # the score of the game
"(high)" # the height of the "bird"
"(time.time())" # the time that be generated by time.time
"(sum(checkerboard))" # the sum of the height of all the rolls

FAQ

Q: Why the name of this game is "1-o-flappy"?
A: The real name of this game is "1-O-Flappy". "1-o-flappy" is the name of the deb archive. "1" refers to "|", it is the default skin of the rolls. "O" is the default skin of the "bird". The "1-O-" helps the name of the game avoid name conflict.
Q: I pressed enter, but why does not the "bird" go up?
A: That seems your did not press enter frequently or the setting of the repeating of the keyboard inputting is too slow.
Q: Why the game looks like a contorted space after modifying the skins in the config file?
A: That is one of the core features of this game, so enjoy it 😄
Q: Why this game is installed at /usr/bin but not /usr/games ?
A: Treat it equally with other executable files.

You might also like...
Deep Q-learning for playing chrome dino game
Deep Q-learning for playing chrome dino game

[PYTORCH] Deep Q-learning for playing Chrome Dino

A simple pygame dino game which can also be trained and played by a NEAT KI

Dino Game AI Game The game itself was developed with the Pygame module pip install pygame You can also play it yourself by making the dino jump with t

Implementation of QuickDraw - an online game developed by Google, combined with AirGesture - a simple gesture recognition application
Implementation of QuickDraw - an online game developed by Google, combined with AirGesture - a simple gesture recognition application

QuickDraw - AirGesture Introduction Here is my python source code for QuickDraw - an online game developed by google, combined with AirGesture - a sim

A simple Rock-Paper-Scissors game using CV in python

ML18_Rock-Paper-Scissors-using-CV A simple Rock-Paper-Scissors game using CV in python For IITISOC-21 Rules and procedure to play the interactive game

ICS 4u HD project, start before-wards. A curtain shooting game using python.

Touhou-Star-Salvation HDCH ICS 4u HD project, start before-wards. A curtain shooting game using python and pygame. By Jason Li For arts and gameplay,

A Real-Time-Strategy game for Deep Learning research
A Real-Time-Strategy game for Deep Learning research

Description DeepRTS is a high-performance Real-TIme strategy game for Reinforcement Learning research. It is written in C++ for performance, but provi

A customisable game where you have to quickly click on black tiles in order of appearance while avoiding clicking on white squares.

W.I.P-Aim-Memory-Game A customisable game where you have to quickly click on black tiles in order of appearance while avoiding clicking on white squar

A Game-Theoretic Perspective on Risk-Sensitive Reinforcement Learning

Officile code repository for "A Game-Theoretic Perspective on Risk-Sensitive Reinforcement Learning"

Offline Multi-Agent Reinforcement Learning Implementations: Solving Overcooked Game with Data-Driven Method
Offline Multi-Agent Reinforcement Learning Implementations: Solving Overcooked Game with Data-Driven Method

Overcooked-AI We suppose to apply traditional offline reinforcement learning technique to multi-agent algorithm. In this repository, we implemented be

Releases(v0.1.3.59123)
Owner
Just make it.
null
Spontaneous Facial Micro Expression Recognition using 3D Spatio-Temporal Convolutional Neural Networks

Spontaneous Facial Micro Expression Recognition using 3D Spatio-Temporal Convolutional Neural Networks Abstract Facial expression recognition in video

Bogireddy Sai Prasanna Teja Reddy 103 Dec 29, 2022
This is an example of object detection on Micro bacterium tuberculosis using Mask-RCNN

Mask-RCNN on Mycobacterium tuberculosis This is an example of object detection on Mycobacterium Tuberculosis using Mask RCNN. Implement of Mask R-CNN

Jun-En Ding 1 Sep 16, 2021
This is an example of object detection on Micro bacterium tuberculosis using Mask-RCNN

Mask-RCNN on Mycobacterium tuberculosis This is an example of object detection on Mycobacterium Tuberculosis using Mask RCNN. Implement of Mask R-CNN

Jun-En Ding 1 Sep 16, 2021
Realtime micro-expression recognition using OpenCV and PyTorch

Micro-expression Recognition Realtime micro-expression recognition from scratch using OpenCV and PyTorch Try it out with a webcam or video using the e

Irfan 35 Dec 5, 2022
Game Agent Framework. Helping you create AIs / Bots that learn to play any game you own!

Serpent.AI - Game Agent Framework (Python) Update: Revival (May 2020) Development work has resumed on the framework with the aim of bringing it into 2

Serpent.AI 6.4k Jan 5, 2023
Gesture-controlled Video Game. Just swing your finger and play the game without touching your PC

Gesture Controlled Video Game Detailed Blog : https://www.analyticsvidhya.com/blog/2021/06/gesture-controlled-video-game/ Introduction This project is

Devbrat Anuragi 35 Jan 6, 2023
Hand-distance-measurement-game - Hand Distance Measurement Game

Hand Distance Measurement Game This is program is made to calculate the distance

Priyansh 2 Jan 12, 2022
Dcf-game-infrastructure-public - Contains all the components necessary to run a DC finals (attack-defense CTF) game from OOO

dcf-game-infrastructure All the components necessary to run a game of the OOO DC

Order of the Overflow 46 Sep 13, 2022
Torchlight2 lan game server tool - A message forwarding tool for Torchlight 2 lan game

Torchlight 2 Lan Game Server Tool A message forwarding tool for Torchlight 2 lan

Huaijun Jiang 3 Nov 1, 2022
Make your own game in a font!

Project structure. Included is a suite of tools to create font games. Tutorial: For a quick tutorial about how to make your own game go here For devel

Michael Mulet 125 Dec 4, 2022