Batch 25 Bullz Eye

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

“JNANA SANGAMA”, BELGAUM - 590018

2020-21

MOBILE APPLICATION DEVELOPMENT[18CSMP68]

Mini Project Report

On

BULLZ EYE
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT IN 6TH SEMESTER

MOBILE APPLICATION DEVELOPMENT PROJECT WORK (18CSMP68) OF BACHELOR OF ENGINEERING

IN

By

PRIYANKA GAVAROJI 4VM18CS031


YASHASWINI K N 4VM18CS047

UNDER THE GUIDANCE OF

Prof. Ambika K B
Assistant Professor
Dept. of CSE, VVIET

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

VIDYA VIKAS INSTITUTE OF ENGINEERING & TECHNOLOGY

#127-128, Mysore - Bannur Road, Alanahally, Mysuru, Karnataka 570028


Vidya Vikas Educational Trust ®
VIDYA VIKAS INSTITUTE OF ENGINEERING &
TECHNOLOGY

#127-128, Mysore - Bannur Road, Alanahally, Mysuru, Karnataka 570028


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

Certified that the MAD Mini Project Work entitled “Bullz Eye ” carried out by PRIYANKA
GAVAROJI [4VM18CS031] and YASHASWINI KN [4VM18CS047], bonafide students of VVIET in
partial fulfillment for the award of degree Bachelor of Engineering in COMPUTER SCIENCE and
ENGINEERING as prescribed by VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELGAUM
during the academic year 2020-21. It is certified that all corrections/suggestions indicated for internal
assessment have been incorporated in the report deposited in the departmental library. The project
report has been approved as it satisfies the academic requirements in respect of mini project work
prescribed for the said degree.

[Mr. SAGAR B] [Dr. MADHU B K]

Assistant Professor Professor & HOD


Dept. of CSE Dept. of CSE
EXTERNAL VIVA

Name of the examiners Signature with date

1.

2.
ACKNOWLEDGEMENT

We would like to thank and express our heartfelt gratitude to God almighty for the
abundant blessings without which this project would not have been successful.

We would like to express our sincere gratitude to Sri. Vasu, Chairman of VVIET,
Mr. Kaveesh Gowda V, Secretary of VVIET and all management members of VVIET, for their
constant support.

We acknowledge and express our sincere thanks to our beloved Principal

Dr. Ravishankar M, VVIET, Mysuru who is the source of inspiration.

We would like to express our deepest sense of gratitude towards Dr. Madhu B K, Head
of the Department, CSE, VVIET, Mysuru for his valuable suggestions, support and
encouragement.

We would like to extend our heartfelt gratitude to Mr. Theja N, Assistant Professor,
Dept. of CSE, for the valuable guidance and advice. We would also like to thank him for his
guidance and useful suggestions, which helped us in completing the project work on time.

We would also thank all other teaching and non-teaching staffs of the Computer

Science Department who has directly or indirectly helped us in completion of this project.

Our thanks and appreciation also go to our family and friends who have willingly helped
us out with their abilities.

Regards,

PRIYANKA GAVAROJI
YASHASWINI K N
ABSTRACT

Computer Graphics is concerned with all aspects of producing pictures or images using a
computer. Using computer graphics, we can create images by computers that are
indistinguishable from photographs of real objects. We are implementing our project using a
particular graphics software system OPENGL. OpenGL is strictly defined as “a software
interface to graphics hardware.” In essence, it is a 3D graphics and modelling library that is
extremely portable and very fast.
Using OpenGL, you can create elegant and beautiful 3D graphics with nearly the visual quality.
OpenGL is intended for use with computer hardware that is designed and optimized for the
display and manipulation of3D graphics. OpenGL is used for a variety of purposes, from CAD
engineering and architectural applications to computer-generated dinosaurs in blockbuster
movies. This project is using OpenGL for the simulations of 3D objects of balls floating in the air
and the user using arrows allotted to him has to break the ball’s movement. If he gets a hit his
counter moves up and if he cannot break the required number of times, he will prompted with
the window of losing, else with the prompt of winning.
TABLE OF CONTENTS

Acknowledgement i

Abstract ii

Table of contents iii

List of Figures 5

1. Introduction 1-3

1.1 Overview 1

1.2 Introduction to OpenGL 2

1.3 Objectives 3

2. Literature Survey 4-5

2.1 Related work

3. System requirements and Specifications 6-7

3.1 Functional Requirements 6

3.2 Non functional Requirements 6

3.3 Software Requirements 7

3.4 Hardware Requirements 7

3.5 Introduction to Environment 7

4. Design 8-11
4.1 High level design 8

4.2 Software Design 10

5. Implementation 11-19

5.1 Libraries Used 11

5.2 Explanation of Functions 11

5.3 User defined Functions 12

5.3.1 Init Function 12

5.3.2 Drawhit Function 13

5.3.3 Myhit Function 13

5.3.4 Draw Instructions Function 13

5.3.5 Instruction Function 14

5.3.6 Display Function 14

5.3.7 Display2 Function 16

5.3.8 Display lost Function 17

5.3.9 Keyboard Function 17

5.3.10 Main Function 17

5.4 Algorithm 18

5.5 Flow chart 19

6. Snapshots 20-23

7. Coding 24-39

8. Conclusion 40
CHAPTER 1 INTRODUCTION

1.1 Overview
Graphics and processing has taken the world by storm. There were times when a simple game
would require computations of a ton and would make it very difficult to implement. Times
change and so do our belief and understanding of our computers. We have evolved from the
times of tic-tac-toes to the ages of where games have their own AI built into the system to deliver
the best of experience a person can have by gaming. The bullz eye game is the earliest of the
games that had been developed with a simple concept of hitting a moving ball with arrows. The
user had a limited number of arrows and he had to finish a certain task within 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, it is considered as a point. The project
uses the concepts of OpenGL 3D as the balls are represented as spheres and have depth to them
and shades of color appear for the spheres as the lighting effects have been used on the balls
making them look more realistic and true to life. It gives the user an nostalgic experience having
to play such an easy game with the code implementation true to his liking. Bullz Eye has been a
very famous game from the beginning of the era of games as it emerged to be an engaging and
easy to play as the instruction of the game is simply to press a button and to rely completely on
instinct.
How to play
This game has two levels
• 1st level-The main aim is to strike the balls thrice within the given number of arrows which
is 30.Upon winning this the user moves to the next level. If the user is unable to accomplish
this he loses the game.
• The user can directly jump to the second level without playing the first level.
• 2nd level-The main aim is to strike the balls thrice within the given number of arrows which
is 20.If the user is unable to accomplish this he loses the game.
1.2 INTRODUCTION TO OPENGL
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 modern windowing system.

Fig 2.1 shows 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.
GLU

GL Frame
OpenGL Buffer
application Xlib, Xtk
Program
GLUT

GLX

Fig 1.2 Library organization

OpenGL Command Syntax:

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).

1.3 Objective
The bullz eye game is just a way of demonstration of the concepts of the 3D capabilities of
OpenGL using which codes and logic can be put together and form a real life problem and
simulate it onto the level of devices.
The field of computer graphics has already got to a stage of maturity so that its applications are
being widely used. Therefore, the underlying education in this field heavily depends on the goals
and skills of the corresponding area of application. The inclusion of computer graphics education
in Informatics Engineering courses is obviously mandatory. The results of some succeeded
experiments are referred, along with the most relevant relationships with other disciplines.
Important questions regarding the future of computer graphics education in the scope of
Informatics Engineering are also considered.
CHAPTER 2

LITERATURE SURVEY
The OpenGL Programming Guide - The Redbook

The OpenGL Programming Guide 5th Edition The Official Guide to Learning
OpenGL Version 2.1
The OpenGL Programming Guide, Fifth Edition, provides definitive and comprehensive
information on OpenGL and the OpenGL Utility Library. The previous edition covered OpenGL
through Version 1.3 and 1.4. This fifth edition of the best-selling "red book" describes the latest
features of OpenGL Versions 1.5 and 2.0, including the introduction of the OpenGL Shading
Language. You will find clear explanations of OpenGL functionality and many basic computer
graphics techniques, such as building and rendering 3D models; interactively viewing objects
from different perspective points; and using shading, lighting, and texturing effects for greater
realism. In addition, this book provides in-depth coverage of advanced techniques, including
texture mapping, antialiasing, fog and atmospheric effects, NURBS, image processing, and more.
The text also explores other key topics such as enhancing performance, OpenGL extensions, and
cross-platform techniques. This fifth edition has been extensively updated to include the newest
features of OpenGL, versions 1.5 and 2.0.
www.opengl.org for OpenGL tutorials

Pervisim offers consulting and software development for visualization leveraging OpenGL

Pervisim is a new consulting and software development firm located in Cary, NC that
specializes in 3D visualization applications. Recently completed and revived projects include
mashup visualizations that create terrain visualizations in 3D pdf and molecular modeling
using OpenGL.

VSFL – Very Simple Font Library


Text rendering is very useful to display information on top of a 3D world. VSFL aims at
providing users with the ability to render bitmapped text in an OpenGL application using the core
profile. With immediate mode gone in core OpenGL versions, so are the vast majority of font libs
that worked with OpenGL. Immediate mode was terribly slow, and code wise very extensive.
Vertex Buffers are clearly the way to go. This lib uses VAOs and vertex buffers to render text.
Render Stream 21.6 Teraflop Servers and Workstations for OpenCL -OpenGL
Render Stream announced its AMD Radeon based 21.6 teraflop servers and workstations for
OpenCL / OpenGL / Brooks based applications and product development. The workstations offer
1,536 stream processors and eight GPUs per system, which provide access to 12,288 cores and
21.6 TFLOPS of aggregate compute power. As an example from information security, the HD
6970 and HD 6990 based VDACTr8 evaluated over 45 billion solutions per second versus 18
billion for the GTX 580 based systems, depending on the implementation.

Third part of an in-depth tutorial to OpenGL


The last part of this series about OpenGL and OpenGL ES on DB-Interactively blog. The other
tutorials came with a sample project to iPhone/iPad and covered the most important concepts of
OpenGL. This last tutorial comes with a lot of information’s about how to make 2D applications
using OpenGL. As well, this tutorial brings:
• Multisampling
• PVRTC and textures
• Optimizations
CHAPTER 3

SYSTEM REQUIREMENTS AND SPECIFICATIONS


A software requirement definition is an abstract description of the services which the system
should provide, and the constraints under which the system must operate. It should only specify
the external behavior of the system.

3.1 Functional Requirements


Functional Requirements define the internal working of the software. The following conditions
must be taken care of: The ability to perform correct operations when corresponding keys are
pressed.

3.2 Non-functional Requirements


Non-functional requirements are requirements which specify criteria that can be used to judge
the operation of the system, rather than specific behaviors. This should be contrasted with
functional requirements that specify specific behavior or functions. Typical non-functional
requirements are reliability and scalability. Non-functional requirements are “constraints”,
“quality attributes” and “quality of service requirements”.

Types of non-functional requirements

Volume:
Volume of a system (the total space occupied) varies depending on how the component
assemblies are arranged and connected.
Reliability:
System reliability depends on component reliability but unexpected interactions can cause new
types of failure and therefore affect the reliability of the system.
Security:
The security of the system (its ability to resist attacks) is a complex property that cannot be easily
measured. Attacks maybe devised that were not anticipated by the system designers and the may
use default built-in safeguard.
Reparability:
This property reflects how easy it is to fix a problem with the system once it has been discovered.
It depends on being able to diagnose the problem, access the components that are faulty and
modify or replace these components.
Usability:
This property reflects how easy it is to use the system. It depends on the technical system
components, its operators and its operating environment.

3.3 Software Requirements


Microsoft Visual C++ / code blocks
OpenGL

3.4 Hardware Requirements

System : Pentium IV 2.4 GHz or above


Hard Disk : 40 GB or above
Monitor : 15 VGA color
RAM : 256 MB or above

3.5 Introduction to Environment

OpenGL is a software interface to graphics hardware. This interface consists of about 120
distinct commands, which you use to specify the objects and operations needed to produce
interactive three-dimensional applications.
OpenGL is designed to work efficiently even if the computer that displays the graphics you
create isn’t the computer that runs your graphics program. This might be the case if you work in
a networked computer environment where many computers are connected to one another by
wires capable of carrying digital data.
In this situation, the computer on programs can work across a network even if the client and
server are different kinds of computers. If an OpenGL program isn’t running which your program
runs and issues OpenGL drawing commands is called the client, and the computer that receives
those commands and performs the drawing is called the server. The format for transmitting
OpenGL commands (called the protocol) from the client to the server is always the same, so
OpenGL across a network, then there’s only one computer, and it is both the client and the
server.
CHAPTER 4
DESIGN
Requirement analysis encompasses all the tasks that go into the instigation, scoping and
definition of a new or altered system. Requirement analysis is an important part of
the design process. Here we identify the needs or requirements. Once the requirements have been
identified the solution for the requirements can be designed. We a design a project with
specific goals, tasks and outcomes. The more specific and the more closely aligned with
traditional instructional objectives, the better.

4.1 High Level Design


High Level Design (HLD) is the overall system design - covering the system architecture and
database design. It describes the relation between various modules and functions of the system.
Data flow, flow charts and data structures are covered under HLD. The different modules used in
this project are as follows:

1. glutInit( int *argcp, char **argv);


The argument 'argcp' is a pointer to the program’s unmodified 'argv' variable from main. Upon
return, the value pointed to by 'argcp' will be updated, because glutInit extracts any command
line options intended for the GLUT library 'argv'. Like argcp, the data for argv will be
updated because glutInit extracts any command line options understood by the GLUT library.

2. glutInitDisplayMode(unsigned int mode);


It sets the initial display mode. The argument 'mode' is the display mode, normally
the bitwise OR-ing of GLUT display mode bit masks.
See values below:

• GLUT SINGLE : Bit mask to select a single buffered window. This is the default if
neither GLUT_DOUBLE or GLUT_SINGLE are specified.
• GLUT RGB : Bit mask to select a RGBA mode window.

3. glutSwapBuffers(void);
Performs a buffer swap on the layer in use for the current window.
4. glutMainLoop(void);
The module glutMainLoop enters the GLUT event processing loop. This routine should be
called at most once in a GLUT program. Once called, this routine will never return. It will call as
necessary any callbacks that have been registered.
5. glutCreateWindow(char *name);
This creates a top-level window. The argument 'name' is provided to the system as the window’s
name with the intent that the window system will label the window with the name.
6. glutDisplayFunc(void (*func)(void));
Sets the display callback for the current window. The 'func' is the new display callback function.
7. glLoadIdentity(void);
It replaces the current matrix with the identity matrix. It is semantically equivalent to
callingglLoadMatrix with the 4X4 identity matrix.
8. glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampfalpha);
Specifies the red, green, blue, and alpha values used when the color buffers are cleared. The intial
values are all 0. Values specified by glClearColor are clamped to the range [0-1].
9. glutReshapeFunc(void (*func)(int width, int height));
This sets the reshape callback for the current window. The reshape callback is triggered when a
window is reshaped. A reshape callback is also triggered immediately before a window's first
display callback after a window is created or whenever an overlay for the window is established.
10. gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear,GLdouble zFar);
The parameter 'fovy' specifies the field of view angle in the y direction, 'aspect' specifies the
aspect ratio that determines the field in the x direction, 'zNear' specifies the distance from the
viewer to the near clipping plane and 'zFar' specifies the distance from the viewer to the far
clipping plane. This module specifies a viewing frustum into the world coordinate system.
11. glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
The parameters ‘x’, ‘y’ specify the lower left corner of the viewport rectangle, in pixels.
The parameters ‘width’, ‘height’ specify the width and height of the viewportglViewport
specifies the affine transformation of x and y from normalized device coordinates to window
coordinates.
12. glTranslatef(GLfloat x, GLfloat y, GLfloat z);
The parameters ‘x’, ‘y’, ‘z’ specify the x, y, and z coordinates of a translation vector.
This produces a translation by x, y, z. The current matrix is multiplied by this translation matrix,
with the product replacing the current matrix.
13. glScaled(GLdouble x, GLdouble y, GLdouble z);
The parameters ‘x’, ‘y’, ‘z’ s pacify the scale factors along the x, y, and z axes, respectively.
This produces a no uniform scaling along the x, y, and z axes.

SOFTWARE DESIGN
This project has been created using the OpenGL interface along with the GLUT( OpenGL
Library Toolkit), using the platform Eclipse as the compiling tool. This game has been
designed in a simple and lucid manner so that further developments can be made, and run on
many platforms with a few changes in the code.
We begin our game by providing a simple menu option upon right click of the mouse to
display 2 levels of the game which the user can choose, and a third option to exit the game.
Upon selecting the first level, a red ball is continuously produced and moves upwards at the
right side of the screen. Hitting the ‘f’ key on the keyboard produces an arrow, which the user
must aim to hit the balls with. On successful contact with the ball, the game registers it as a
‘HIT’ and increments a counter variable. A count of 3 (i.e 3 hits) takes the player to the next
level of the game.
Level 2 increases the difficulty level by producing2 colours of balls- a blue one and a red one.
While the red is as before produced continuously and moves from bottom to top, the blue one
moves from top to bottom at irregular intervals to confuse the player. The player needs to aim
correctly and target only the red ones. Player needs to again score a minimum of 3 ‘hits’ to be
a Winner.
Level 2 can be directly entered in the beginning itself ( without playing level 1). We provide
this option so that the player can choose his difficulty level.
The underlying logic of the game is Collision detection. The bounds of the ball are detected
with the bounds, or the continuously changing position of the arrow head. 2 variables ‘pos’
(for the arrowhead) and ‘up’ (for the ball) are kept tab of, and are updated with their changing
Values
If the given position vector does intersect with the current value of the ‘up’, we infer that a
collision has been detected and register it as a hit, and increment ‘counter’. Other wise the
function returns a NULL.
Once a ‘hit’ takes place, we call a Sleep() timer ( as buffers are too fast to see the collision in
our game), show the ball burst ( without particle effect or engines) and reset the ball to its
initial position and the cycle starts all over again.
Careful observation of these values have been made while developing the game.
To model the objects as 3D entities we also use the effects of lighting in our game via 4
different mechanisms:
AMBIENT - light that comes from all directions equally and is scattered in all directions
equally by the polygon.
DIFFUSE - light that comes from a point source and hits surfaces with an intensity that
depends on whether they face towards the light or away from it. SPECULAR - light is
reflected more in the manner of a mirror where most of the light bounces off in a particular
direction defined by the surface shape.
EMISSION - the light is actually emitted by the polygon - equally in all directions.
Texture is yet another feature we have implemented to show the material properties of the
object, in whichever small way we could.
CHAPTER 5
IMPLEMENTATION
Implementation is the process of putting a decision into effect. It is an act or instance of
implementing something that is, the process of making something active or effective.
Implementation must follow any preliminary thinking in order for something to actually happen.
In the context of information technology, implementation encompasses the process involved in
getting new software or hardware to operate properly in its environment. This includes
installation, configuration, running, testing and making necessary changes. The word
deployments sometime used to mean the same thing.

5.1 Libraries Used


OpenGL function names begin with the letters gl and are stored in a library usually referred to as
GL (or OpenGL in Windows). The first is the

OpenGL Utility Library (GLU).


This library uses only GL functions but contains code for creating common objects, such as
spheres, and other tasks that users prefer not to write repeatedly. The GLU library is available in
all OpenGL implementations. The second library addresses the problems of interfacing with the
window system. We use a readily available library called the
OpenGL Utility Toolkit (GLUT) that provides the minimum functionality that should be
expected in any modern windowing system. The GLX library provides the minimum “glue”
between OpenGL and the XWindow System. GLX is used by GLUT, and thus this library and
various others are called from the OpenGL libraries, but the application program does not need to
refer to these libraries directly. Strings such as GL_FILL and GL_POINTS are defined in header
(.h) files. In most implementations, one of the “include” lines.

5.2 Explanation of Functions

glTranslatef
Alters the current matrix by a displacement of (x,y,z). TYPE is either GLfloat orGLdouble.hg .

glMatrixMode: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 stack.
• GL_TEXTURE -Applies subsequent matrix operations to the texture matrix stack.
• GL_COLOR -Applies subsequent matrix operations to the color matrix stack.

glPushMatrix and glPopMatrix : Pushes to and pops from the matrix stack corresponding to the
current matrix mode.
glBegin : Initiates a new primitive of type mode and starts the collection of vertices. Values of
mode include GL_POINTS, GL_LINES and GL_POLYGON.
glEnd : Terminates a list of vertices.

5.3 User Defined Functions


A programmed routine that has its parameters set by the user of the system. User defined
functions often are seen as programming shortcuts as they define functions that perform specific
tasks within a larger system, such as a database or spreadsheet program.

5.3.1 Init Function


Sets the background color for the game and enables light source to provide the following
lighting effects:
• AMBIENT - light that comes from all directions equally and is scattered in all directions equally
by the polygon.
• DIFFUSE - light that comes from a point source and hits surfaces with an intensity that depends
on whether they face towards the light or away from it.
• SPECULAR - light is reflected more in the manner of a mirror where most of the light bounces
off in a particular direction defined by the surface shape.
• EMISSION - the light is actually emitted by the polygon - equally in all directionsIt also sets the
Material for the object and enables this option to provide different surface textures to our
objects.

void init(void)
{
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };GLfloat mat_shininess[] = { 100.0 };GLfloat
mat_diffuse[]={ 1.0,1.0,1.0,1.0};GLfloat mat_ambient[]={0.0,0.0,0.0,1.0};GLfloat
light_position[] = { 1.0, 1.0, 0.0, 0.0 };glClearColor (1.0, 1.0, 0.0, 1.0);glShadeModel
(GL_SMOOTH);glMaterialfv(GL_FRONT, GL_SPECULAR,
mat_specular);glMaterialfv(GL_FRONT, GL_SHININESS,
mat_shininess);glMaterialfv(GL_FRONT, GL_DIFFUSE,
mat_diffuse);glMaterialfv(GL_FRONT, GL_AMBIENT,
mat_ambient);glLightfv(GL_LIGHT0, GL_POSITION,
light_position);glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFU
SE);glEnable(GL_LIGHTING);glEnable(GL_LIGHT0);glEnable(GL_DEPTH_TEST);glE
nable(GL_COLOR_MATERIAL);

5.3.2 Drawhit Function


It draws text in Stroke Character font. A stroke font is a 3D font. As opposed to bitmap fonts
these can be rotated, scaled, and translated. The GLUT_STROKE_ROMAN font is used here.
The text can be placed anywhere on the screen using Translatef() and scaled to any size as
needed using Scalef().

void drawhit(const char * message, int x,


int y){glPushMatrix();glScalef(0.07,0.06,0.15);glTranslatef(x,y,0);while
(*message){glutStrokeCharacter(GLUT_STROKE_ROMAN,*message++);}
glPopMatrix();}

5.3.3 Myhit Function


This function is primarily to display text on screen. glBlendFunc defines the operation of
blending when it is enabled. We also set the antialiasing for lines and set the line width to prepare
to draw our text as Stroke Characters.
void
myHit(){glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_PROJECTION);glLoad
Identity();gluOrtho2D(0,200,0,200);glMatrixMode(GL_MODELVIEW);glClearColor(1.0,1
.0,0.0,1.0);glColor3f(0.0,0.8,0.8);glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_
ALPHA);glEnable(GL_BLEND);glEnable(GL_LINE_SMOOTH);glLineWidth(4.0);drawh
it("WINNER!!",1125,2000);}

5.3.4 Draw Instruction Function


It draws text in Stroke Character font. A stroke font is a 3D font. As opposed to bitmap fonts
these can be rotated, scaled, and translated. The GLUT_STROKE_ROMAN font is used here.
The text can be placed anywhere on the screen using Translatef() and scaled to any size as
needed using Scalef().
void draw_instruct(const char *message, int x, int y){int
j;glPushMatrix();glScalef(0.063,0.07,0.0);glTranslatef(x,y,0);while
(*message){glutStrokeCharacter(GLUT_STROKE_ROMAN,*message++);}for(j=0;j<1000
0;j++);glPopMatrix();}

5.3.5 Instruction Function


It creates a separate instruction page where the instructions are displayed on another window
using StrokeCharacter font, and translated to appropriate postions on the screen.
void
instructions(){glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_PROJECTION);gl
LoadIdentity();

gluOrtho2D(0,200,0,200);glMatrixMode(GL_MODELVIEW);glClearColor(1.
0,1.0,0.0,1.0);glColor3f(1.0,0.0,1.0);glBlendFunc(GL_SRC_ALPHA, GL_ONE
_MINUS_SRC_ALPHA);glEnable(GL_BLEND);glEnable(GL_LINE_SMOO
TH); glLineWidth(3.0);draw_instruct("HKBK College
of Engineering",600,2600);draw_instruct("Department of Computer
Science",400,2400);draw_instruct("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
",0,1850);draw_instruct("Mini-
Project with OpenGL",700,2200);draw_instruct("BULLZ-EYE
with OpenGL",700,2000);draw_instruct("By:",1400,1700);draw_instruct("Ak
ash Kumar Jain S (1HK15CS007)",400,1500);draw_instruct("N
Rohit Vishal (1HK14CS039)",600,1300);draw_instruct("~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~",0,850);draw_instruct("Guided by Asst.
Professor Pakaruddin Basha",180,1000);draw_instruct("Welcome to BULLZ-
EYE",700,700);draw_instruct("Press Enter. Left click on mouse to
play",250,500);draw_instruct("Press Space to shoot",800,300);glFlush();}

5.3.6 Display Function


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().
Display1():
• It plays the Level 1 of the game. It initially sets the the red ball to a position given by
‘up’ variable, and using the Translatef() function it displaces only the y-coordinate of the
ball upwards.
• glutSolidSphere() renders a 3D sphere with radius, slices and stack as parameters.
• While the ‘f’ key is pressed, the function creates an arrow head, and associates a
variable ‘pos’ with it, to translate the arrow towards the right in a single direction. This
variable is incremented continually every time and called with the Translatef() to
redraw the arrow at new positions.
• If the condition for bounds satisfy, that means collision has occurred, and counter1 is
incremented to register a hit. The flag ‘bang’ is set to 1, so that when encountered
during the next iteration the following changes can take place: position of sphere is
reset to 0, bang is reset to 0 (to prepare for next hit), position of arrow is reset.
• ‘up’ variable is continually incremented to keep the ball moving upwards for a large
number of iterations by calling glutPostRedisplay() everytime. It marks the normal plane
of current window as needing to be redisplayed with the same specifications.
• The counter1 value is checked for every iteration. Once it has reached a value of 3, Display2() is
called to play Level 2 of the game.

void display1()
{
int
i;if(counter1==1){display2();glFlush();}else{ int j;for(j=0;j<10000;j++);glClear
Color(1.0,1.0,1.0,1.0);glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUF
FER_BIT);glPushMatrix();glColor3f(1, 1, 0);glRasterPos2f(-
0.9, 0.9);sprintf(tmp_str, "Arrow count: %d",
count);Write(tmp_str);glPopMatrix();if(count>=30)glutDisplayFunc(displost);
glPushMatrix();glColor3f(1, 1, 0);glRasterPos2f(-0.2, 0.9);
sprintf(tmp_str, "Score: %d",
counter1);Write(tmp_str);glPopMatrix();glPushMatrix();glColor3f(1.0,0.0,0.0
);glLoadIdentity();glTranslatef(0.8,-
0.869+up,0.0);glutSolidSphere(0.13,20,16);if(shoot==1){glPushMatrix();glLoa
dIdentity();glTranslatef(-
0.8+pos,0.0,0.0);glColor3f(0.0,0.0,0.0);glLineWidth(2.0);glBegin(GL_LINES);
glVertex3f(-
0.2,0.0,0.0);glVertex3f(0.1,0.0,0.0);glVertex3f(0.1,0.0,0.0);glVertex3f(0.03,0.05,
0.0);glVertex3f(0.1,0.0,0.0);glVertex3f(0.03,-
0.05,0.0);glEnd();glPopMatrix();}if(bang==1){bang=0;pos=-
0.2;glPushMatrix();glLoadIdentity();up=0;glColor3f(1.0,0.0,0.0);glutSolidSph
ere(1,20,16);glPopMatrix();}glPopMatrix();for( i=0;i<200;i=i+20){if(pos>=1.74
&& up>0.825 && up<0.975){counter1 ++;for(j=0;j<10000;j++);shoot=0;pos=-
0.2;bang=1;}if(counter1==3)count=0;up=(up+0.0003);
if(up>2)up=0;if(shoot==1){pos=pos+0.0005;if(pos>2){pos=-
0.2;shoot=0;}}glutPostRedisplay();glFlush();}}}

5.3.7 Display2 Function


• It enters the Level 2 of the game. It initially sets the the red ball to a position given by
‘up’ variable, and using the Translatef() function it displaces only the y-coordinate of the
ball upwards.
• Also, it sets the blue balls position and using the Translatef() function it displaces only the
y-coordinate of the ball downwards.
• glutSolidSphere() renders a 3D sphere with radius, slices and stack as parameters.
• While the ‘f’ key is pressed, the function creates an arrow head, and associates a variable
‘pos’ with it, to translate the arrow towards the right in a single direction. This variable is
incremented continually every time and called with the Translatef() to redraw the arrow at
new positions.
• If the condition for bounds satisfy, that means collision has occurred, and counter1 is
incremented to register a hit. The flag ‘bang’ is set to 1, so that when encountered during
the next iteration the following changes can take place: position of sphere is reset to 0,
bang is reset to 0 (to prepare for next hit), position of arrow is reset.
• ‘up’ variable is continually incremented to keep the ball moving upwards for a large
number of iterations by calling glutPostRedisplay() every time. It marks the normal plane
of current window as needing to be redisplayed with the same specifications. The
counter2 value is checked for every iteration. Once it has reached a value of 3, myHit() is
called to display that the player is a winner.

void display2(){int i;if(counter2==1){myHit();glFlush();}else{int


j;for(j=0;j<10000;j++);glClearColor(1.0,1.0,1.0,1.0);glClear(GL_COLOR_BUFFER_BIT|GL_
DEPTH_BUFFER_BIT);glLoadIdentity();glPushMatrix();glColor3f(1, 1, 0);glRasterPos2f(-
0.9, 0.9);sprintf(tmp_str, "Arrow count: %d",
count);Write(tmp_str);glPopMatrix();if(count>=20)glutDisplayFunc(displost);glPushMa
trix();glColor3f(1, 1, 0);glRasterPos2f(-0.2, 0.9);sprintf(tmp_str, "Score: %d",
counter2);Write(tmp_str);glPopMatrix();glPushMatrix();glColor3f(1.0,0.0,0.0);
glLoadIdentity();glTranslatef(0.8,-
0.769+up,0.0);glutSolidSphere(0.10,20,16);glColor3f(0.0,0.0,1.0);glPushMatrix();glColor
3f(0.0,0.0,1.0);glLoadIdentity();glTranslatef(0.4,0.769-
up,0.0);glutSolidSphere(0.10,20,16);glColor3f(0.0,0.0,1.0);if(shoot==1){glPushMatrix();
glLoadIdentity();glTranslatef(-
0.8+pos,0.0,0.0);glColor3f(0.0,0.0,0.0);glLineWidth(2.0);glBegin(GL_LINES);glVertex3f(-
0.2,0.0,0.0);glVertex3f(0.1,0.0,0.0);glVertex3f(0.1,0.0,0.0);glVertex3f(0.03,0.05,0.0);glV
ertex3f(0.1,0.0,0.0);glVertex3f(0.03,-
0.05,0.0);glEnd();glPopMatrix();}if(bang==1){bang=0;pos=-
0.2;glPushMatrix();glLoadIdentity();up=0;glColor3f(1.0,0.0,0.0);glutSolidSphere(1,20,16
);glPopMatrix();}glPopMatrix();for( i=0;i<200;i=i+20){if(pos>=1.75 && up>0.825
&& up<0.975){counter2 ++;for(j=0;j<10000;j++);shoot=0;pos=-0.2;
bang=1;}up=(up+0.0003);if(up>2)up=0;if(shoot==1){pos=pos+0.0005;if(pos>2){pos=
-0.2;shoot=0;}}glutPostRedisplay();}}glFlush();}

5.3.8 Display Lost Function


void
displost(){glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_PROJECTION);glLoa
dIdentity();gluOrtho2D(0,200,0,200);glMatrixMode(GL_MODELVIEW);glClearColor(1.0,
1.0,0.0,1.0);glColor3f(0.0,0.8,0.80);glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SR
C_ALPHA);glEnable(GL_BLEND);glEnable(GL_LINE_SMOOTH);glLineWidth(4.0);dra
whit("YOU LOST!!",1100,2000);glFlush();}

5.3.9 Keyboard Function


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.
void keyboard(unsigned char key,int x,int y)
{if
(key==32){shoot=1;count++;}if(key==13){glutInitDisplayMode(GLUT_DEPTH|GLUT_RG
B);
glutInitWindowSize(700,700);glutInitWindowPosition(300,0);game=glutCreateWindow("B
ullz Eye");init();
17glutDisplayFunc(display);glutKeyboardFunc(keyboard);glutCreateMenu(choose);glutAd
dMenuEntry("PlayLevel1",1);glutAddMenuEntry("PlayLevel2",2);glutAddMenuEntry("
Quit",3);glutAttachMenu(GLUT_LEFT_BUTTON);}}

Main():
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.
• glutInit(int *argc, char **argv) - parameters are pointers to the unmodified argc and argv
variables from the main function.
• We establish the window's position by using the function glutInitWindowPosition.
• We choose the window size using the function glutInitWindowSize.
• We define the display mode using the function glutInitDisplayMode. GLUT_RGB -
selects a RGBA window. This is the default color mode. GLUT_SINGLE – selects a
single buffer window.
• Each window can be created with glutCreateWindow. The return 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 call-back for
keyboard events that occur when you press a key.
• Creating a menu: glutCreateMenu creates a menu table on a default right click of mouse.
glutAddMenuEntry adds a menu entry to this menu created.
• When we are ready to get in the application event processing loop we enter
glutMainLoop. It gets the application in a never ending loop, always waiting for the next
event to process

5.4 Algorithm
1. Start
2. Display instruction() window.
3. If “enter” is hit, create the game window. Else wait.
4. If LEFT MOUSE CLICK,
5. Switch 1: Play level 1. If win, move to level 2, else displost().
6. Switch 2: Play level 2. If win, display win prompt, else displost().
7. Switch 3: Quit game.
8. End.
5.5 Flowchart Fig:4.1
CHAPTER 6
SNAPSHOTS

Welcome page

Choice page
Level 1 Page
Level 2 Page
Winner Page

Loser Page
CHAPTER 7
CODING

#include<stdlib.h>

#include<stdio.h>

#include<string.h>

#include<GL/glut.h>

#include<time.h>

#include<math.h>

//#include<windows.h>

static GLfloat up=-0.2;

static GLfloat pos=-0.2;

int shoot=0,bang=0;

int counter1=0,counter2=0,count=0;

int game,instruct;

char tmp_str[40];

void display2();

void displost();

void init(void)

GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };


GLfloat mat_shininess[] = { 50.0 };

GLfloat mat_diffuse[]={ 1.0,1.0,1.0,1.0};

GLfloat mat_ambient[]={0.0,0.0,0.0,1.0};

GLfloat light_position[] = { 1.0, 1.0, 0.0, 0.0 };

glClearColor (0.0, 0.0, 0.0, 0.0);

glShadeModel (GL_SMOOTH);

glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);

glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);

glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);

glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);

glLightfv(GL_LIGHT0, GL_POSITION, light_position);

glColorMaterial(GL_FRONT_AND_BACK,

GL_AMBIENT_AND_DIFFUSE);

glEnable(GL_LIGHTING);

glEnable(GL_LIGHT0);

glEnable(GL_DEPTH_TEST);

glEnable(GL_COLOR_MATERIAL);

void drawhit(const char * message, int x, int y)

glPushMatrix();
glScalef(0.3,0.2,0.15);

glTranslatef(x,y,0);

while (*message)

glutStrokeCharacter(GLUT_STROKE_ROMAN,*message++);

glPopMatrix();

void myHit()

glClear(GL_COLOR_BUFFER_BIT);

glMatrixMode(GL_PROJECTION);

glLoadIdentity();

gluOrtho2D(0,200,0,200);

glMatrixMode(GL_MODELVIEW);

glClearColor(1.0,0.0,0.5,1.0);

glColor3f(0.0,0.8,0.80);

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glEnable(GL_BLEND);

glEnable(GL_LINE_SMOOTH);

glLineWidth(4.0);
drawhit("WINNER!!",70,550);

void draw_instruct(const char *message, int x, int y)

int j;

glPushMatrix();

glScalef(0.1,0.1,0.0);

glTranslatef(x,y,0);

while (*message)

glutStrokeCharacter(GLUT_STROKE_ROMAN,*message++);

for(j=0;j<10000;j++);

glPopMatrix();

void instructions()

glClear(GL_COLOR_BUFFER_BIT);

glMatrixMode(GL_PROJECTION);

glLoadIdentity();

gluOrtho2D(0,200,0,200);
glMatrixMode(GL_MODELVIEW);

glClearColor(1.0,0.7,0.0,1.0);

glColor3f(1.0,0.5,0.1);

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glEnable(GL_BLEND);

glEnable(GL_LINE_SMOOTH);

glLineWidth(4.0);

draw_instruct("Instructions",600,1850); // change1

draw_instruct("Right click on mouse",300,1700);

draw_instruct("to play",300,1500);

draw_instruct("Press f to shoot",300,1300);

glFlush();

void Write(char *string)

glScalef(0.02,0.02,0.0);

while(*string)

glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18,

*string++);

void display1()
{

int i;

if(counter1==3)

display2();

glFlush();

else

{ int j;

for(j=0;j<10000;j++);

glClearColor(1.0,0.7,0.0,1.0);

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glPushMatrix();

glColor3f(1, 1, 0);

glRasterPos2f(-0.9, 0.9);

sprintf(tmp_str, "Arrow count: %d", count);

Write(tmp_str);

glPopMatrix();

if(count>=30)

glutDisplayFunc(displost);

glPushMatrix();
glColor3f(1, 1, 0);

glRasterPos2f(-0.2, 0.9);

sprintf(tmp_str, "Score: %d", counter1);

Write(tmp_str);

glPopMatrix();

glPushMatrix();

glColor3f(1.0,0.0,0.0);

glLoadIdentity();

glTranslatef(0.8,-0.869+up,0.0);

glutSolidSphere(0.15,20,16);

if(shoot==1)

glPushMatrix();

glLoadIdentity();

glTranslatef(-0.8+pos,0.0,0.0);

glColor3f(0.0,0.0,0.0);

glLineWidth(2.0);

glBegin(GL_LINES);

glVertex3f(-0.2,0.0,0.0);

glVertex3f(0.1,0.0,0.0);

glVertex3f(0.1,0.0,0.0);
glVertex3f(0.03,0.05,0.0);

glVertex3f(0.1,0.0,0.0);

glVertex3f(0.03,-0.05,0.0);

glEnd();

glPopMatrix();

if(bang==1)

bang=0;pos=-0.2;

glPushMatrix();

glLoadIdentity();

up=0;

glColor3f(1.0,0.0,0.0);

glutSolidSphere(1,20,16);

glPopMatrix();

glPopMatrix();

for( i=0;i<200;i=i+20)

if(pos>=1.74 && up>0.825 && up<0.975)

//collision detection
{

counter1 ++;

for(j=0;j<10000;j++);

shoot=0;

pos=-0.2;

bang=1;

if(counter1==3)

count=0;

up=(up+0.005);

if(up>2)

up=0;

if(shoot==1)

pos=pos+0.009;

if(pos>2)

pos=-0.2;

shoot=0;

}
glutPostRedisplay();

glFlush();

void display2()

{int i;

if(counter2==3)

{ myHit();

glFlush();

else

{int j;

for(j=0;j<10000;j++);

glClearColor(1.0,0.7,0.0,1.0);

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glLoadIdentity();

glPushMatrix();

glColor3f(1, 1, 0);

glRasterPos2f(-0.9, 0.9);

sprintf(tmp_str, "Arrow count: %d", count);


Write(tmp_str);

glPopMatrix();

if(count>=20)

glutDisplayFunc(displost);

glPushMatrix();

glColor3f(1, 1, 0);

glRasterPos2f(-0.2, 0.9);

sprintf(tmp_str, "Score: %d", counter2);

Write(tmp_str);

glPopMatrix();

glPushMatrix();

glColor3f(1.0,0.0,0.0);

glLoadIdentity();

glTranslatef(0.8,-0.769+up,0.0);

glutSolidSphere(0.10,20,16);

glColor3f(0.0,0.0,1.0);

glPushMatrix();

glColor3f(0.0,0.0,1.0);

glLoadIdentity();

glTranslatef(0.4,0.769-up,0.0);

glutSolidSphere(0.10,20,16);
glColor3f(0.0,0.0,1.0);

if(shoot==1)

glPushMatrix();

glLoadIdentity();

glTranslatef(-0.8+pos,0.0,0.0);

glColor3f(0.0,0.0,0.0);

glLineWidth(2.0);

glBegin(GL_LINES);

glVertex3f(-0.2,0.0,0.0);

glVertex3f(0.1,0.0,0.0);

glVertex3f(0.1,0.0,0.0);

glVertex3f(0.03,0.05,0.0);

glVertex3f(0.1,0.0,0.0);

glVertex3f(0.03,-0.05,0.0);

glEnd();

glPopMatrix();

if(bang==1)

bang=0;pos=-0.2;
glPushMatrix();

glLoadIdentity();

up=0;

glColor3f(1.0,0.0,0.0);

glutSolidSphere(1,20,16);

glPopMatrix();

glPopMatrix();

for( i=0;i<200;i=i+20)

if(pos>=1.75 && up>0.825 && up<0.975)

counter2 ++;

for(j=0;j<10000;j++);

shoot=0;

pos=-0.2;

bang=1;

up=(up+0.005);

if(up>2)

up=0;
if(shoot==1)

pos=pos+0.009;

if(pos>2)

pos=-0.2;

shoot=0;

glutPostRedisplay();

glFlush();

void display()

glClearColor(1.0,0.7,0.0,1.0);

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glFlush()

}
void displost()
{
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0,200,0,200);
glMatrixMode(GL_MODELVIEW);
glClearColor(1.0,0.0,0.5,1.0);
glColor3f(0.0,0.8,0.80);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
glLineWidth(4.0);
drawhit("you lost!!",70,550);
glFlush();
}
void indisplay()
{
glClearColor(1.0,0.7,0.0,1.0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
instructions();
glFlush();
}
void keyboard(unsigned char key,int x,int y)
{
if (key=='f')
{
shoot=1;
count++;
}
}
void choose(int i)
{
switch(i)
{ case 1: exit(0);
case 2: glutDisplayFunc(display1);
break;
case 3: glutDisplayFunc(display2);
break;
default:exit(0);

}
}
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DEPTH|GLUT_RGB);
glutInitWindowSize(1500,1500);
glutInitWindowPosition(0,0);
instruct=glutCreateWindow("Instructions");
init();
glutDisplayFunc(indisplay);
glutInitDisplayMode(GLUT_DEPTH|GLUT_RGB);
glutInitWindowSize(1000,1000);
glutInitWindowPosition(0,0);
game=glutCreateWindow("Proj");
init();
glutDisplayFunc(display);
glutKeyboardFunc(keyboard);
glutCreateMenu(choose);
glutAddMenuEntry("Quit",1);
glutAddMenuEntry("PlayLevel1",2);
glutAddMenuEntry("PlayLevel2",3);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMainLoop();
return 0;
}
CHAPTER 8

CONCLUSION

Our project "Bullz Eye" encompasses a broad range of OpenGL functionalities. We have made of
concepts learnt in theory including 3Drepresentation, texturing, shading etc. and so on. This
program also uses keyboard events to implement all the options provided that is, shoot and
choose options.
The goal of this project was to get a first-hand experience of OpenGL programming. This was
achieved by the successful completion of the project. Thus this program was effectively
implemented as required by the user software requirements. The program is user friendly and
provides the necessary options to the user whenever required. The software is developed with a
simple interface.

Future Scope

• The graphics of the game can be enhanced further by implementing many


other methods of different graphics packages.
• The game can further be divided into levels where the user has the liberty to
choose what kind of difficulty he or she would want such as the arrows being
very limited for a particular kind of level.
• Many kinds of interactive levels can be made upon the concept of bullz eye.

Bibliography
[1] W.S.N.p., Internet of Things: Wireless Sensor Networks. IEC Market Strategy Board,2014.
[2] Akyildiz, I.F. and M.C. Vuran, Wireless sensor networks. Vol. 4. 2010: John Wiley &Sons.
[3] Fisher, R., et al., Open Hardware: A Role to Play in Wireless Sensor Networks?Sensors
(Basel), 2015.15(3): p. 6818-44.
[4] Yong, W., G. Attebury, and B. Ramamurthy, A survey of security issues in wireless sensor
networks. Communications Surveys & Tutorials, IEEE, 2006.8 (2): p. 2-23.
[5] AlFuqaha, A., et al., Internet of Things: A Survey on Enabling Technologies,Protocols, and
Applications. Communications Surveys & Tutorials, IEEE, 2015.17 (4): p. 2347-2376.
[6] www.youtube.com
[7] www.google.co.in
[8] www.wikipedia.com
[9] www.github.com

REFERENCES
[1] https://studentprojectguide.com/project-report/synopsis/online-ticket-booking
System.
[2] https://www.scribd.com/document/407263913/EVENT-TICKET-BOOKING
SYSTEM-docx.
[3] Android Developer Fundamentals Course – Concepts.
[4] Erik Hellman, “Android Programming – Pushing the Limits”, 1st Edition,
Wiley India Pvt Ltd,2014.
[5] Dawn Griffiths and David Griffiths, “Head First Android Development”, 1st
Edition, O’Reilly SPD Publishers, 2015.
[6] Bill Phillips, Chris Stewart and Kristin Marsicano, “Android Programming: The

You might also like