SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Destaque

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
 

Destaque (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
 

Semelhante a 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 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.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.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
 

Semelhante a 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 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.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.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
 

Último

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 

Último (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

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/