// moving car animation
#include
#include
void main()
{
int gd=DETECT,gm;
int i ,j=0;
initgraph(&gd,&gm,"akshay");
settextstyle(GOTHIC_FONT,HORIZ_DIR,4);
getch();
i=0;
while(i<=420)
{
rectangle(150+i,350,200+i,400);
rectangle(50+i,275,150+i,400);
circle(175+i,410,10);
circle(75+i,410,10);
setcolor(j++);
delay(100);
i=i+10;
cleardevice();
}
getch();
closegraph();
}
Balloon Shooting Game is a simple game using c and cpp features. You can easily learn and is easy to run because this game works in TURBOC compiler. The main features are included is GRAPHICS and DOS commands. Basic commands used in this game : initgraph : initgraph is used to initialising of graphics mode in the program. ex. initgraph(&gm,&gd,"akshay"); here gm uses Graphics detect mode and gd points to graphics features to be used in program ans last is a string it may be any string like c://tc/bin etc.. setbkcolor : sets the current background color. for ex. if you want to set background color to blue, you can call setbkcolor(BLUE); or setbkcolor(1); getimage : saves a bit image of the specified region into memory. putimage : outputs a bit image onto the screen. settextstyle : sets the current text characteristics. Declaration : settextstyle(int font,...
Comments
Post a Comment