Mini Project Game
Mini Project Game
PROJECT REPORT
Submitted by
PANKAJ PAL
3rd YR CSE(B.Tech)/2019-2022
Under the guidance of
Poonam Yadav
in partial fulfilment of the requirements
for the award of the Degree of
BACHELOR OF TECHNICAL
Of
CERTIFICATE
This is to certify that the report entitled “FLAPPY BIRD GAME USING PYTHON” by
Name of Guide
Through this acknowledgement I express my sincere gratitude towards all those people who helped
me in this project, which has been a learning experience.
This space wouldn’t be enough to extend my warn gratitude towards my project guide Poonam Yadav
for his effort in coordinating with my work and guiding in the right direction.
I escalate a heartfelt regard to our Institute Director ……. for giving me the
essential hand in concluding this work.
It would be injustice to proceed without acknowledgement those vital support I received from my
beloved classmate and friends, without whom I would have been half done.
I also use this space to offer my sincere love to my parent and all other who had been there, helping
me walk through this work.
PANKAJ PAL
DECLARATION
I undersigned, hereby declare that the project FLAPPY BIRD GAME submitted in partial
Of Poonam Yadav ,Department of CSE(Computer Science Engineer). This report has not
previously formed the basis for
15/01/2021 Signature
Index
1.1 Introduction
1.2 Overview
1.3
SCOPE OF FLAPPY BIRD
1.4
TECHNOLOGY USED
2 History of Flappy Bird
2.1 Software Requirement
2.2
GAME PLAY
2.3
DEVELOPMENT
3 Python
3.1 Overview
4.1 Background
4.2 Pipe
4.3 Base
4.4 Bird
4.5 Message
5 FURTHER IMPROVEMENT
6 BIBLIOGRAPHY
Website
6.1
INTRODUCTION
1.1 Overview
Flappy Bird is a Pc Game. The game was released in may 2013 but received a sudden rise in popularity in early 2014.Flappy Bird
received poor reviews from some critics, who criticized its level of difficult, alleged plagiarism in graphics and game
mechanics, while other reviewers found it addictive. He claims that he felt guilt over what he considered to be its additive
nature and overuse. Bay Tek Games also released a licensed coin operated Flappy Bird are Arcade Game.
Flappy Bird game is developed by Vietnamese video game artist and programmer Dong Nguyen under his game development
company dotGears.
Nguyen created the game over the period of several days, using a bird protagonist that he had designed for a
cancelled game in 2012.
Flappy Bird is a arcade-style game which the player controls the bird faby, Which moves persistently to the right. The player is
tasked with navigating Faby through pairs of pipes that have equally sized gaps placed at random height. Fabs automatically
descends and only ascends when the player tabs the space button on the keyboard. Each successful pass through a pair of
pipes awards the player one point. Colliding with a pipe or the ground ends the gameplay. During the game over screen, the
player is awarded a bronze medal if they reaches ten or more point, a silver medal from twenty points. A gold medal from thirty
points, and a platinum medal from forty point .
2.3 DEVELOPMENT
He discovered video games by playing super Mario bros as a child, and began coding his own at age 16 act 19, while studying
programming at a local university, he won an internship. At the one of the video game companies in Vietnam. While using the
PC, he found that its most popular games such as Angry Bird were too complicated, and wanted to make a simpler game for
people who are always on the move.
The gameplay was inspired by the act of bouncing a ping pong ball against a paddle for as possible. Initially the game
was significantly easier than it became in the final version however said he found this version to be boring and subsequently
tightened up the difficult.
It’s a games as “heavily influenced by retro pixelated games in its golden age. Everything is pure, extremely hard and
incredibly fun to play”.
3 PYTHON
3.1 Overview
Python is a high-level, easy to learn, interpreter, interactive and object-oriented scripting language. Python is a designed to be
highly readable. It uses English keywords frequently where as other language use punctuation, and it has fewer syntactical
construction than other languages.
If else Statement It also contain a Boolean Expression. The if statement is followed by an optional else statement & if the
expression result in FALSE, then else statement gets executed. It is also called alternative execution in which
there are two possibilities of the condition determine in which any one of them will get executed.
Nested We can implement if statement and or if-else statement inside another if or if –else statement. Here more
than one if condition are applied & there can be more than one if within elif.
It is the prediction of conditions that occur while executing a program to specify action. Multiple expressions get
evaluated with an outcome of either TRUE or FALSE. These are logical decisions, and Python also provides decision-making
statement that to make decision within a program for an application based on the user requirement.
3.3.1 If Statement
Flow Chart
START
EXPRESSI
ON
TRUE
STATEMENT FALSE
STOP
3.2 LOOPS
CONDITION CODE
IF CONDITION IS TRUE
CONDITION
If condition is False
Loops Description
For Loops Executes a sequence of statement multiple times and abbreviates the code that manages the loop
variable
While Loops Repeats a statement or group of statement while a given condition is TRUE. It test the condition
before executing the loop body
Nested Loops You can one or more loop inside any another while, for or do.. while loop.
3.2.1 LOOP CONTRTOL STATEMENT
Loop control statement change execution from its normal sequence. When execution leaves a scope, all automatic
objects that were created in that scope are destroyed.
Continue Statement Causes the loop to skip the remainder of its body and immediately retest its
condition prior to reiterating.
Pass Statement The pass statement in python is used when a statement is required syntactically
but you do not want any command or code to execute.
Number is data type of the python. When they are store in numeric value in python. They are immutable data types,
means that changing the value of a number data type result in a newly allocated object.
There are different numerical type:-
Int(Signed Integer)- They are often called just integer or ints, are positive or negative whole
number with no decimal point.
Long(Long Integer)- Also called longs, they are integer of unlimited size, written like integers and
followed by an uppercase or lowercase L.
Float(Floating Point Real Value)- Also called floats, they represent real number and are
written with a decimal point dividing the integers and fractional parts. Floats may also be in scientific notation,
with E or e indicating the power.
Complex(Complex Number)- Are of the form a + bJ, where a and b are floats and J (or j)
represents the square root of -1 (which is an imaginary number). The real part of the number is a, and the
imaginary part is b. Complex number are not used much in python programming.
String are amongst the most popular types in python. We can create
them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings
is as simple as assigning a value to a variable.
3.3.2.2Updating Strings
You can "update" an existing string by (re)assigning a variable to another string. The new value can be related to its
previous value or to a completely different string altogether.
+ Concatenation - Adds values on either side of the operator a + b will give HelloPython
* Repetition - Creates new strings, concatenating multiple copies of the same a*2 will give -HelloHello
string
[] Slice - Gives the character from the given index a[1] will give e
[:] Range Slice - Gives the characters from the given range a[1:4] will give ell
in Membership - Returns true if a character exists in the given string H in a will give 1
not in Membership - Returns true if a character does not exist in the given string M not in a will give 1
r/R Raw String - Suppresses actual meaning of Escape characters. The syntax for print r'\n' prints \n and print
raw strings is exactly the same as for normal strings with the exception of the R'\n'prints \n
raw string operator, the letter "r," which precedes the quotation marks. The "r"
can be lowercase (r) or uppercase (R) and must be placed immediately
preceding the first quote mark.
1 capitalize()
2 center(width, fillchar)
Returns a space-padded string with the original string centered to a total of width columns.
4 decode(encoding='UTF-8',errors='strict')
Decodes the string using the codec registered for encoding. encoding defaults to the default string
encoding.
5 encode(encoding='UTF-8',errors='strict')
Returns encoded string version of string; on error, default is to raise a ValueError unless errors is given
with 'ignore' or 'replace'.
7 expandtabs(tabsize=8)
Expands tabs in string to multiple spaces; defaults to 8 spaces per tab if tabsize not provided.
10 isalnum()
Returns true if string has at least 1 character and all characters are alphanumeric and false otherwise.
11 isalpha()
Returns true if string has at least 1 character and all characters are alphabetic and false otherwise.
12 isdigit()
Returns true if string contains only digits and false otherwise.
13 islower()
Returns true if string has at least 1 cased character and all cased characters are in lowercase and false
otherwise.
14 isnumeric()
Returns true if a unicode string contains only numeric characters and false otherwise.
15 isspace()
Returns true if string contains only whitespace characters and false otherwise.
16 istitle()
Returns true if string is properly "titlecased" and false otherwise.
17 isupper()
Returns true if string has at least one cased character and all cased characters are in uppercase and false
otherwise.
18 join(seq)
Merges (concatenates) the string representations of elements in sequence seq into a string, with separator
string.
19 len(string)
Returns the length of the string
20 ljust(width[, fillchar])
Returns a space-padded string with the original string left-justified to a total of width columns.
21 lower()
Converts all uppercase letters in string to lowercase.
22 lstrip()
Removes all leading whitespace in string.
23 maketrans()
Returns a translation table to be used in translate function.
24 max(str)
Returns the max alphabetical character from the string str.
25 min(str)
Returns the min alphabetical character from the string str.
29 rjust(width,[, fillchar])
Returns a space-padded string with the original string right-justified to a total of width columns.
30 rstrip()
Removes all trailing whitespace of string.
31 split(str="", num=string.count(str))
Splits string according to delimiter str (space if not provided) and returns list of substrings; split into at
most num substrings if given.
32 splitlines( num=string.count('\n'))
Splits string at all (or num) NEWLINEs and returns a list of each line with NEWLINEs removed.
33 startswith(str, beg=0,end=len(string))
Determines if string or a substring of string (if starting index beg and ending index end are given) starts
with substring str; returns true if so and false otherwise.
34 strip([chars])
Performs both lstrip() and rstrip() on string.
35 swapcase()
Inverts case for all letters in string.
36 title()
Returns "titlecased" version of string, that is, all words begin with uppercase and the rest are lowercase.
37 translate(table, deletechars="")
Translates string according to translation table str(256 chars), removing those in the del string.
38 upper()
Converts lowercase letters in string to uppercase.
39 zfill (width)
Returns original string leftpadded with zeros to a total of width characters; intended for numbers, zfill()
retains any sign given (less one zero).
40 isdecimal()
Returns true if a unicode string contains only decimal characters and false otherwise.
The list is a most versatile datatype available in Python which can be written as a list of comma-separated values
(items) between square brackets. Important thing about a list is that items in a list need not be of the same type .
1 cmp(list1, list2)
2 len(list)
Gives the total length of the list.
3 max(list)
Returns item from the list with max value.
4 min(list)
Returns item from the list with min value.
5 list(seq)
Converts a tuple into list.
1 list.append(obj)
Appends object obj to list
2 list.count(obj)
Returns count of how many times obj occurs in list
3 list.extend(seq)
Appends the contents of seq to list
4 list.index(obj)
Returns the lowest index in list that obj appears
5 list.insert(index, obj)
Inserts object obj into list at offset index
6 list.pop(obj=list[-1])
Removes and returns last object or obj from list
7 list.remove(obj)
Removes object obj from list
8 list.reverse()
Reverses objects of list in place
9 list.sort([func])
Sorts objects of list, use compare func if given
3.3.4 TUPLE
A tuple is a collection of objects which ordered and immutable. Tuples are sequences, just like lists. The differences
between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists
use square brackets.
3.3.4.1 Basic Tuples Operations
Tuples respond to the + and * operators much like strings; they mean concatenation and repetition here too, except
that the result is a new tuple, not a string.
1 cmp(tuple1, tuple2)
2 len(tuple)
Gives the total length of the tuple.
3 max(tuple)
Returns item from the tuple with max value.
4 min(tuple)
Returns item from the tuple with min value.
5 tuple(seq)
Converts a list into tuple.
3.3.5 Dictionary
Each key is separated from its value by a colon (:), the items are separated by commas, and the whole thing is enclosed
in curly braces. An empty dictionary without any items is written with just two curly braces, like this: {}.
Keys are unique within a dictionary while values may not be. The values of a dictionary can be of any type, but the
keys must be of an immutable data type such as strings, numbers, or tuples.
cmp(dict1, dict2)
2 len(dict)
Gives the total length of the dictionary. This would be equal to the number of items in the dictionary.
3 str(dict)
Produces a printable string representation of a dictionary
4 type(variable)
Returns the type of the passed variable. If passed variable is dictionary, then it would return a dictionary
type.
4 SNAPSHOT
4.1 Background
4.2 Pipe
4.3 Base
4.4 Bird
4.5 Message
5 FURTHER IMPROVEMENT
This game can be made dynamic by using level, game over etc.
The game is control a key press description as show in this game.
This game can be further enhanced by adding more future.
6 BIBLIOGRAPHY
6.1 Website
http://freshlogoz.blogspot.com
http://tutorialspoint.com
http://google.com