Skip to content

A college game project, couple of TODOs, but works fine and is good to go.

Notifications You must be signed in to change notification settings

ht2k9/OpenGL-Billiard-Table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

OpenGL Billiard Table

The game is developed in OpenGL, Visual Studio, using C.

To use it, you must have OpenGL glut libraries, it is well documented, easy to understand code.

Animation, physics, lightning and movements are all done with OpenGL and C.

Note:

The final version is lost, this code is little wet, has couple of TODOs and the collision is slightly off.

The Actual Project Assignment By proffesor A

Drawing

You must build a 3D virtual world of vector graphics in an openGL that contains a floor on which a table is placed. The table stands on four legs and under the feet there is another floor.

  • The table has four-sided borders, as shown in a green painting.
  • On the table there are 9 balls of different colors.
  • The table has three holes as shown in the painting in a different color. You can use a round surface.
  • There are red barriers on the table.

untitled

The Game

  • The balls will be numbered from 9-1, you must choose keyboard buttons that allow you to select a ball for the game.
  • Selecting the ball will color it in white. Selecting another ball will return the original to its previous color.
  • With a keyboard you can move automatically after a click (buttons of your choosing), right, left, forward and backward.
  • Select a button that also makes circular motion to the selected ball, choose a direction for circular motion.
  • A ball that hits the red hole leaves the game and drops 10 points. A bullet that hits the black hole adds 10 points and returns the ball to the beginning of the table back.
  • The bullets can not pass through the red roadblocks, and hitting a checkpoint takes 2 points.
  • Make sure there is a collision between the balls so that it moves accordingly (hit ball and hit ball).
  • The game ends after accumulating 11 points (PS: I don't remember).

Additional Settings

  • Set lighting on the table from above.
  • Text your score up. And an end notification if the game ends.
  • Make sure that the buttons are used to turn the table sideways and up and down.
  • The radius of the balls and the table width of your choice.

Bonus

  • For those who add additional options such as adding speed to balls or slowing down and more

About

A college game project, couple of TODOs, but works fine and is good to go.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages