0% found this document useful (0 votes)
8 views15 pages

CG Mini Project Report

The document outlines a mini project titled 'Car Race' submitted by students for their Bachelor of Engineering in Computer Engineering at the University of Mumbai. The project involves creating a simple car racing game using C++ and a graphics library, where players navigate their car while avoiding obstacles and progressing through levels. The document also includes details about the project's approval, educational objectives, and the functions used in the game's implementation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views15 pages

CG Mini Project Report

The document outlines a mini project titled 'Car Race' submitted by students for their Bachelor of Engineering in Computer Engineering at the University of Mumbai. The project involves creating a simple car racing game using C++ and a graphics library, where players navigate their car while avoiding obstacles and progressing through levels. The document also includes details about the project's approval, educational objectives, and the functions used in the game's implementation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Mini Project

Submitted in partial fulfillment of the requirements of the degree

BACHELOR OF ENGINEERING IN COMPUTER


ENGINEERING

By

Dakshata Lolge (VU1F2324097)


Aaryan khule (VU1F23240111)
Sakshi Borhade (VU1F23240110)
Aayush Pandey(VU1F2324100)

Supervisor

Prof: Vinod Alone

Department of Computer Engineering


Vasantadada Patil Pratishthan's College of Engineering
& Visual Arts
Sion, Mumbai - 400 022
University of Mumbai(A.Y. 2024-25)
CERTIFICATE

This is to certify that the Mini Project entitled car race is a bonafide work of of Dakshata

lolge, Aaryan khule,Sakshi Borhade and Aayush Pandey submitted to the University of

Mumbai in partial fulfillment of the requirement for the award of the degree of "Bachelor of

Engineering" in "Computer Engineering".

(Prof.Vinod Alone )

Supervisor

(Prof. Rais Mulla)


(Prof. Alam Sheikh)
Head of Department
Principal

A. Y. 2023-24 Department of Computer Engineering Page I 2


INSTITUTE VISION & MISSION

VISION:

To provide an environment to educate, encourage and explore students by facilitating


innovative research, entrepreneurship, opportunities and employability to achieve
professional goals.

MISSION:

1. To Foster entrepreneurship And strengthen industry institute interaction to enhance


career opportunities for the employability of students.
2. To encourage collaborations with industries and academic institutes in terms of
projects and internships by creating area for Research and Development .
3. To build up appropriate moral and ethical skills and to promote holistic development
of students through various academic, technical, social and cultural activities.

COMPUTER ENGINEERING DEPARTMENT

VISION:

To develop a center of excellence in computer engineering and produce globally competent


engineers who contribute towards the progress of the engineering community and society as a
whole.

MISSION:

1. To provide students with diversified engineering knowledge to work in a


multidisciplinary environment.
2. To provide a platform to cultivate research, innovation, and entrepreneurial skills.
3. To produce world-class computer engineering professionals with moral values and
leadership abilities for the sustainable development of society.

A. Y. 2023-24 Department of Computer Engineering Page | 3


PROGRAM EDUCATIONAL OBJECTIVES (PEO's)
• To create graduates with sound fundamental knowledge of computer engineering.
• To enhance students' skills towards emerging technologies to propose solutions for
engineering problems and entrepreneurial pursuits, making them employable.
• To produce technology professionals with ethical values and commitment to lifelong
learning.

PROGRAM SPECIFIC OUTCOMES (PSOs)

1. Graduates of programme will be able to provide effective and efficient real time
solutions using practical knowledge in Computer Engineering domain.
2. Graduate of programme will be able to use engineering practices, strategies and tactics
for the development, operation and maintenance of software system

A. Y. 2023-24 Department of Computer Engineering Page | 4


Mini Project Approval

This Mini Project entitled 2d array (tic tac toe game) by of Dakshata lolge, Aaryan

khule,Sakshi Borhade and Aayush pandey is approved for the degree of

Bachelor of Engineering in Computer Engineering.

Examiners

1. ............................................
(Internal Examiner Name & Sign)

2. ...............................................
(External Examiner name & Sign)

Date:

Place

A. Y. 2024-25 Department of Computer Engineering Page I 5


Introduction :

In the project named “car racing game” we are trying to make a simple game
using the graphics library. The primary language used is c++ .in the game we
are trying to show our car and the other cares . The goal of the game is to
complete the race and without hitting the other cars. Our car can move up,
down, left and right but you cannot control the speed of the car . Our car is
moving upwards and the other cars are moving downwards. This game is
contains a level system by successfully finishing a level you will move to the
next level. For making the next level hard we have increased the speed of the
car, the speed keeps on increasing as we move up the level .we also have
given the player hearts/lives. After using all lives the game will end.
Currently we have only included 5 levels and after that the game restarts.

Program Structure :

The program is structured into multiple functions that handle different aspects of the game .
here is an overview of the key components. initialization : the program starts by initializing
the graphics system using ‘initgraph’ function . it specifies the graphics driver, graphics
mode, and a path to the ‘BGI’ driver file. the second step can be said to be the starting point
of the actual game in this step the generation/drawing of road and our car is done, as well
as the enemy car. this are drawn by using the rectangle function. players car and the other
cars are drawn with different color to identify which one is which. the colours are filled
with floodfill function the third step can be the movement of cars, as they are generated
enemy cars start to move towards the user which is at the bottom of the screen . the user
has to avoid hitting these cars in order to pass this level . the user can use the arrow keys to
move the car in the respective direction .here the ‘kbhit’ function is used. there is a level,
score and lives/hearts indicator on the screen. as the user successfully avoids the enemy
cars they move down and the score increases. if the user fail to avoid the enemy car and
hits the enemy car , accident happened is shown on the screen and 1 life is deducted from
the user. initially the user has 3 lives and if three of them are used the screen shows that
you failed to win the game and it terminates . if the user successfully avoids all cars then
also after 5 levels the program will display that you have won and automatically end.

A. Y. 2024-25 Department of Computer Engineering Page I 6


Function used from graphics directory :
1. Rectangle Draws a rectangle in graphics mode. Declaration : rectangle (int
left, int top, int right, int bottom); (left, top) is the upper left corner of the
rectangle, and (right, bottom) is its lower right corner.
2. setcolor setcolor sets the current drawing color to color , which can range
from 0 to getmaxcolor. Declaration : setcolor(int color); To select a drawing
color with setcolor , you can pass either the color number or the equivalent
color name.
3. setfillstyle Sets the fill pattern and color . Declaration : setfillstyle(int
pattern , int color);
4. floodfill Flood-fills a bounded region. Declaration : floodfill(int x, int y, int
border); The area bounded by the color border is flooded with the current fill
pattern and fill color . (x,y) is the “seed point” . · If the seed is within an
enclosed area, the inside will be filled . · If the seed is outside the enclosed
area,the exterior will be filled.
5. gotoxy Positions cursor in text window . Declaration : gotoxy(int x, int y);
gotoxy moves the cuesor to the given position in the current text window .If
the coordinates are invalid , the call to gotoxy is ignored.
6. getmaxx and getmaxy Declaration : getmaxx(void); and getmaxy(void);
getmaxx returns the maximum x value (screen-relative) for the current
graphics driver and mode. getmaxy returns the maximum y value (screen-
relative) for the current graphics driver and mode.
7. delay Suspends execution for interval(milliseconds). Declaration : delay
(unsigned milliseconds); With a call to delay, the current program is
suspended from execution for the time specified by the argument
milliseconds.
8. getch Declaration : int getch(void); getch reads a single character directly
from the keyboard, without echoing to the screen. Return value : function
return the character read from the keyboard.
9. kbhit DeclaraƟon : int kbhit(void); kbhit checks to see if a keystroke is
currently available. Any available keystrokes can be retrieved with getch or
getche. Return value : · On success (if the keystroke is available), returns a
non-zero integer. · if a keystroke is not available, returns 0.
A. Y. 2024-25 Department of Computer Engineering Page I 7
INPUTS:

A. Y. 2024-25 Department of Computer Engineering Page I 8


A. Y. 2024-25 Department of Computer Engineering Page I 9
OUTPUTS:

A. Y. 2024-25 Department of Computer Engineering Page I 10


A. Y. 2024-25 Department of Computer Engineering Page I 11
A. Y. 2024-25 Department of Computer Engineering Page I 12
A. Y. 2024-25 Department of Computer Engineering Page I 13
CONCLUSION:

Hence we implement the car race gam e using computer graphics in c++ with
the help of 2d array since it is 2d car race game

A. Y. 2024-25 Department of Computer Engineering Page I 14


Vasantdada Patil F:rati htkan's CoUege of Engineering &. Visual Arts, Sion, M11mbai.-
111 [11 22
Dep.artment of Computer Enwueerin

A. Y. 2023-24 Department of Computer Engineering Page I 15

You might also like