0% found this document useful (0 votes)
20 views12 pages

Jashore University of Science and Technology: 2D Car Simulation Game With Opengl

The document is a project report on a 2D Car Simulation game developed using OpenGL, detailing its features, system design, and implementation. The game allows players to control a pink car while avoiding obstacles, with various speed options and a scoreboard. The author reflects on the development process, highlighting the importance of planning, debugging, and learning from mistakes for future projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views12 pages

Jashore University of Science and Technology: 2D Car Simulation Game With Opengl

The document is a project report on a 2D Car Simulation game developed using OpenGL, detailing its features, system design, and implementation. The game allows players to control a pink car while avoiding obstacles, with various speed options and a scoreboard. The author reflects on the development process, highlighting the importance of planning, debugging, and learning from mistakes for future projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Jashore University of Science and Technology

Department of Computer Science and Engineering

Course Code: CSE-3208

Course Title: Computer Graphics and Animation Laboratory


A Project Report On

2D Car Simulation game with OpenGL


Submitted to Submitted by

Mostafijur Rahman Akhond Mubashshir Ahmad Nabil


Assistant Professor, Student ID: 180106
Department of Computer 3rd Year 2nd Semester
Science and Engineering Session: 2018-2019
Jashore University of Science Dept. of Computer Science and
and Technology Engineering
Jashore University of Science
and Technology

Submission Date: 13.12.2022


Introduction

2D Car Simulation game is a simple car simulation game with many features
using OpenGL. This game features a car driving in a road with obstacles. The
player has to avoid the obstacles and drive the car. The game does not have an
end point. Meaning the player can keep driving as long as they avoids the
obstacles. If the player hits an obstacle the game ends and goes back to main
menu. The player can easily play the game using the game interface. After
opening the game, the player has to press space on keyboard to start playing.
The player’s car color is pink. The car starts running as soon as the game starts.
The obstacles in the road have different colors. The player can change the car’s
speed to low, medium and high. If the player presses the L key on the keyboard,
then the car moves slowly. When the player presses the M key, then the car
moves in medium speed. When the player presses the key H on the keyboard,
then the car moves in high speed. The game is over if the player hits an
obstacle.
Features

• The game has a start menu

• We can Start the game from this menu

• It has a road

• It has a tree beside the road

• We can see the blue sky in the start menu

• It has green field beside the road

• The sky and field color is shaded

• In game we have a pink car

• The car has grey wheels

• The car shape is polygon

• The road in which we can drive the car

• Obstacles in the road

• Obstacles in different colors

• The road has road dividers and road borders

• Road dividers and road borders are white

• The road color is black

• The obstacles and other cars comes in red, violet and orange color

• The fields beside the road are deep green color

• It has a score board

• Score board color is black

• We can control the speed of the car

• If the car hits an obstacle or other car the game is over


System Design

It is an Use case or Activity Diagram of the simulation game. The diagram shows
how the game system works.
Implementation Details

When we run the application firstly it pop-up the intro screen. It consists of a
road view with a road going through a field and a sky.
The start menu design is implemented using this segment of code:
The car design is implemented using this part of code:
The obstacles are implemented using this segment of code:
In order to control the car speed, this segment of code is used:
This segment of code implements the controlling of the car left and right:
Conclusion

Overall, I am quite satisfied with the project by the end. Almost all the important
elements worked successfully at the end, with the exception of a couple small
details. Although it became clear by the end of the term that nothing would be
perfect, I am happy to have accomplished the bulk of a challenging project.
Specifically, all for major sections were considered a general success, though
some to a greater degree than others. Having worked for 2 months almost
continuously on this project, I have realized a number thing about large-scale
project development. First, it is absolutely critical to design code before diving in
and implementing functionality. Second, it is important to think through all the
small details before plunging in. And third, it is necessary to have backup plans in
the inevitable event that something fails to go according to plan. Finally, it is also
absolutely critical to factor in debugging time to the development process. It is
one thing to plan for design and implementation time, but it is equally important
to assume that things won’t work perfectly the first time and consequently to
budget substantial time for such issues as debugging, system integration and
code merging. I am already much better prepared to approach difficult, large
engineering problems. Although I definitely made mistakes along the way, my
project overall can be considered a success. As such, future engineering
endeavors can expect to go a little more smoothly based on our experiences with
this project.
FUTURE PLAN

We have attempted to design and implement “2D Car Simulation”. OpenGL


support enormous flexibility in design and the use of OpenGL graphics programs.
The presence of many built-in class methods take care of much functionality and
reduce the job of coding as well as makes the implementation simpler. We have
implemented the project making it user friendly and error free as possible. We
regret any error that may have inadvertently crept in.

You might also like