Archive Pages Design$type=blogging

Car Race OpenGL Program

There are many OpenGL Program in our blog. In this post we are going to discuss about the Car Race game in old style. It is similar to 2d c...

There are many OpenGL Program in our blog. In this post we are going to discuss about the Car Race game in old style. It is similar to 2d car racing game but little simple.

Like in video game Car race game, we have seen the cars are shaped in rectangular shape. The black meter lined road is coded on which the cars raced. There are 6 lanes in the road on which racer have to move the care to avoid collision. 



Earlier in our many game programs we have much impressive menu or instruction for user. This opengl program also display the menu while game being played. You can see in the image above. The score is also written at the top.


HOW TO PLAY

In menu the basic instruction has been shown but many skipped due to low area to display text. All the other user interaction of this opengl program are mentioned below - 

Start and End
s  - start the game
q - quit the game and exist the program

Color change
Change the track and background color (when game end and show shown).
0 - to white
1 - to red
3 -  to blue

Game Play
2 - down or de-accelerate
4 - toward left
6 - toward right
8 - up or accelarate


Note : In this OpenGL program we have used the glutStrokeCharacter

NAME
       glutStrokeCharacter  -  renders  a  stroke character using OpenGL.

SYNTAX
       void glutStrokeCharacter(void *font, int character);

ARGUMENTS
       font      Stroke font to use.

       character Character to render (not confined to 8 bits).

DESCRIPTION
       Without using any display lists, glutStrokeCharacter  ren
       ders the character in the named stroke font. The available
       fonts are:

       GLUT_STROKE_ROMAN
               A proportionally spaced  Roman  Simplex  font  for
               ASCII  characters  32 through 127. The maximum top
               character in the font is 119.05 units; the  bottom
               descends 33.33 units.

       GLUT_STROKE_MONO_ROMAN
               A  mono-spaced  spaced  Roman  Simplex  font (same
               characters as GLUT_STROKE_ROMAN) for ASCII characte
               ters  32 through 127. The maximum top character in
               the font is  119.05  units;  the  bottom  descends
               33.33  units. Each character is 104.76 units wide.

       Rendering  a  nonexistent  character  has  no  effect.   A
       glTranslatef  is  used to translate the current model view
       matrix to advance the width of the character.

COMMENTS

Name

3D Bi-Cycle 3D Game 3D Laptop 3D Objects 3D Projects 3D Zoo Algorithm Android Aquarium Bellman-Ford Algorithm B├ęzier curves Block Breaker Blockshooting Bucket Sort C# Chess Clock Code Blocks Colors Complex Project Complex Projects Crab Pong Cross Zero DSAV Escapa Fighter Jet First Come First Serve Flag Flag Hoisting Fluids Font Demo Games Gear Motion GlutDino Glutplane Graphics Editor iOS iPhone Java Java OpenGL Graphics Programming Light Torus Linked List Ludo Board Game Mancala board games Memory blocks game Memory Game Menu Mickey Mouse Minesweeper Miniature Steam Engine moth Motion Blur MoveLight moving car Moving Ship Multiplex Networking Based Project Nuclear Power Plant Olympic opengl c++ examples OpenGL ES OpenGL Tutorial Origami OS Based Projects Paint Paper Folding Particles Drop Path Finding ping pong Pong Game Project Report Projects Report Puzzles qix like Queuqe Random Flowing lines Ray Rigid Body Rings Robot sample c++ opengl code Screen Saver Screen Saver Ship Shadow Cube Shadowfun Ship Iceberg Simple Drawing Simple Haloed Lined Wireframe Simple Move Light Simple Project Simulation SNAKE XENZIA GAME Solar system Sorting Sphere Spot Light Swing Stack Stars Taj Mahal The Edge Game Tic Tac Toe Tower of Hanoi Traffic Signal Transformation Triangular Animation Trippy Tutorial water ripple effects Whirlpool
false
ltr
item
OpenGL Projects: Car Race OpenGL Program
Car Race OpenGL Program
https://2.bp.blogspot.com/-ZjQz_F8BZWU/WKx7FYGsQEI/AAAAAAAAIQA/QInAXeGw7XQMG3XsaT9em8x2-KDvzwPGQCLcB/s320/car%2Brace%2Bgame%2Bopengl%2Bprogram.PNG
https://2.bp.blogspot.com/-ZjQz_F8BZWU/WKx7FYGsQEI/AAAAAAAAIQA/QInAXeGw7XQMG3XsaT9em8x2-KDvzwPGQCLcB/s72-c/car%2Brace%2Bgame%2Bopengl%2Bprogram.PNG
OpenGL Projects
http://www.openglprojects.in/2017/02/car-race-opengl-program.html
http://www.openglprojects.in/
http://www.openglprojects.in/
http://www.openglprojects.in/2017/02/car-race-opengl-program.html
true
2020194800836807725
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago