Professional Documents
Culture Documents
CGR Microproject
CGR Microproject
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.
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.
Date :
Place :
Ludo Board
INDEX
INTRODUCTION
The Algorithm used to fill colours in the ludo board is Flood Fill Algorithm.
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
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 :-
3
Ludo Board
LITERATURE REVIEW
https://www.prepbytes.com
https://www.visual-paradigm.com
4
Ludo Board
ALGORITHM
Algorithm:-
Step 1 : Start
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
// 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);
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
// 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);
//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
12
Ludo Board
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
16