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

AN

INTERNSHIP REPORT
ON
LUDO MANAGEMENT SYSTEM
PROJECT
BY
KAMAL ACHARYA
(Tribhuvan University)
Date: 2022/12/02

2|Page
ABSTRACT

OpenGL is a library for doing computer graphics.By using it, we can create interactive applications which
render high-quality color images composed of 3D geometric objects and images. OpenGL is window and operating
system independent. As such, the part of our application which does rendering is platform
independent.However, in order for OpenGLto be able to render, it needs awindow to draw into. Generally,

The Project OpenGL Ludo-Board Game is a computer graphics project. The computer
graphics project used open source library – OpenGL with the c++. This c++ project is based on
one of the oldest Board Game – the Ludo. This OpenGL Ludo game is of two player game and
not the regular four player.
Ludo is a board game for two to four players,in which the players race their four tokens from
start to finish accordingly to die rolls.Like other cross and circle games,Ludo is derived from the
Indian game Pachisi but simpler.The game and its variant are popular in many countries .

3|Page
CONTENTS

1. INTRODUCTION
1.1 Computer Graphics
1.2 OpenGL Technology
1.3 Project Description
2. REQUIREMENT SPECIFICATION
2.1 Hardware Requirements
2.2 Software Requirements
3. INTERFACE AND ARCHITECTURE
Architecture
4. IMPLEMENTATIONAND SOURCE CODE
5. SNAPSHOTS
6. FUTURE ENHANCEMENT
7. CONCLUSION
8. REFERENCES
9. APPENDIX
Personal Details

4|Page
INTRODUCTION
1.1 Computer Graphics

Computers have become a powerful tool for the rapid andeconomical production of
pictures. There is virtually no area in whichgraphical displays cannot be used to some advantage,
and so it is notsurprising to find the use of computer graphics so widespread. Althoughearly
applications in engineering and science had to rely on expensiveand cumbersome equipment, advances in computer
technology havemade interactive computer graphics a practical tool. Today, we findcomputer graphics
used routinely in such diverse areas as science,engineering, medicine, business, industry, government,
art,entertainment, advertising, education, and training.
Computer graphics are graphics created using computers and more generally, the representation and
manipulation of image data by a computer.
The development of computer graphics has made computerseasier to interact with, and better for
understanding and interpretingmany types of data.
Developments in computer graphics have had aprofound impact on many types of media and
have revolutionizedanimation,moviesand thevideo gameindustry.
A major use of computer graphics is in design processes,particularly for engineering and architectural
+systems, but almost allproducts are now computer designed.

Generally referred to as CAD.computer-aided design methods are now routinely used in the design
ofbuildings, automobiles, aircraft, watercraft, spacecraft, computers,textiles, and many, many
other products.
Here we have used “OpenGL” as the graphics software system to implement our mini project “LUDO-BOARD
GAME”Now let us havea quick look at OpenGL.

1.2 OpenGL Technology


OpenGL is a library for doing computer graphics.By using it, we can create interactive applications which
render high-quality color images composed of 3D geometric objects and images. OpenGL is window and operating
system independent. As such, the part of our application which does rendering is platform
independent.However, in order for OpenGL to be able to render, it needs awindow to draw into. Generally,

5|Page
this is controlled by the windowingsystem on whatever platform we are working on. As OpenGL
is platformindependent, we need some way to integrate OpenGL into eachwindowing system.Every windowing
system where OpenGL is supported has additionalAPI calls for managing OpenGL windows, color maps
and other features. These additional APIs are platform dependent. For the sake of simplicity,we are using an
additional freeware library for simplifying interacting withwindowing systems, GLUT.GLUT, the OpenGL Utility
Toolkit is a libraryto make writing openGLprograms regardless of windowing systems much easier.

1.2 Block diagram of OpenGL

1.3 PROJECT DESCRIPTION:

OpenGL Ludogame Project


The Project OpenGL Ludo game is an computer graphics project. The computer
graphics project used open source library – OpenGL with the C/C++. This C/C++ project is
based on one of the oldest Board Game – the Ludo. This OpenGL Ludo game is of two player
game and not the regular four player.

6|Page
OpenGL Ludo game rules

 At the start of the OpenGL Ludo game, the player’s four pieces are placed in the start area of
their colour.

 Players take it in turn to throw a single die. A player must first throw a six to be able to move
a piece from the starting area onto the starting square.

 In each subsequent turn the player moves a piece forward 1 to 6 squares as indicated by the
die.

 When a player throws a 6 the player may bring a new piece onto the starting square, or may
choose to move a piece already in play. Any throw of a six results in another turn.

 If a player cannot make a valid move they must pass the die to the next player.

 If a player’s piece lands on a square containing an opponent’s piece, the opponent’s piece is
captured and returns to the starting area.

 A piece may not land on a square that already contains a piece of the same colour (unless
playing doubling rules).

 Once a piece has completed a circuit of the board it moves up the home column of its own
colour. The player must throw the exact number to advance to the home square.

 The winner is the first player to get all four of their pieces onto the home square.

Procedure to Play in Ludo game C++ Project


 A ludo board is normally a square marked with a cross. Each arm of the cross is divided into
three columns, with the columns divided into usually six squares.

 The centre of the cross is the finishing square which is often divided into four colored
triangles. Eachcolored triangle is combined with a colored middle column appears as an
arrow pointing to the finish.
 The shaft of each arrow is a player’s “home column” and is five squares long. To the left of
each home column, one square from the edge of the board is a starting square, also colored.
 During game play a piece moves from its starting square, clockwise around the perimeter of
the board, and up the player’s home column to the finishing square.

 In the space to the left of each arm is a circle or square to hold a player’s pieces before they
are allowed into play. There are no resting squares, but the colored home column may only
be entered by its own player’s tokens

7|Page
Chapter-2
REQUIREMENT SPECIFICATION

1.1 Hardware requirements:


 Pentium or higher processor.
 128 MB or more RAM.
 A standard keyboard, and Microsoft compatible mouse
 VGA monitor.

1.2 Software requirements:


 The graphics package has been designed for OpenGL; hence the machine must
Have Dev C++.
 Software installed preferably 6.0 or later versions with mouse driver installed.
 GLUT libraries, Glut utility toolkit must be available.
 Operating System: Windows
 Version of Operating System: Windows XP, Windows NT and Higher
 Language: C/C++

8|Page
Chapter-3
IMPLEMENTATION

void check_cond()

if((k1>27&&p1==0)&&(k2>27&&p1==0)&&(l1>27&&p2==0)&&(l2>27&&p2==0))

dice1=0;

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glClearColor(0,0,0,0);

glFlush();

about();

else if(s1==2)

{ dice1=0;

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glClearColor(0,0,0,0);

glFlush();

about1();

9|Page
else if(s2==2)

{ dice1=0;

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glClearColor(0,0,0,0);

glFlush();

about2();

void myMouse(int btn,int state,int x,int y)

int C[10][10];

GLint rand();

int D[10][10];

C[0][0]=A[k2][0];C[0][1]=A[k2][1];C[1][0]=A[k1][0];C[1][1]=A[k1][1];

D[0][0]=B[l2][0];D[0][1]=B[l2][1];D[1][0]=B[l1][0];D[1][1]=B[l1][1];

if(ra1+k1>57||ra1+k2>57||ra1+l1>57||ra1+l2>57)

{z=1;}

if(btn==GLUT_LEFT_BUTTON&&state==GLUT_DOWN)

if(ply1==1&&ply2==0)

10 | P a g e
{

if(k1==0&&x>483&&x<517&&y<615&&y>580)

if(ra1==6||ra1==1)

player1(1);

else

player1(2);

else if(k2==0&&x>412&&x<447&&y<545&&y>510)

if(ra1==6||ra1==1)

player1(2);

else

player1(1);

else if(x>(C[0][0]-20)&&x<(C[0][0]+20)&&y>(C[0][1]-
20)&&y<(C[0][1]+20)&&z1==1&&k2>0)

player1(2);

else if(x>(C[1][0]-20)&&x<(C[1][0]+20)&&y>(C[1][1]-
20)&&y<(C[1][1]+20)&&z1==1&&k1>0)

player1(1);

if(z==1&&dice1==1)

{ z=0;

z1=1;

ra1=rand()%2+rand()%3+rand()%2+rand()%3;

11 | P a g e
if(ra1==0)

ra1=1;

dice(ra1);

else

{if(l1==0&&x>833&&x<873&&y>84&&y<124)

if(ra1==6||ra1==1)

player2(1);

else

player2(2);

else if(l2==0&&x>906&&x<940&&y<190&&y>158)

if(ra1==6||ra1==1)

player2(2);

else

player2(1);

else if(x>(D[0][0]-20)&&x<(D[0][0]+20)&&y>(D[0][1]-
20)&&y<(D[0][1]+20)&&z1==1&&l2>0)
12 | P a g e
player2(2);

else if(x>(D[1][0]-20)&&x<(D[1][0]+20)&&y>(D[1][1]-
20)&&y<(D[1][1]+20)&&z1==1&&l1>0)

player2(1);

if(z==1&&dice1==1)

{ z=0;

z1=1;

ra1=rand()%2+rand()%3+rand()%2+rand()%3;

if(ra1==0)

ra1=1;

dice(ra1);

void display2();

void wait(void);
13 | P a g e
void call(int w);

void display1(void);

void myReshape(int w,int h)

glViewport(0,0,w,h);

glMatrixMode(GL_PROJECTION);

glLoadIdentity();

if(w<=h)

glOrtho(-1.0,1.0,-1.0*(GLfloat)h/(GLfloat)w,

2.0*(GLfloat)h/(GLfloat)w,-20.0,20.0);

else

glOrtho(-1.0*(GLfloat)w/(GLfloat)h,

1.0*(GLfloat)w/(GLfloat)h,-1.0,1.0,-20.0,20.0);

glMatrixMode(GL_MODELVIEW);

glutPostRedisplay();

Int main(int)

enter=1;

glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB|GLUT_DEPTH);

init();

glutCreateMenu(options);

glutAddMenuEntry("About the Project",1);

glutAddMenuEntry("Rules of the Game",2);

14 | P a g e
glutAddMenuEntry("Game Mode or Restart",4);

glutAddMenuEntry("Quit",5);

glutMouseFunc(myMouse);

glutKeyboardFunc(key);

glutAttachMenu(GLUT_RIGHT_BUTTON);

glutReshapeFunc(myReshape);

glutDisplayFunc(display);

font=GLUT_BITMAP_9_BY_15;//GLUT_BITMAP_HELVETICA_12;

glutMainLoop();

15 | P a g e
Chapter-4
SNAPSHOTS

16 | P a g e
Chapter-5
FUTURE AND ENHANCEMENT

Future scope of OpenGL Ludo game


 Even though the Ludo game in C++ designed is enriched with many options, it is a two
dimensional demo, in future this computer graphics project can be re designed with 3D
animation and sound effects.
 By using this demo further for four coins and four players can be implemented in
this OpenGl Project.

17 | P a g e
Chapter – 6

CONCLUSION

 The conclusion here - is that the application of this project. i.e.,where all this project’s result can be
used. This project would be helpful in playing two playerludo-board game. Or it can also be enhanced to
be used for a four player game. Even though the Ludo game is in C++ designed is enriched
with many options, it is a two dimensional demo, in future this computer graphics project can
be re designed with 3D animation and sound effects.

 Its a demo of how open gl could be used to create games.

18 | P a g e
Chapter-7
REFERENCE AND BIBLIOGRAPHY

Acharya, Kamal. "STUDENT INFORMATION MANAGEMENT


SYSTEM." Authorea Preprints (2023).
Acharya, Kamal. "Library Management System." Available at SSRN4807104 (2019).
ACHARYA, KAMAL, et al. "LIBRARY MANAGEMENT SYSTEM." (2019).
Acharya, Kamal. "Online bus reservation system project report." Authorea
Preprints (2024).
Acharya, Kamal. "Online bus reservation system project report." (2024).
Acharya, Kamal. “Online Bus Reservation System.” SSRN ElectroNIC ASIA
Journal (2024): n. pag.
Acharya, Kamal. “Student Information Management System Project.” SSRN
ElectroNIC ASIA Journal (2024): n. pag.
Acharya, Kamal. “ATTENDANCE MANAGEMENT SYSTEM.” International
Research Journal of Modernization in Engineering Technology and
Science (2023): n. pag.
Acharya, Kamal. “College Information Management System.” SSRN ElectroNIC
ASIA Journal (2024): n. pag.
Acharya, Kamal, Attendance Management System Project (April 28, 2024).
Available at
SSRN: https://ssrn.com/abstract=4810251 or http://dx.doi.org/10.2139/ssrn.4810251
Acharya, Kamal, Online Food Order System (May 2, 2024). Available at
SSRN: https://ssrn.com/abstract=4814732 or http://dx.doi.org/10.2139/ssrn.4814732
Acharya, Kamal, University management system project. (May 1, 2024). Availableat
SSRN: https://ssrn.com/abstract=4814103 or http://dx.doi.org/10.2139/ssrn.4814103
Acharya, Kamal, Online banking management system. (May 1, 2024). Available at
SSRN: https://ssrn.com/abstract=4813597 or http://dx.doi.org/10.2139/ssrn.4813597
Acharya, Kamal, Online Job Portal Management System (May 5, 2024). Available at
SSRN: https://ssrn.com/abstract=4817534 or http://dx.doi.org/10.2139/ssrn.4817534
Acharya, Kamal, Employee leave management system. (May 7, 2024). Available
at SSRN: https://ssrn.com/abstract=4819626 or http://dx.doi.org/10.2139/ssrn.4819626
Acharya, Kamal, Online electricity billing project report. (May 7, 2024). Available at
SSRN: https://ssrn.com/abstract=4819630 or http://dx.doi.org/10.2139/ssrn.4819630
Acharya, Kamal, POLICY MANAGEMENT SYSTEM PROJECT REPORT. (December 10, 2023).
Available at SSRN: https://ssrn.com/abstract=4831694 or http://dx.doi.org/10.2139/ssrn.4831694
Acharya, Kamal, Online job placement system project report. (January 10, 2023). Available at

19 | P a g e
SSRN: https://ssrn.com/abstract=4831638 or http://dx.doi.org/10.2139/ssrn.4831638
Acharya, Kamal, Software testing for project report. (May 16, 2023). Available at
SSRN: https://ssrn.com/abstract=4831028 or http://dx.doi.org/10.2139/ssrn.4831028
Acharya, Kamal, ONLINE CRIME REPORTING SYSTEM PROJECT. (August 10, 2022). Available
at SSRN: https://ssrn.com/abstract=4831015 or http://dx.doi.org/10.2139/ssrn.4831015
Acharya, Kamal, Burber ordering system project report. (October 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4832704 or http://dx.doi.org/10.2139/ssrn.4832704
Acharya, Kamal, Teachers Record Management System Project Report (December 10, 2023).
Available at SSRN: https://ssrn.com/abstract=4833821 or http://dx.doi.org/10.2139/ssrn.4833821
Acharya, Kamal, Dairy Management System Project Report (December 20, 2020). Available at
SSRN: https://ssrn.com/abstract=4835231 or http://dx.doi.org/10.2139/ssrn.4835231
Acharya, Kamal, Electrical Shop Management System Project (December 10, 2019). Available at
SSRN: https://ssrn.com/abstract=4835238 or http://dx.doi.org/10.2139/ssrn.4835238
Acharya, Kamal, Online book store management system project report. (Febuary 10, 2020).
Available at SSRN: https://ssrn.com/abstract=4835277 or http://dx.doi.org/10.2139/ssrn.4835277
Acharya, Kamal, Paint shop management system project report. (January 10, 2019). Available at
SSRN: https://ssrn.com/abstract=4835441 or http://dx.doi.org/10.2139/ssrn.4835441
Acharya, Kamal, Supermarket billing system project report. (August 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4835474 or http://dx.doi.org/10.2139/ssrn.4835474
Acharya, Kamal, Online texi booking system project report. (March 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4837729 or http://dx.doi.org/10.2139/ssrn.4837729
Acharya, Kamal, Online car servicing system project report. (March 10, 2023). Available at
SSRN: https://ssrn.com/abstract=4837832 or http://dx.doi.org/10.2139/ssrn.4837832
Acharya, Kamal, School management system project report. (July 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4837837 or http://dx.doi.org/10.2139/ssrn.4837837
Acharya, Kamal, Furniture Showroom Management System Project Report (March 21, 2021).
Available at SSRN: https://ssrn.com/abstract=4839422 or http://dx.doi.org/10.2139/ssrn.4839422
Acharya, Kamal, Online Vehicle Rental System Project Report (March 21, 2019). Available at
SSRN: https://ssrn.com/abstract=4839429 or http://dx.doi.org/10.2139/ssrn.4839429
Acharya, Kamal, Fruit Shop Management System Project Report (August 10, 2023). Available at
SSRN: https://ssrn.com/abstract=4841048 or http://dx.doi.org/10.2139/ssrn.4841048
Acharya, Kamal, Hall Booking Management System Project Report (December 21, 2023).
Available at SSRN: https://ssrn.com/abstract=4841055 or http://dx.doi.org/10.2139/ssrn.4841055
Acharya, Kamal, Lundry Management System Project Report (October 21, 2023). Available at
SSRN: https://ssrn.com/abstract=4841059 or http://dx.doi.org/10.2139/ssrn.4841059
Acharya, Kamal, A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT (September
25, 2023). Available at
SSRN: https://ssrn.com/abstract=4841209 or http://dx.doi.org/10.2139/ssrn.4841209
Acharya, Kamal, A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT (May 25,
2024). Available at
SSRN: https://ssrn.com/abstract=4841210 or http://dx.doi.org/10.2139/ssrn.4841210
Acharya, Kamal, ONLINE DATING MANAGEMENT SYSTEM PROJECT REPORT. (April 25,
2023). Available at
20 | P a g e
SSRN: https://ssrn.com/abstract=4842066 or http://dx.doi.org/10.2139/ssrn.4842066
Acharya, Kamal, ONLINE RESUME BUILDER MANAGEMENT SYSTEM PROJECT REPORT.
(April 25, 2021). Available at
SSRN: https://ssrn.com/abstract=4842071 or http://dx.doi.org/10.2139/ssrn.4842071
Acharya, Kamal, TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT (August 21, 2023).
Available at SSRN: https://ssrn.com/abstract=4842082 or http://dx.doi.org/10.2139/ssrn.4842082
Acharya, Kamal, Chat Application Through Client Server Management System Project Report
(June 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4842761 or http://dx.doi.org/10.2139/ssrn.4842761
Acharya, Kamal, Web Chatting Application Management System Project Report (April 25, 2022).
Available at SSRN: https://ssrn.com/abstract=4842771 or http://dx.doi.org/10.2139/ssrn.4842771
Acharya, Kamal, Automobile management system project report (May 25, 2022). Available at
SSRN: https://ssrn.com/abstract=4846917 or http://dx.doi.org/10.2139/ssrn.4846917
Acharya, Kamal, College bus management system project report (April 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4846920 or http://dx.doi.org/10.2139/ssrn.4846920
Acharya, Kamal, Courier management system project report (May 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4846922 or http://dx.doi.org/10.2139/ssrn.4846922
Acharya, Kamal, Event management system project report (April 25, 2021). Available at
SSRN: https://ssrn.com/abstract=4846927 or http://dx.doi.org/10.2139/ssrn.4846927
Acharya, Kamal, Library management system project report II (May 25, 2020). Available at
SSRN: https://ssrn.com/abstract=4848857 or http://dx.doi.org/10.2139/ssrn.4848857

21 | P a g e
Chapter-8
APPENDIX

Personal Details
Name: Kamal Acharya
Level: M.sc Csit
University: Tribhuvan University

Social Networks
Facebook: https://www.facebook.com/acharyak182
Instagram: https://www.instagram.com/acharyak182
Linkedin: https://www.linkedin.com/in/acharyak182

22 | P a g e

You might also like