archery document
TRANSCRIPT
ARCHERY A mini project report submitted
in partial fulfillment of the requirements for the award of the degree of
BACHELOR OF TECHNOLOGYIN
ELECTRONICS AND COMPUTER ENGINEERING (2009-10)
SubmittedBy
J.Vijaya Lakshmi T. Naga Anuja k. Raja Sekhar G. Venkateswara ReddyY8EM242 Y8EM314 Y8EM262 Y8EM240 2/4 B.Tech 2/4 B.Tech 2/4 B.Tech 2/4 B.Tech
Under the esteemed guidance of
Ms K.Madhuri (M.Tech) Lecturer
Smt. Y.Madhavi Latha M.Tech Lecturer
KONERU LAKSHMAIAH COLLEGE OF ENGINEERING(AUTONOMOUS)
Green Fields, Vaddeswaram - 522 502, Guntur District, A.P.Approved by A.I.C.T.E. Affiliated to Acharya Nagarjuna University
Accredited by N.B.A. Accredited by N.A.A.C ISO 9001-2000 Certified
KONERU LAKSHMAIAH COLLEGE OF ENGINEERING(AUTONOMOUS)
DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING
CERTIFICATE
This is to certify that the mini project entitled
“ARCHERY”, being submitted by J. Vijaya
Lakshmi(Y8EM242), T. Naga Anuja(Y8EM314), K. Raja
Sekhar(Y8EM262), G. Venkateswara Reddy (Y8EM240) in
partial fulfillment for the award of degree of Bachelor of
Technology in Electronics and Computer Engineering of
Acharya Nagarjuna University, is a record of confide work
carried out by them under our guidance and supervision
during the academic year 2009-2010 and it has been
found worthy of acceptance according to the requirements
of the university.
Ms K.Madhuri, (M.Tech) Dr.S.Balaji,Lecturer. HOD(ECM)Smt Y.Madhavi Latha M.Tech Lecturer
ACKNOWLEDGEMENT
We take this opportunity to remember and acknowledge the co-operation, good will
and support both moral and technical extended by several individuals out of which
this project has evolved. We always cherish our association with them.
We are greatly elated and thankful to our Head of the Department Dr. S. BALAJI
and to our principle Dr.K.RAJASEKHAR RAO for his enthusiastic assistance and
inspiring us all the way and for arranging all the facilities and resources needed for
our project.
It is with immense pleasure that we would like to express our indebted gratitude to
our guide Ms.K.MADHURI and Smt Y.MADHAVI LATHA who has also guided
us a lot and encouraged us in every step of the project work. Her invaluable moral
support and guidance throughout the project helped us to a greater extent.
We are very grateful to God for having us with his wisdom and knowledge and
guidance throughout this work. We are grateful to our family members for their moral
and financial support.
Finally, our verbal abilities limit the expression of heartfelt feelings towards our non-
teaching staff and friends who had directly or indirectly helped and supported us in
completing our project in time.
PROJECT TEAM
J. Vijaya Lakshmi T. Naga Anuja K. Raja Sekhar
G.VenkateswaraReddy
1.ABSTRACT
1
2.PROBLEM STATEMENT 1.1INTRODUCTION 1.2PROBLEM DESCRIPTION 1.3MODULE WISE DESCRIPTION
2
3.LITERATURE
5
4.FLOWCHARTS
10
5.ALGORITHM 11
6.SCREEN SHOTS/OUTPUTS
12
7. CONCLUSION
16
8.FUTURE SCOPE
17
9.REFERENCES
18
ABSTRACT
C is a powerful general purpose and most popular computer programming
language. C is popularly known as the programmers language, since it was created,
influenced and field tested by real working programmers.
In 1970 a system engineer Mr. Dennis Ritche, invented and first implemented
this programming language C. Besides its features like portability, fast execution it
provides a feature called ‘C graphics‘. Using C graphics we wrote the game program.
C is a high level language which supports graphics in it. Archery game tests our
concentration power.
SYSTEM REQUIREMENTS:
500 MHZ processor ,128Mb RAM, Super VGA(800×600) video resolution
monitor, A video display adapter with hardware 3-D graphics acceleration and 16MB
of video memory. Matrox G400, G450, SiS300, Trident Blade XP 128,3Dlabs
Permedia 3.
1
PROBLEM STATEMENT
1. INTRODUCTION
This is entirely written in c language. At first we have an arrow and bow. The
series of circles will roll from top to bottom. With the help of the mouse pointer we
have to hit the target. The arrow hitting exactly at the centre of the circle is the target.
We get the score on the basis of hitting position. You will have five chances to hit the
target.
Based on your performance the score of all the five times will be added up.
The highest score will be 60 for one hit. Finally the score will be displayed at the end
of the game. You will have two options either to continue or to quit the game.
1.2PROBLEM DESCRIPTION
Start the game, using the mouse shoot the series of circles rolling down the
screen.
If you the smallest circle the maximum score of 60 will be awarded.
Likely there will be six circles in the target.The last circle will have the least score.
1.3MODULE WISE DESCRIPTION:
1. WELCOME SCREEN
2. LOGIC MODULE
3. GAME SCREEN
4. ENDING SCREEN 2
1.WELCOME SCREEN:
In this module the functions we used are
front()
In this function we use graphics commands like ellipse, line, setcolor for designing
the first screen.
Sta()
The next screen will have the circles which changes the color randomly.
Star()
Then the stars will appear in the form of arc. Two arcs of stars of yellow and green
color.
The name of the game will wrote in the middle of the lower arc of stars.
2. LOGIC MODULE:
We use the following function
Score():
In this function the score for each hit will be decided.
Hitting the arrow in the smallest circle will highest score and vice versa.
3. GAME SCREEN
We use the following functions for designing this screen
Tar ():
This will form the series of circles on the right side of the screen.
Getmousepionter()
This will get the mouse pointer on the screen. 3
Arrow()
This will create the arrow .The arrow with the yellow colour used the graphical
command line only.
Equip()
This is to design the bow for the game.It uses the graphical commands like arc, circle,
line.
4.ENDING SCREEN:
Here we use the following functions
Final window():
In this screen the score of the game will be displayed with two options either to quit
or continue.
Finally the names will be displayed in the middle of the screen, wich is bordered with
beautiful flowers.
4
LITERATURE
1.INITGRAPH:
Prototype in <GRAPHICS.H>
Purpose: Intializies the graphics system.
Syntax: Initgraph (int far *graph driver, int far *graph mode, char far *path drive);
2.RECTANGLE :
Prototype in <GRAPHICS.H>
Purpose: Draws a rectangle
Syntax: Rectangle(intleft,inttop,intright,int bottom);
3.SETBKCOLOR:
Prototype in <GRAPHICS.H>
Purpose: Sets the back ground colour
Syntax: setbkcolor(clour)
4.ELLIPSE:
Prototype in <GRAPHICS.H>
Purpose: Draws the ellipse
Syntax: ellipse (int x, int y, int stangle, int endangle, int xrasius,int yradius)
5
5.SETTEXTSTYLE :
Prototype in <GRAPHICS.H>
Purpose: Sets the current text characteristics.
Syntax: Settextstyle(intfont,intdirection,intcharsize);
6.SETFILLSTYLE:
Prototype in <GRAPHICS.H>
Purpose:Sets fill pattern and color.
Syntax: Setfillstyle(intpattern,int color);
7.SETCOLOR:
Prototype in <GRAPHICS.H>
Purpose: Set color sets the current drawing color.
Syntax: Setcolor(int color);
8.CLOSEGRAPH :
Prototype in <GRAPHICS.H>
Purpose: Shuts down the graphics system.
Syntax: Closegraph(void); 6
9.DELAY:
Prototype in <DOS. H>
Purpose: Suspends execution for some time interval(milliseconds)
Syntax: Delay(unsigned milliseconds);
10.SLEEP:
Prototype in <DOS.H>
Purpose: Suspends execution for interval
Syntax: Sleep(unsigned seconds);
11.NOSOUND:
Prototype in <DOS.H>
Purpose: Sound turns on the PC's speaker at a given frequency.
nosound turns the speaker off after it has been turned on by a call to sound.Frequency
specifies the frequency of the sound in hertz (cycles per second)
Synatx:■ void sound(unsigned frequency);
12.OUTYEXTXY:
Prototype in <GRAPHICS.H>
Purpose:Outtextxy displays a string at the specified location(graphics mode)
Syntax: Outtextxy(intx,inty,char far *textstring);
7
13.LINE:
Prototype in <GRAPHICS.H>
Purpose: Draws a line.
Syntax: void far line (int left, int top, int right, int bottom);
14.FLAG:
Prototype in <GRAPHICS.H>
Purpose: Resets the formatting flags as the default value
Syntax; long flag();
15.ARC():
Prototype in <GRPAHICS.H>
Purpose : Draws an arc.
Syntax: void arc (int xcentre, int ycenter, int stangle, int endangle,int radius);
1 6.CIRCLE :
Prototype in <GRAPHICS.H>
Purpose: Circle draws a circle.
Syntax: Circle(intx,inty,int radius)
17.RANDOM:
Prototype in <STDLIB.H>
Purpose: Macro that returns an integer.
Syntax: Random(num); 8
18.GETACCORDS()
Prototype in <GRAPHICS.H>
Purpose: get coordinates of the last call to arc.
Syntax: void getaccords(struct accordstype *arccords);
19.FLOODFILL();
Prototype in <GRAPHICS.H>
Purpose:It fills an enclosed area.
Syntax: void floodfill(int x,int y,int border);
20.SOUND:
Prototype in <DOS.H>
Purpose: Sound turns on the PC's speaker at a given frequency.
nosound turns the speaker off after it has been turned on by a call to sound.Frequency
specifies the frequency of the sound in hertz (cycles per second)
Synatx:
■ void sound(unsigned frequency);
9
FLOW CHART
TITLE SCREEN
CHOICE
START START
QUIT QUITCONTINUECONTINUE
SCORE SCREEN
GAME SCREEN
ARROW3 MAX 180
ARROW2 MAX 120
ARROW4 MAX 240
ARROW1 MAX 60
ARROW5 MAX 360
LEAST SCORE HIGHEST SCORE
10
ALGORITHM
STEP1: Welcome screen will be displayed.
STEP2:The circles with random colours will appear with sound.
STEP3:Then the stars in the form of arc will appear including the music.
STEP4:The name of the game will be displayed.
STEP5:Game screen with bow and arrow will be there to hit the target.
STEP6:When the arrow is hitted the score will be displayed.
STEP7:Like that five arrows will be there to hit the target.
STEP8:The final score will be displayed.
STEP9:Option ‘continue’ is there to continue the game.
STEP10: Another option to quit the game is also available.
STEP11:Final window with flowers will be displayed.
STEP12:In the middle of the screen the names of our team will be displayed.
EXIT
11
SHOT SCREENS
WLCOME SCREEN
LOADING SCREEN 12
WLECOME SCREEN
13
GAME SCREEN
ENDING SCREEN
14
15
CONCLUSION
‘C’ is a simple, elegant programming language that is the choice of
a increasing number of programmers. ’C’ being a popular language , all the
instructions are given using simple English like statements. This uses a
compiler to convert these statements to binary. ’C’ programs are also
portable and hence can run on any system.
`Besides all these features ‘C’ also provides us with graphics
commands which can be used to develop simple games. So taking help of
these graphics commands we designed our game.
The ‘ARCHERY’ game is basically a memory game.’C’ provides
modularity by dividing the program into number of function blocks. We
have used 32 user defined functions for developing our game. Most of these
user defined functions use graphic commands. The graphics commands that
we used most frequently are settextstyle, setfillstyle, setcolor, rectangle,
circle.
The advantage of this game over the other games is besides
providing entertainment to the player it even helps them to improve to some
extent their concentration.
16
FUTURE SCOPE
As beginners in game designing we have developed this game with
only one level. So increase the speed of the series of circles rolling. We can
extend this game into any number of levels, which is difficult to implement
with ‘C’ yet possible. This can be done with the help of 3D graphics.
Now the game is implemented using mouse. We cannot implement
the game using keyboard. We have tried to make the player sense the
difficulty by including negative score in so we can make the game tougher
and build up tension in the player by setting a timer.
17
BIBILIOGRAPHY8.1 TEXT BOOKS
PROGRAMMING IN C - BYRON S GOTTIFRIED
LET US C - YASHWANTH KANETKAR
PROGRAMMING IN ANSI C - BALAGURUSWAMY
REFERENCES8.2 WEBSITES
www.google.com
www.Programmersheaven.com
www.programmersworld.com
www.wikipedia.com
www.cprogramming.com
18