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

Ludo Board

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION MUMBAI


PROJECT REPORT ON
“LUDO BOARD”
UNDER THE GUIDANCE OF
Ms. S. S. SALOKHE

DEPARTMENT OF COMPUTER ENGINEERING


DR. D. Y. PATIL POLYTECHNIC,
KASBA BAWADA KOLHAPUR
SEMESTER :- III
YEAR :- 2023-24
SUBMITTED BY :-

Sr.No Roll No Enrollment No Name


1. 2118 2205390066 Kriti Ramrao Mane
2. 2119 2205390067 Prithviraj Chandrakant Sutarl
3. 2120 2205390068 Viraj Vijay Dinde
4. 2121 2205390069 Samruddhi Sanjay Nikam
5. 2122 2205390070 Rajwardhan Satappa Patil
Ludo Board

Certificate
This to certify that Group NO G-5 from Roll No:2118 to
2122 of Third Semester of diploma in Computer Engineering of
institute, Dr. D.Y. Patil Polytechnic (Code:-0539) has completed the
Micro-Project satisfactorily in subject Computer Graphics (Code -
22318) for the academic year 2023-2024 as Prescribed in the
curriculum.

Place: Enrollment No:

Date : Exam Seat No :

Subject Teacher Head of the Department Principal


Ludo Board

ACKNOWLEDGMENT

The success outcome of this project required a lot of guidance & assistance
from many people and I am extremely privileged which we have got all
during the completion of our project. All that we have done is only due to
guidance & assistance & I would not forget to thanks them.

I owe my deep gratitude to our project guide Ms. S. S. Salokhe who took
interest in our project work & guided us till the completion of our project by
providing all the necessary information for developing a good system.

I am thankful too & fortunate enough to get constant encouragement, support


& guidance from all teaching staffs of Computer Graphics which help us in
successfully completing our project work

Date :

Place :
Ludo Board

INDEX

Sr. No CONTENT Page No


1 Introduction 1
2 Aim of the micro-project 2
3 Course Outcome 3
4 Literature Review 4
5 Algorithm 5
6 Flowchart 6
7 Input Code 7
8 System Requirement 12
9 Output 13
10 Conclusion 14
11 Futurescope 15
12 Reference 16
Ludo Board

INTRODUCTION

C is a general purpose programming language created by dennis riche at the bell


laboratories in 1972. It is very popular language despite begin old. C is strongly associated
with the UNIX, as it was developed to write the UNIX operating system

Computer graphics is a process of generating, manipulating, storing and displaying


images. It has made things more easy and interesting. Graphics programming in C used to
drawing various geometrical shapes (Rectangle, Circle, Ellipse etc.), use of mathematical
function in drawing curves, colouring an object with different colours and patterns like
designing a ludo board and designing a car.

The Algorithm used to fill colours in the ludo board is Flood Fill Algorithm.

floodfill (x, y,fill_ color, old_color: integer)


{
if(getpixel (x, y)=old_color)
{
setpixel (x, y, fill_color);
fill (x+1, y, fill_color, old_color);
fill (x-1, y, fill_color, old_color);
fill (x, y+1, fill_color, old_color);
fill (x, y-1, fill_color, old_color);
}
}

Flood fill, also called seed fill, is a flooding algorithm that determines and alters the area
connected to a given node in a multi-dimensional array with some matching attribute. It is used in
the "bucket" fill tool of paint programs to fill connected, similarly-colour areas with a different
colour, and in games such as Go and Minesweeper for determining which pieces are cleared. A
variant called boundary fill uses the same algorithms but is defined as the area connected to a
given node that does not have a particular attribute.

1
Ludo Board
Aim of the Micro-project

This Micro-Project aims at :

1. Create a Ludo Board using C language.


2. Create and apply graphics to design a ludo board and fill colour in it using flood fill
algorithm.

2
Ludo Board
COURSE OUTCOME

The theory and practical experiences a relevant soft skills associated with this course are to
be taught and implemented, so that student demonstrate the following industry oriented
CO associated with below mentioned competency :-

a. Develop programs using core graphical concepts


b. Design animations.
c. Perform 2D and 3D transformations.
d. Implemented standard algorithms to draw various graphics objects using C program.
e. Implement standard algorithms to fill colours in design you have

3
Ludo Board

LITERATURE REVIEW

Computer Graphics Flood Fill Algorithm - javatpoint


This link gives us information about flood fill algorithm like how it works,
algorithm, how we can fill colour using flood fill.

https://www.prepbytes.com

This link provides the information of graphics programming in C. It is very


useful platform to learn C programming about graphics statements. In this
platform, we can get information about coding like a C,C++, Python, JAVA
advanced.

https://www.visual-paradigm.com

Visual Paradigm is the market #1 visual modelling and diagramming online


platform. We used this link to draw a flowchart using various geometric
shapes.

4
Ludo Board
ALGORITHM
Algorithm:-

Step 1 : Start

Step 2: Declare variables.

Step 3 : Initialize the graphics system by detecting the graphics driver and mode using detectgraph and
initgraph.
Step 4: Draw various rectangles, circles, and lines to create a complex geometric pattern.
Step 5: Fill the rectangles with different colors (yellow, green, blue, red) using setfillstyle and floodfill to
achieve a colorful design.
Step 6: The pattern includes rectangles, circles, and arrows drawn with various coordinates and styles.
Step 7: Create a "home" shape by connecting rectangles of different colors with lines.
Step 8: Stop.

5
Ludo Board

FLOWCHART

6
Ludo Board
INPUT OF THE PROGRAM

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd,gm,i;
clrscr();

detectgraph(&gd,&gm);
initgraph(&gd,&gm,"c:\\turboc3\\bgi");

rectangle(10,10,565,470);//Main rectangle
rectangle(20,20,555,460);//inner rectangle of the main rectangle

//yellow rectangle lines


setfillstyle(SOLID_FILL,YELLOW);
line(250,20,250,200);
line(250,200,20,200);
floodfill(55,45,WHITE);

// setfillstyle(SOLID_FILL,WHITE);
rectangle(50,50,220,170);//yellow rectangle
// floodfill(55,55,WHITE);

//yellow circle
circle(95,90,18);//1
circle(170,90,18);//2
circle(95,135,18);//3
circle(170,135,18);//4

//yellow arrow

7
Ludo Board
line(30,235,30,242);//"|"
line(30,235,40,235);//"--"
line(30,242,40,242);//"--"
line(40,235,40,233);//1
line(40,242,40,244);//2
line(40,233,50,238);//touch line of arrow 1
line(40,244,50,238);//touch line 2
//yellow and green middle vertical lines
line(275,20,275,201);
line(300,20,300,201);

//yellow and green middle horizontal lines


for(i=20;i<=171;i=i+30)
{
line(250,i,325,i);
}

//yellow and blue middle horizontal lines


line(20,225,251,225);
line(20,250,251,250);

//yellow and blue middle vertical lines


for(i=20;i<=213;i=i+38)
{
line(i,200,i,275);
}

//green rectangle lines


setfillstyle(SOLID_FILL,GREEN);
line(325,20,325,200);
line(325,200,555,200);
floodfill(360,40,WHITE);

8
Ludo Board

// setfillstyle(SOLID_FILL,WHITE);
rectangle(355,45,525,175);//green rectangle
// floodfill(360,50,WHITE);

//green circle
circle(395,90,18);//1
circle(470,90,18);//2
circle(395,135,18);//3
circle(470,135,18);//4
//green arrow
line(285,30,292,30);//"--"
line(285,30,285,39);//"|"1
line(292,30,292,39);//"|"2
line(285,39,283,39);//"-"1
line(292,39,294,39);//2"-"
line(283,39,288,48);//touch line of arrow 1
line(294,39,288,48);//touch line of arrow 2
//blue rectangle lines
setfillstyle(SOLID_FILL,BLUE);
line(250,275,20,275);
line(250,275,250,460);
floodfill(55,300,WHITE);

// setfillstyle(SOLID_FILL,WHITE);
rectangle(50,305,220,430);//blue rectangle
// floodfill(55,310,WHITE);

//blue circle
circle(95,345,18);//1
circle(170,345,18);//2
circle(95,390,18);//3

9
Ludo Board
circle(170,390,18);//4
//blue arrow
line(285,450,292,450);//"--"
line(285,450,285,440);//"|"
line(292,450,292,440);//"|"
line(285,440,282,440);//"-"1
line(292,440,295,440);//2"-"
line(282,440,288,430);//touch line of arrow 1
line(295,440,288,430);//touch line of arrow 2

//red rectangle lines


setfillstyle(SOLID_FILL,RED);
line(325,275,555,275);
line(325,275,325,460);
floodfill(360,300,WHITE);

// setfillstyle(SOLID_FILL,WHITE);
rectangle(355,305,525,430);//red rectangle
// floodfill(360,310,WHITE);
//red circle
circle(395,345,18);//1
circle(470,345,18);//2
circle(395,390,18);//3
circle(470,390,18);//4
//red arrow
line(545,235,545,242);//"|"
line(545,235,535,235);//"--"
line(545,242,535,242);//"--"
line(535,235,535,233);//"|"1
line(535,242,535,244);//"|"2
line(535,233,523,238);//touch line of arrow 1
line(535,244,523,238);//touch line of arrow 2

10
Ludo Board
//blue and red middle vertical lines
line(275,275,275,460);
line(300,275,300,460);

//blue and red middle horizontal lines


for(i=305;i<=430;i=i+30)
{
line(250,i,325,i);
//line(250,335,325,335);
}

//green and red middle horizontal lines


line(555,225,324,225);
line(555,250,324,250);
//green and red middle vertical lines
for(i=363;i<=517;i=i+38)
{
line(i,200,i,275);
//line(401,200,401,275);
}

//home
line(251,201,324,201);//yellow green
line(251,201,251,274);//yellow blue
line(324,201,324,274);//green red
line(251,274,324,274);//blue red
line(251,201,324,274);//yellow red
line(324,201,251,274);//green blue
getch();
closegraph();
}

11
Ludo Board
SYSTEM REQUIRMENT

Sr. Name of Resource Specifications


No Qty
Make Details
1 Computer system with Dell Windows11 1
broad specifications ProRAM –
8.00GB
Laptop

2 Software Turbo c Turbo c++ 1


3.0.7.7.C

3 ‘C’ Compiler Turbo c / - 1


gcc

4 Any other resource - - -


used

12
Ludo Board

OUTPUT OF THE CODE

LUDO BOARD

13
Ludo Board
CONCLUSION
In conclusion, our microproject to create a Ludo board using Computer Graphics in C
has been a valuable learning experience. Throughout this project, we have gained a deeper
understanding of computer graphics concepts, including graphics rendering, user interface
design, and basic game logic implementation. We have successfully developed a simple yet
functional Ludo board that allows players to roll dice, move their tokens and play the game.

14
Ludo Board

FUTERSCOPE

In the future, there are several avenues for expanding this project. We can add features such as
multiplayer support, AI opponents, improved graphics, and sound effects to make the game more
engaging. Additionally, optimizing the code and addressing any performance issues would be
beneficial.
Overall, this microproject has given us a practical introduction to computer graphics and game
development using C. It has provided a solid foundation for pursuing more complex graphics and
gaming projects in the future. We can apply the skills and knowledge acquired here to create more
sophisticated games and interactive applications.

15
Ludo Board
REFERENCES

 Computer Graphics Flood Fill Algorithm - javatpoint


 https://www.prepbytes.com
 https://www.visual-paradigm.com

16

You might also like