2D Game Computer Graphics Project in OpenGL – 18CSL67
In this project, we will draw the 2D Game. We are using the OpenGL library to implement the project. OpenGL has a lot of inbuilt functions which makes the drawing of any geometric objects quite easy.
In the project “ 2D GAME”, the project is programmed using c/c++. OOPS, concepts are explored and the project involves the Bat and Ball on which basis game is built. In this game, there will be two players. PC will be the First player and USER will be the second player. This program contains Functions to drag the ball, draw the bat, etc.
This project includes multiple windows, menus, and submenus using which color of the bat & ball, screen color, ball size will be changed. These actions are assigned to the keyboard and mouse. User-interface is provided by means of both Keyboard and Mouse.
By using arrow keys bat can be moved. Mouse interaction is achieved by means of a menu that is operational only with the “right mouse button” through which bat, ball, screen color changing, speed settings are enabled.
The interface is mainly concentrated on the use of a mouse and keyboard. Clicking right button of the mouse displays a menu that has various options which help in changing the color of the bat, ball, and background.
By pressing P and R we can pause and restart the game. By pressing N we can move from the current window to the next window.
The aim of this project is to develop a graphics package which supports basic operations which include building a 2D GAME using Open GL. The package must also have a user-friendly interface. The objective of developing this model was to design and apply the skills we learned in class.
This Project provides most of the features that a graphics model should have. It is developed in the C language. It has been implemented on the LINUX platform. The graphics package designed here provides an interface for the users for playing 2D GAME using bat and ball.
Further, this project can be enhanced by adding a few more options i.e menus in the game. Using this we can design a 3D game which contains cube instead of a single window and multiple numbers of balls that are randomly moving and all facets of the cube are considered as a wall.
Conclusions and Enhancements
The project was started with a modest aim with no prior experience in any programming projects like this but ended up learning many things, fine-tuning the programming skills, and getting into the real world of software development with exposure to the corporate environment. During the development of any software of significant utility, we are forced with the tradeoff between speed of execution and amount of memory consumed. This is a simple interactive application. It is extremely user-friendly and has features, which makes simple graphics project. It has open-source and no security features have been included. The user is free to alter the code for feature enhancement. Checking and verification of all possible types of functions are taken care of. Care was taken to avoid bugs. Bugs may be reported to the creator as the need.