You are on page 1of 15
“VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI” B.L.D.E.A's V.P. DR. P.G. HALAKATTI COLLEGE OF ENGINEERINGAND TECHNOLOGY, VIJAYAPUR - 586103 BACHELOR OF ENGINEERING IN COMPUTER SCIENCE & ENGINEERING COMPUTER GRAPHICS LABORATORY WITH MINI PROJECT (18CSL67) MINI PROJECT REPORT ON: “BULLZ EYE” UNDER THE GUIDANCE OF Prof. Kiran Patil Dr.Anand.B.Jumnal SUBMITTED BY: AISHWARYA BIRADAR (2BL20CS009) AISHWARYA HIROLLI (2BL20CS010) VISVESVARAYA TECHNOLOGICAL UNIVERSITY BELAGAVI B.L.D.E ASSOCIATION'S. VACHANA PITAMAHA DR. P.G. HALAKATTI COLLEGE OF ENGINEERING & TECHNOLOGY VIJAYAPUR-586103 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CERTIFICATE This is to certify that the mini project entitled “BULL'S EYE” is a bonafied work carried out by Aishwarya Biradar (2BL20CS009),Aishwarya Hirolli (2BL20CS010), Submitted in partial fulfillment for the award of Bachelor of Engineering in Computer Science and Engineering of the Visvesvaraya Technological University, Belagavi during year 2022-2023. It is certified that all correction/suggestion indicated for Internal Assessment have been incorporated in report deposited in the departmental library. Project report has been approved as it satisfies the academic requirements in respect of mini project work prescribed for said degree GUIDE HOD PRINCIPAL, Prof.K.B.PATIL Dr.PUSHPA.B.PATIL — DR.V.G.SANGAM Dr.A.B.Jumnal Examinerl: SIGNATURE WITH DATE Examiner2: ACKNOWLEDGMENT It is overwhelming for me to bring out my project report titled “BULLZ EYE? in the partial fulfillment of the BE course in Computer Science and Engineering. The satisfaction that accompanies the successfull completion of any work would be incomplete without naming the people who made it possible. We would like to express my deep gratitude to our principal Dr . V.G. Sangam for providing facilities for research in the college campus. We would like to thank our head of the department Dr . PUSHPA. B. PATIL for providing all the facilities and fostering a congenial academic environment in the department We thank our coordinator Prof. Dr.Kiran Patil and Dr.Anand.B.Jumnal for constant encouragement and support rendered to me throughout the course of work. Lastly we would like to thank my parents and my friends who played an important role in completing this project. Aishwarya Biradar Aishwarya Hirolli ABSTRACT The abstract for a "Bullz Eye" game using OpenGL could be :The "Bullz Eye" game is a 2D shooting game developed using the OpenGL graphics library. The objective of the game is to shoot targets that appear on the screen with accuracy and precision, The game utilizes OpenGL’s rendering capabilities to create a visually appealing and interactive gaming experience. It employs various graphical elements such as textures colors, and animations to enhance the gameplay.The player controls a crosshair using input devices like a mouse or touch screen to aim at the targets. The game incorporates collision detection algorithms to determine if the player successfully hits the target. Scoring is based on accuracy and speed, encouraging players to improve their shooting skills, The game features multiple levels with increasing difficulty, introducing various types of targets and obstacles. Power-ups and bonus points may be included to add excitement and strategic elements to the gameplay.Sound effects and background music further enhance the gaming experience, creating an immersive atmosphere for the players. The "Bullz Eye" game showcases the capabilities of the OpenGL library in creating engaging 2D graphics and interactive gameplay. It provides an entertaining and challenging shooting experience for players of all ages.Overall, the "Bullz Eye" game demonstrates the potential of utilizing OpenGL in developing visually captivating and interactive games, while offering an enjoyable and immersive gaming experience for the players. CHAPTER PAGE NO 1 INTRODUCTION 1 I ABOUT OPENGL SYSTEM REQUIRE! METHODOLOGY SNAPSHOTS CONCLUSION REFERENCES CHAPTER I INTRODUCTION Welcome to Bullz Eye, the ultimate target-hitting game that will test your precision, accuracy, and nerves of steel! In this adrenaline-pumping challenge, you'll be equipped with a virtual bow and arrow, ready to take aim and hit your mark with unmatched skill Whether you're an aspiring archer seeking to hone your shooting prowess or simply looking for an exciting and competitive pastime, Bullz Eye is the perfect game for you. Get ready to embark on a thrilling journey where cach shot counts and every bullseye brings you closer to victory. ‘As you step onto the digital archery range, you'll encounter a variety of challenging targets, each with its own unique characteristics and obstacles. From stationary bullseyes to moving targets that test your timing and anticipation, Bullz Eye offers a dynamic and engaging gameplay experience that will keep you on the edge of your seat. But it's not just about hitting the targets; it's about hitting them with style, Show off your shooting finesse by achieving precision shots, scoring bonus points, and unlocking new levels and rewards. With each successful shot, you'll feel the rush of accomplishment and the urge to keep pushing your limits. Compete against friends, family, or players from around the world as you strive to climb the global leaderboard and cement your name as the ultimate Bullz Eye champion. Share your achievements, challenge others, and immerse yourself in the exhilarating community that surrounds this addictive game. So, are you ready to take aim, release your atrow, and become a true master of the bow? Get ready to experience the thrill, excitement, and satisfaction of Bullz Eye. Let your arrows fl true and may the bullseyes be ever in your favor! The bullz eye game is the earliest of the games that had been developed witha simple concept of hitting a moving ball with arrows.’The user had a limited number of arrows and he had to finish a certain taskwithin the limit of arrows assigned. If he does, he wins, else he fails. The ‘game uses the spacebar to shoot the arrows and if there is a contact between the ball and the arrow head, itis considered as a point. ‘The project uses the concepts of OpenGL 3D as the balls are represented asspheres and have depth to them and shades of color appear for the spheres asthe lighting effects have been used ‘on the balls making them look morerealistic and true to life. It gives the user an nostalgic experience having to play such an easy gamewith the code implementation true to his liking. Bullz. Eye has been a very famous game from the beginning of the era ofgames as it emerged to be an en gaging and easy to play as the instruction ofthe game is simply to press a button and to rely completely on instinct. CHAPTER IT ABOUT OPENGL. OpenGL, short for Open Graphics Library, is an open and platform-independent graphics programming API (Application Programming Interface) that enables developers to create high-performance, interactive 2D and 3D graphics applications. It provides a set of functions and commands that allow programmers to interact with the graphics hardware of a computer or mobile device. Originally developed by Silicon Graphics Inc. (SGI) in the early 1990s, OpenGL has evolved over the years and has become an industry standard for graphics programming, It is supported on various operating systems, including Windows, macOS, Linux, and mobile platforms like iOS and Android This cross-platform compatibility allows developers to create applications that can run on a wide range of devices. OpenGL follows a state-machine model, where the programmer sets the desired rendering state and triggers the rendering pipeline to process and display the graphics accordingly. The pipeline consists of multiple stages, including vertex processing, primitive assembly, rasterization, and fragment processing, which collectively transform geometric data into visual output, Key features of OpenGL include: 2D and 3D Graphies: OpenGL. supports both 2D and 3D rendering, allowing developers to create applications with varying levels of complexity and visual fidelity. Hardware Acceleration: OpenGL leverages the power of modem GPUs (Graphics Processing Units) to accelerate rendering, enabling real-time rendering of complex scenes with high frame rates. Shader Support: With the introduction of programmable shaders, OpenGL. allows developers to write custom shader programs for mote advanced and realistic graphics effects, such as, lighting, shadows, and texture mapping. Flexibility and Extensibility: OpenGL provides a flexible and extensible architecture, allowing developers to customize and extend its functionality through extensions and vendor- specific features. Wide Industry Adoption: OpenGL is widely used in various industries, including gaming, virtual reality, scientific visualization, CAD (Computer-Aided Design), and more. It has a large and active community of developers, resources, and tools available to support its usage. Integration with Other Libraries: OpenGL can be integrated with other graphics and multimedia libraries, such as GLU (OpenGL Utility Library), GLFW (Graphics Library Framework), and GLEW (OpenGL Extension Wrangler Library), to simplify the development process and enhance functionality Ongoing Development: The OpenGL standard continues to evolve, with regular updates and additions to the API. The latest version, OpenGL 4.6, introduced modem features and enhancements to keep pace with advancements in graphics hardware and programming, techniques. Most of our application will be designed to access OpenGL directly through functions in three libraries. Functions in the main GL (or OpenGL in windows) library have names that begin with the letters gl and are stored in a library usually referred to as GL (or OpenGL in windows). The second is the OpenGL Utility Library (GLU). This library uses only GL functions but contains code for creating common objects and simplifying viewing. All functions in GLU can be created from the core GL library but application programmers prefer not to write the code repeatedly. The GLU library is available in all OpenGL implementations; functions in the GLU library begin with letters glu. To interface with the window system and to get input from external devices into our programs, we need at least one more system-specific library that provides the “glue” between the window system and OpenGL. For the X window system, this library is functionality that should be expected in any modem windowing system. The organization of the libraries for an X Window System environment. For this window system, GLUT will use GLX and the X libraries. The application program, however, can use only GLUT functions and thus can be recompiled with the GLUT library for other window systems OpenGL commands use the prefix gl and initial capital letters for each word making up the command name. Similarly, OpenGL defined constants begin with GL_, use all capital letters and use underscores to separate words — (like GL_COLOR_BUFFER BIT) OpenGL (Open Graphics Library) is a cross-platform, hardwar srated, language- independent, industrial standard API for producing 3D (including 2D) graphics. Modern computers have dedicated GPU (Graphics Processing Unit) with its own memory to speed up graphics rendering. OpenGL is the software interface to graphies hardware. In other words, OpenGL graphic rendering commands issued by your applications could be directed to the graphic hardware and accelerated, We use 3 sets of libraries in our OpenGL programs: 1. Core OpenGL (GL): consists of hundreds of commands, which begin with a prefix "gl" (eg, glColor, glVertex, glTranslate, giRotate). The Core OpenGL models an object via a set of geometric primitives such as point, line and polygon. OpenGL Utility Library (GLU): built on-top of the core OpenGL to provide important utilities (such as setting camera view and projection) and more building models (such as qradric surfaces and polygon tesscllation). GLU commands start with a prefix "glu" (e.g., gluLookAt, gluPerspective). . OpenGL Utilities Toolkit (GLUT): OpenGL is designed to be independent of the ‘windowing system or operating system. GLUT is needed to interact with the Operating ‘System (such as creating a window, handling key and mouse inputs); it also provides more building models (such as sphere and torus). GLUT commands start with a prefix of "glut" (e.g., glutCreatewindow, glutMouseFunc).. GLUT is platform independent, which is built on top of platform-specific OpenGL extension such as GLX for X Window System, WGL for Microsoft Window, and Quoting from the opengl.org: "GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to leaming OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits, OpenGL draws primitives—points, line segments, or polygons—subject to several selectable modes. You can control modes independently of each other; that is, setting one mode doesn't affect whether other modes are set (although many modes may interact to determine what eventually ends up in the frame buffer) Primitives are specified, modes are set, and other OpenGL operations are described by issuing commands in the form of funetion calls, Primitives are defined by a group of one or more vertices. A vertex defines a point, an endpoint of a line, or a comer of a polygon where two edges meet. Data (consisting of vertex coordinates, colors, normals, texture coordinates, and edge flags) is associated with a vertex, and each vertex and its associated data are processed independently, in order, and in the same way The only exception to this rule is if the group of vertices must be clipped so that a particular primitive fits within a specified region; in this case, vertex data may be modified and new vertices created. The type of clipping depends on which primitive the group of vertices represents. Commands are always processed in the order in which they are received, although there may be an indeterminate delay before a command takes effect. This means that each primitive is drawn completely before any subsequent command takes effect. It also means that state- querying commands return data that’s consistent with complete execution of all previously issued OpenGL. commands. ‘HAPTER III SYSTEM REQUIREMENTS The requirements can be broken down into 2 major categories namely hardware and software requirements. The former specifies the minimal hardware facilities expected in a system in which the project has to be run, Software Requirements: SECTION REQUIREMENTS Languages used (C+ with OpenGL utility Kit IDE Microsoft visual studio Other tools Google Chrome Browser Hardware Requirements: ‘Intel core iS processor 11" Gen Intel® Core™ i5-1135G7 @ 2.40GHz 2.42GHz is used as a processor because it is faster than other processors and provide reliable and stable and we can run our pe for longtime. By using this processor, we can keep on developing our project without any worries. RAM 16.0GB (15.6 GB usable) is used as it will provide fast reading and writing capabilities and will inturn support in processing, System type 64-bit operating system, x64-based processor Wi-Fi Module: Wi-Fi module acts as a receiver. WiFi uses the latest 802.1 In wireless technology and can support data rates up to 1S0Mb/s compared with the older products. CHAPTER IV METHODOLOGY eiMatrixMode: Sets the current matrix mode. Mode can assume one of four values GL_MODELVIEW -Applies subsequent matrix operations to the model view matrix stack, GL_PROJECTION -Applies subsequent matrix operations to the projection matrix st GL_TEXTURE -Applies subsequent matrix operations to the texture matrix stack, GL_COLOR -Applies subsequent matrix operations to the color matrix stack. GPushMatrix and glPopMatrix ‘Pushes to and pops from the matrix stack corresponding to thecurren matrix mode iBegin :Initiates a new primitive of type mode and starts the collection of vertices. Values ofmode include GL_POINTS, GL_LINES and GL_POLYGON. GlEnd :Terminates a list of vertices. Choose(): This function gives a switch case to choose from the different menu options. Choosing mode 1 calls the function Dynamic() and choosing case 2 calls Classie() Choosing mode 3 calls the function Grey wave. Choosing quit case 1 will exit from the game at any point in the game. Display(): sets the background colour and clears the color buffer bit, and depth buffer bit ( for hidden surface removal and Z buffer test), and it is called from the main() Keyboard(): Keyboard is a keyboard callback function which is used to make our program interactive, It makes the shoot flag = 1 in our program everytime key ‘f" is pressed, by recognizing it as an ASCII character. MainQ: The main function performs the required initializations and starts the event processing loop. All the functions in GLUT have the prefix glut, and those which perform some kind of initialization have the prefix glutInit. ‘* gluthnit(int *arge, char **argy) - parameters are pointers to the unmodified arge and argv variables from the main function. ‘+ We define the display mode using the function glutlnitDisplayMode. GLUT_RGB - selects a RGBA window. This is the default color mode. GLUT_SINGLE ~ selects @ single buffer window. * Each window can be created with glutCreateWindow. The retum value of glutCreateWindow is the window identifier. + glutDisplayFunc() passes the name of the function to be called when the window needs to be redrawn. * glutKeyboardFunc- is notify the windows system which function(s) will perform the required processing when a key is pressed. This function is to register a callback for keyboard events that occur when you press a key. CHAPTER V SNAP SHOTS Fig 5.1:Snapshot of front page of Bullz Eye FIG 5.2: Instructions for Bullz Eye FIG 5.4: Shoot the target board CONCLUSIO! The development of computer graphics has made computers easier to interact with and better for understanding and interpreting many types of data, Developments in computer graphi have had a profound impact on many types of media and have revolutionized the animation and video game industry. We started with modest aim with no prior experience in any programming projects as this, but ended up in learning many things, fine tuning the programming skills and getting into the real world of software development with an exposure to corporate environment. During the development of any software of significant utility, we are faced with the trade-off between speed of execution and amount of memory consumed, This is simple interactive application application. It is extremely user friendly and has the features, which makes simple graphics project. It has an open source code and no security features has been included. The user is free to alter the code for feature enhancement. Checking and verification of all possible types of the functions are taken care. Care was taken to avoid bugs. Bugs may be reported to creator as the need may be So, we conclude on note that we are looking forward to develop more such projects with an appetite to learn more in computer graphics. REFERENCES [1] Interactive Computer Graphics: A Top Down Approach with OpenGL~ Edward Angel, SthEdition, Addison-Wellesley,2008. [2] Online tutorials for game development at NeHe productions. [3] OpenGL Red Book and Blue Book for reference. [4] Donald Hearn & Pauline Baker: Computer Graphics with OpenGL version, 3rd/4th Edition, [5] Edward Angel: Interactive Computer Graphies-A top Down approach with OpenGL, Sth edition, Pearson Education 2008 [6] Software: Microsoft Visual Studio for Coding [7] Browser: Google Chrome and GitHub

You might also like