A PRESENTATION
ON
RACING GAME
Group members:
Season Maharjan (2070/BCT/48)
Shiwangi Shrestha (2070/BCT/50)
Smriti Mool (2070/BCT/52)
sushmita chaurasia(2070/BCT/57)
Yaju Shrestha (2070/BCT/64)
1
OVERVIEW
• General Objectives
• Project Detail (Smriti)
• Introduction to the codes (Yaju)
• Work flow diagram (Season)
• Output Description (Shiwangi)
• Future Extensions (Sushmita)
• Conclusion
3/2/2016
2
GENERAL OBJECTIVES
To make a game for some fun time using the
knowledge of graphics
To deal with the real world graphics in c language
To present the project with the required output
3/2/2016
3
PROJECT DETAIL
Project title: “RACING GAME”
Brief detail:
We have a racing object facing many
obstacles in its way and if the obstacle and the object
collide, then the game is over.
Programming language: C++ language with
Graphics library functions
3/2/2016
4 INTRODUCTION TO CODES
We have used various new functions we studied for
our graphics project and used as follows:
initgraph(): It initializes the graphics system by
loading the passed graphics driver then changing the
system into graphics mode
3/2/2016
Contd:
5
random(): It returns a random number between 0 and
(num-1). It is a macro defined in STDLIB.H
delay(): It is used to suspend execution of a program
for a M milliseconds
circle(): It draws a circle with radius r and centre
(x,y)
line(): It draws a straight line between two points on
the screen
3/2/2016
Contd:
6
arc(): It draws a circular arc from start angle till end
angle
kbhit(): It checks to see if a keystroke is currently
available. Any available keystrokes can be retrieved
with getch. On success (if a keystroke is available), it
returns a non-zero integer or else it returns 0
setcolor(): It sets the current drawing color to color,
which can range from 0 to getmaxcolor
setfillstyle(): It sets the fill pattern & color
3/2/2016
Contd:
7
bar3d(): It draws a 3-dimensional rectangular bar,
then fills it using the current fill pattern and fill color
cleardevice(): It erases the entire graphics screen and
moves the CP(current position) to home
Sector(): it is the function to create a ellipse structure
in the screen
bar(): it draws a bar i.e. rectangular bar
3/2/2016
WORK FLOW DIAGRAM
8
3/2/2016
OUTPUT DESCRIPTION
9
As our objective, we have an object (let as car)
in an straight multiple lane where it goes on moving
forward facing the obstacles. The screenshot of our
program code is as:
3/2/2016
10
3/2/2016
11
FUTURE EXTENTIONS
This game can have lots of features and cover all the
limitations
Also extensions can be done in programming levels
or language to make it more efficient and easier
3/2/2016
CONCLUSION
12
Familiar with the application of academic knowledge
in project development
Capable to make a small project using the knowledge
of Computer Graphics
And hence our objective is fulfilled
3/2/2016
13
THANK YOU!!!
3/2/2016