SlideShare a Scribd company logo
1 of 17
Bow & Arrow
Graphics game in C++
Presentation
Computer graphics is a sub field of computer science which studies the manipulation of
visual and geometric information using computational techniques. It focuses on the mathematical and
computational foundations of image generation and processing rather than purely aesthetic issues.
Fundamental graphics program like drawing of various geometrical shapes(rectangle, circle ellipse etc),
use of mathematical function in drawing curves, coloring an object with different colors and patterns
and simple animation programs are the utilities of graphics programming. Using C++ graphics we wrote
the game program. C++ is a high level language which supports graphics in it. Bow & Arrow game tests
players concentration power.
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. We have to hit the target. The arrow hitting at any point of the circle is the target. We get the score on
the basis of hitting numbers. Players will have twenty chances to hit the target in each level.There are three
levels of different difficulties
Based on players performance the score of all the twenty times will be added up. The score reaching
100 will lead to another level. Finally the score will be displayed at the end of the game. Player will have two options
either to continue or to quit the game.
Modules
1.Welcome Screen
2.Game Screen
3.Ending Screen
WELCOME SCREEN:
In this module the functions we used are::
hand()----In this function we use graphics commands like ellipse, line, setcolor for designing the hand gesture to
indicate the points.
image(),conveximage(),image1()----These functions draws the decorative front screen
getkey()----This function gets the movement of hand from the user keyboard.
rules()---The next screen will have the rules for the game.
updatehighscore()----This funtion will update the highest score of the game.
level()------This function describes each levels to the players.
exit()-----This function exits the game
GAME SCREEN:
We use the following functions for designing this screen
arrow(int pos)---This will create the arrow .The arrow with the yellow colour used the graphical command line only.
shoot()-----This will get the spacebar pointer to shoot the arrows in each level.
ball(),balllevel2()----These functions forms balls in each levels.
eyelevel()----This function contrlos the bow to move up/down/right/left.
displaytopscore()-----This function displays the sore after the end of the game.
gethighscores()-----It gets the highest score and send it to front sreen function to update the score.
game()-----This function calls the other functions in gamescreen mode to complete the whole game in a if else conditions
where the players chooses how to play.
Ending Screen:
Here we use the following functions
main():---
This function combines all other function to actually run the program.At the end of game,
the score of the game will be displayed with two options either to quit or continue.
Finally the names will be asked to display in the middle of the screen.
LITERATURE
Prototypes in <GRAPHICS.H>
1.INITGRAPH: Intializes the graphics system.
Syntax: Initgraph (int far *graph driver, int far *graph mode, char far *path drive);
2.RECTANGLE : Draws a rectangle
Syntax: Rectangle(intleft,inttop,intright,int bottom);
3.SETBACKCOLOR:Sets the back ground colour
Syntax: setbkcolor(clour)
4.ELLIPSE: Draws the ellipse
Syntax: ellipse (int x, int y, int stangle, int endangle, int xrasius,int yradius)
5.SETTEXTSTYLE: Sets the current text characteristics.
Syntax: Settextstyle(intfont,intdirection,intcharsize);
6.SETFILLSTYLE: Sets fill pattern and color.
Syntax: Setfillstyle(intpattern,int color);
7.SETCOLOR: Set color sets the current drawing color.
Syntax: Setcolor(int color);
8.CLOSEGRAPH: Shuts down the graphics system.
Syntax: Closegraph(void);
9.DELAY: Suspends execution for some time interval(milliseconds)
Syntax: Delay(unsigned milliseconds);
10.SLEEP: Suspends execution for interval
Syntax: Sleep(unsigned seconds);
11.nosound: 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:Outtextxy displays a string at the specified location(graphics mode)
Syntax: Outtextxy(intx,inty,char far *textstring);
13.line:Purpose: Draws a line.
Syntax: void far line (int left, int top, int right, int bottom);
14.flag:Purpose: Resets the formatting flags as the default value
Syntax; long flag();
15.ARC(): Purpose : Draws an arc.
Syntax: void arc (int xcentre, int ycenter, int stangle, int endangle,int radius);
16.CIRCLE: Circle draws a circle.
Syntax: Circle(intx,inty,int radius)
17.RANDOM: Macro that returns an integer.
Syntax: Random(num);
18.getaccords() get coordinates of the last call to arc.
Syntax: void getaccords(struct accordstype *arccords);
19.FLOODFILL(); It fills an enclosed area.
Syntax: void floodfill(int x,int y,int border);
20.sound: 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);
Algorithm
STEP1: Welcome screen will be displayed.
STEP2: Different choices would be displayed
STEP3: Game is chosen player would be redirected to game screen
.
STEP4: Game screen with bow and arrow will be there to hit the target.
STEP5: When the arrow is hitted the score will be displayed.
STEP6: Like that 20 arrows will be there to hit the target.
STEP7: If scores 100 then proceeds to level 2 and repeat the procedure.
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 will ask for player name to it on leaderboard. And
then player would be redirected to the main screen.
CONCLUSION
The ‘Bow & Arrow’ game is basically a memory game.’C++’ provides modularity by dividing the
program into number of function blocks. We have used several 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.
REFERENCES
WEBSITES
v www.google.com
v www.Programmersheaven.com
v www.programmersworld.com
v www.wikipedia.com
v www.cprogramming.com
v www.tutorialspoint.com/computer_graphics/
Bow&Arrow.cpp
Bow&amp;arrow game

More Related Content

Viewers also liked

Foundations of control
Foundations of controlFoundations of control
Foundations of controlShaibal Ahmed
 
Scientific calcultor-Java
Scientific calcultor-JavaScientific calcultor-Java
Scientific calcultor-JavaShaibal Ahmed
 
Introduction and objectives of the project
Introduction and objectives of the projectIntroduction and objectives of the project
Introduction and objectives of the projectrihan696
 

Viewers also liked (6)

Cyber security
Cyber securityCyber security
Cyber security
 
Cyber security
Cyber securityCyber security
Cyber security
 
Web develop co.
Web develop co.Web develop co.
Web develop co.
 
Foundations of control
Foundations of controlFoundations of control
Foundations of control
 
Scientific calcultor-Java
Scientific calcultor-JavaScientific calcultor-Java
Scientific calcultor-Java
 
Introduction and objectives of the project
Introduction and objectives of the projectIntroduction and objectives of the project
Introduction and objectives of the project
 

Similar to Bow&amp;arrow game

The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30Mahmoud Samir Fayed
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196Mahmoud Samir Fayed
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorNick Pruehs
 
Computer graphics
Computer graphicsComputer graphics
Computer graphicssnelkoli
 
computer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcodecomputer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcodeBhavya Chawla
 
C Graphics Functions
C Graphics FunctionsC Graphics Functions
C Graphics FunctionsSHAKOOR AB
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overviewMICTT Palma
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to CodingFabio506452
 
The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210Mahmoud Samir Fayed
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c languageAshutosh Kumar
 

Similar to Bow&amp;arrow game (20)

The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84
 
The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88
 
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184
 
The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184
 
The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196
 
WP7 HUB_XNA
WP7 HUB_XNAWP7 HUB_XNA
WP7 HUB_XNA
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal Editor
 
Types of Gaming Program
Types of Gaming ProgramTypes of Gaming Program
Types of Gaming Program
 
Ddn
DdnDdn
Ddn
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
computer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcodecomputer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcode
 
Street runner final
Street runner finalStreet runner final
Street runner final
 
C Graphics Functions
C Graphics FunctionsC Graphics Functions
C Graphics Functions
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overview
 
python.pptx
python.pptxpython.pptx
python.pptx
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c language
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 

Bow&amp;arrow game

  • 1. Bow & Arrow Graphics game in C++ Presentation
  • 2.
  • 3. Computer graphics is a sub field of computer science which studies the manipulation of visual and geometric information using computational techniques. It focuses on the mathematical and computational foundations of image generation and processing rather than purely aesthetic issues. Fundamental graphics program like drawing of various geometrical shapes(rectangle, circle ellipse etc), use of mathematical function in drawing curves, coloring an object with different colors and patterns and simple animation programs are the utilities of graphics programming. Using C++ graphics we wrote the game program. C++ is a high level language which supports graphics in it. Bow & Arrow game tests players concentration power.
  • 4. 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. We have to hit the target. The arrow hitting at any point of the circle is the target. We get the score on the basis of hitting numbers. Players will have twenty chances to hit the target in each level.There are three levels of different difficulties Based on players performance the score of all the twenty times will be added up. The score reaching 100 will lead to another level. Finally the score will be displayed at the end of the game. Player will have two options either to continue or to quit the game.
  • 6. WELCOME SCREEN: In this module the functions we used are:: hand()----In this function we use graphics commands like ellipse, line, setcolor for designing the hand gesture to indicate the points. image(),conveximage(),image1()----These functions draws the decorative front screen getkey()----This function gets the movement of hand from the user keyboard. rules()---The next screen will have the rules for the game. updatehighscore()----This funtion will update the highest score of the game. level()------This function describes each levels to the players. exit()-----This function exits the game
  • 7. GAME SCREEN: We use the following functions for designing this screen arrow(int pos)---This will create the arrow .The arrow with the yellow colour used the graphical command line only. shoot()-----This will get the spacebar pointer to shoot the arrows in each level. ball(),balllevel2()----These functions forms balls in each levels. eyelevel()----This function contrlos the bow to move up/down/right/left. displaytopscore()-----This function displays the sore after the end of the game. gethighscores()-----It gets the highest score and send it to front sreen function to update the score. game()-----This function calls the other functions in gamescreen mode to complete the whole game in a if else conditions where the players chooses how to play.
  • 8. Ending Screen: Here we use the following functions main():--- This function combines all other function to actually run the program.At the end of game, the score of the game will be displayed with two options either to quit or continue. Finally the names will be asked to display in the middle of the screen.
  • 9. LITERATURE Prototypes in <GRAPHICS.H> 1.INITGRAPH: Intializes the graphics system. Syntax: Initgraph (int far *graph driver, int far *graph mode, char far *path drive); 2.RECTANGLE : Draws a rectangle Syntax: Rectangle(intleft,inttop,intright,int bottom); 3.SETBACKCOLOR:Sets the back ground colour Syntax: setbkcolor(clour) 4.ELLIPSE: Draws the ellipse Syntax: ellipse (int x, int y, int stangle, int endangle, int xrasius,int yradius) 5.SETTEXTSTYLE: Sets the current text characteristics. Syntax: Settextstyle(intfont,intdirection,intcharsize);
  • 10. 6.SETFILLSTYLE: Sets fill pattern and color. Syntax: Setfillstyle(intpattern,int color); 7.SETCOLOR: Set color sets the current drawing color. Syntax: Setcolor(int color); 8.CLOSEGRAPH: Shuts down the graphics system. Syntax: Closegraph(void); 9.DELAY: Suspends execution for some time interval(milliseconds) Syntax: Delay(unsigned milliseconds); 10.SLEEP: Suspends execution for interval Syntax: Sleep(unsigned seconds); 11.nosound: 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);
  • 11. 12.OUTYEXTXY:Outtextxy displays a string at the specified location(graphics mode) Syntax: Outtextxy(intx,inty,char far *textstring); 13.line:Purpose: Draws a line. Syntax: void far line (int left, int top, int right, int bottom); 14.flag:Purpose: Resets the formatting flags as the default value Syntax; long flag(); 15.ARC(): Purpose : Draws an arc. Syntax: void arc (int xcentre, int ycenter, int stangle, int endangle,int radius); 16.CIRCLE: Circle draws a circle. Syntax: Circle(intx,inty,int radius) 17.RANDOM: Macro that returns an integer. Syntax: Random(num);
  • 12. 18.getaccords() get coordinates of the last call to arc. Syntax: void getaccords(struct accordstype *arccords); 19.FLOODFILL(); It fills an enclosed area. Syntax: void floodfill(int x,int y,int border); 20.sound: 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);
  • 13. Algorithm STEP1: Welcome screen will be displayed. STEP2: Different choices would be displayed STEP3: Game is chosen player would be redirected to game screen . STEP4: Game screen with bow and arrow will be there to hit the target. STEP5: When the arrow is hitted the score will be displayed. STEP6: Like that 20 arrows will be there to hit the target. STEP7: If scores 100 then proceeds to level 2 and repeat the procedure. 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 will ask for player name to it on leaderboard. And then player would be redirected to the main screen.
  • 14. CONCLUSION The ‘Bow & Arrow’ game is basically a memory game.’C++’ provides modularity by dividing the program into number of function blocks. We have used several 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.
  • 15. REFERENCES WEBSITES v www.google.com v www.Programmersheaven.com v www.programmersworld.com v www.wikipedia.com v www.cprogramming.com v www.tutorialspoint.com/computer_graphics/