| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 8847 人关注过本帖, 1 人收藏
标题:[开源][原创自己做的坦克游戏(处女作).完成版
取消只看楼主 加入收藏
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
结帖率:100%
收藏(1)
 问题点数:0 回复次数:10 
[开源][原创自己做的坦克游戏(处女作).完成版


上面是打包文件,tc2.0及win-tc编译通过
#include<graphics.h>
#include<time.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<dos.h>
#include<bian.h>
#include<tank.h>
#include<paodan.h>
#include<start.h>
#include<baozha.h>
#include<win.h>
#include<lost.h>
#include<tree.h>
#include<end.h>
#include<web.h>
#include<house.h>
#include<dilei.h>
#include<box.h>
#define M 30
#define N 22
#define up 0x4800
#define down 0x5000
#define left 0x4b00
#define right 0x4d00
#define enter 0x1c0d
#define esc 0x011b
#define a 0x1e61
#define A 0x1e41
#define gamespeed 26000
#define ens 10
/*map-------------------------------------------------------------------------------------------------*/
int map1[N][M]={
{1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1},
{1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1},
{1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1},
{1 ,0 ,0 ,1 ,0 ,0 ,0 ,1 ,1 ,0 ,0 ,0 ,1 ,0 ,0 ,1 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,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1}


yQeVpqb8.rar (24.24 KB) [开源][原创自己做的坦克游戏(处女作).完成版


[此贴子已经被作者于2007-10-29 22:24:26编辑过]



0Y2eg5xQ.rar (6.01 KB) [原创自己做的坦克游戏(处女作).完成版



oQh4WT9a.rar (6.01 KB) [开源][原创自己做的坦克游戏(处女作).完成版

搜索更多相关主题的帖子: 处女作 坦克 游戏 开源 原创 
2007-06-26 00:24
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 

/*function begin-----------------------------------------------------------------------------------------------*/
int main()
{
int map[N][M],mx,my,i,j;/*map info*/
int gl=1,gs=1,gz=5,ra,key,flag=1,gd=VGA,gm=VGAHI;/*cntrol info*/
int mex=19,mey=19,men=1,mec=7,mel=5,mel2,mel3;
int en=0/*if there is an enemy alive*/,enx[ens],eny[ens],enn[ens],enc[ens],enl[ens];/*enimey info*/
int mdx=0,mdy=0,mdn=0,mdl=0,msf=0,msfl=0;/*my fire*/
int edx[ens],edy[ens],edn[ens],edl[ens];/*enemy's fire*/
int boxl=0,boxx,boxy,boxt=0;
int pinghua=0,clearb;


initgraph(&gd,&gm,'');
randomize();

/*game prepare-----------------------------------------------------------------------------------------------------*/
for(gs=1;(gs<gz+1)&&gl;gs++)
{mex=1;mey=1;men=1;mec=7; boxl=0;msf=0;msfl=0;
switch(gs)
{
case 1:
{for(j=0;j<N;j++)
for(i=0;i<M;i++)
map[j][i]=map1[j][i];
break;}

case 2:
{for(j=0;j<N;j++)
for(i=0;i<M;i++)
map[j][i]=map2[j][i];
break;}

case 3:
{for(j=0;j<N;j++)
for(i=0;i<M;i++)
map[j][i]=map3[j][i];
break;}

case 4:
{for(j=0;j<N;j++)
for(i=0;i<M;i++)
map[j][i]=map4[j][i];
break;}

case 5:
{for(j=0;j<N;j++)
for(i=0;i<M;i++)
map[j][i]=map5[j][i];
break;}

}
for(i=0;i<ens;i++)
{enx[i]=28;
eny[i]=20;
enn[i]=0;
enc[i]=8;
enl[i]=1;
edx[i]=0;
edy[i]=0;
edn[i]=1;
edl[i]=0;}
flag=1;
start2(gs);
setcolor(3);
bian(6);

for(my=0;my<N;my++)
for(mx=0;mx<M;mx++)
{if(map[my][mx]==1) tree(19+20*mx,25+20*my);
else {if((map[my][mx]==3)&&(map[my+1][mx]==3)&&(map[my][mx+1]==3)&&(map[my+1][mx+1]==3)&&(map[my][mx-1]!=3)) house(19+20*mx,25+20*my);else;}
}

/*game start-------------------------------------------------------------------------------------------*/

printf("stage:%d life: weapon:",gs);
for(mel2=5;mel2>0;mel2--) tank(250+mel2*30,1,0,1);
tank(19+mex*20,25+mey*20,men,mec);/*pic mine tank*/

while(flag)
{
while(!kbhit()||pinghua<1)/*game sourse*/
{

switch(msf)
{case 0 : {paodan(550,1,4);break;}
case 1 : {dilei(550,1,0);break;}
}
while(bioskey(1)) clearb=bioskey(0);
for(my=0;my<N;my++)
for(mx=0;mx<M;mx++)
if((map[my][mx]==3)&&(map[my+1][mx]==3)&&(map[my][mx+1]==3)&&(map[my+1][mx+1]==3)) house(19+20*mx,25+20*my);else;
pinghua++;/*control stadic*/
while(bioskey(1)) clearb=bioskey(0);


/*control and pic box--------------------------------------------------------------------------------------*/
if(!boxl) boxt++;else;
if(boxt>=90)/*control box time*/
{boxx=random(M);
boxy=random(N);
if(boxx>2&&boxy>2&&map[boxy][boxx]!=1&&map[boxy][boxx]!=3) {box(19+20*boxx,25+20*boxy,0);boxl=1;boxt=0;}else;
}
else;
if(boxl) box(19+20*boxx,25+20*boxy,0);/*pic box*/

/*pic tank-----------------------------------------------------------------------------------------------*/

if(mex==boxx&&mey==boxy&&boxl) {boxl=0;box(19+20*boxx,25+20*boxy,1);msf=1;}
for(i=0;i<gs+3;i++)/*pic enimey tank*/
{if(enl[i])tank(19+20*enx[i],25+20*eny[i],enn[i],enc[i]);else;}


/*control and pic dilei-------------------------------------------------------------------------------------------*/
if(msfl)
{ for(my=0;my<N;my++)
for(mx=0;mx<M;mx++)
{if(map[my][mx]==2 )dilei(19+20*mx,25+20*my,0);else;}
for(i=0;i<gs+3;i++)
{if (map[eny[i]][enx[i]]==2&&enl[i]){baozha(19+enx[i]*20,25+eny[i]*20);map[eny[i]][enx[i]]=0;enl[i]=0;msfl--;}else;}

}


简单的快乐着~
2007-06-26 00:25
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 

/*control and pic my fire---------------------------------------------------------------------------------------------*/
if(mdl)/*sourse of my fire*/
{if(map[mdy][mdx]!=1&&map[mdy][mdx]!=3)
{{switch(mdn)
{case 0: {paodan(19+20*mdx,25+20*mdy,0);mdy--;break;}
case 1: {paodan(19+20*mdx,25+20*mdy,0);mdy++;break;}
case 2: {paodan(19+20*mdx,25+20*mdy,0);mdx--;break;}
case 3: {paodan(19+20*mdx,25+20*mdy,0);mdx++;break;}
}
for(i=0;i<gs+5;i++)
if((mdx==enx[i])&&(mdy==eny[i]&&enl[i])){baozha(19+20*enx[i],25+20*eny[i]);enl[i]=0;mdl=0;paodan(19+20*enx[i],25+20*eny[i],0);}

else paodan(19+20*mdx,25+20*mdy,4);}}/*end of if*/
else {baozha(19+20*mdx,25+20*mdy);if(map[mdy][mdx]==1) tree(19+20*mdx,25+20*mdy);else; mdl=0;}
}/*end of if mdl(my fire)*/

/*control and pic enemy's fire-----------------------------------------------------------------------------------------------*/
for(i=0;i<gs+3;i++)
{if(edl[i])
{if(map[edy[i]][edx[i]]!=1&&map[edy[i]][edx[i]]!=3)
{{switch(edn[i])
{case 0: {paodan(19+20*edx[i],25+20*edy[i],0);edy[i]--;break;}
case 1: {paodan(19+20*edx[i],25+20*edy[i],0);edy[i]++;break;}
case 2: {paodan(19+20*edx[i],25+20*edy[i],0);edx[i]--;break;}
case 3: {paodan(19+20*edx[i],25+20*edy[i],0);edx[i]++;break;}}
if((edx[i]==mex)&&(edy[i]==mey)){baozha(19+20*mex,19+20*mey);mel--;tank(250+(mel+1)*30,1,0,0);tank(19+mex*20,25+mey*20,men,mec);/*pic mine tank*/edl[i]=0;}

else paodan(19+20*edx[i],25+20*edy[i],4);}}
else {baozha(19+20*edx[i],25+20*edy[i]);if(map[edy[i]][edx[i]]==1) tree(19+20*edx[i],25+20*edy[i]);else;edl[i]=0;}
}}/*end of edl*/

delay(gamespeed);

/*control enemy's tank-------------------------------------------------------------------------------------------------*/
for(i=0;i<gs+3;i++)
{ra=random(8);
switch(ra)
{case 0:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);if(map[eny[i]-1][enx[i]]!=1&&map[eny[i]-1][enx[i]]!=3) eny[i]--;else;enn[i]=0;break;}
case 1:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);if(map[eny[i]+1][enx[i]]!=1&&map[eny[i]+1][enx[i]]!=3) eny[i]++;else;enn[i]=1;break;}
case 2:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);if(map[eny[i]][enx[i]-1]!=1&&map[eny[i]][enx[i]-1]!=3) enx[i]--;else;enn[i]=2;break;}
case 3:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);if(map[eny[i]][enx[i]+1]!=1&&map[eny[i]][enx[i]+1]!=3) enx[i]++;else;enn[i]=3;break;}
case 4:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);break;}
case 5:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);break;}
case 6:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);break;}
case 7:{tank(19+20*enx[i],25+20*eny[i],enn[i],0);break;}
}
if((enx[i]==mex||eny[i]==mey)&&!edl[i]&&enl[i])
{edx[i]=enx[i];edy[i]=eny[i];edl[i]=1;if(enx[i]>mex)edn[i]=enn[i]=2;
else if(enx[i]<mex) edn[i]=enn[i]=3;
else if(eny[i]>mey) edn[i]=enn[i]=0;
else if(eny[i]<mey) edn[i]=enn[i]=1;else;}
else;}
en=0;
for(i=0;i<gs+3;i++){en=en+enl[i];}
if(en==0){flag=0;win();break;}
else {if(mel==0){flag=0;gl=0;lost();break;};
}
}/*!kbhit xun huan jie shu*/

/*when keyboard hit----------------------------------------------------------------------------------------------------------------*/
key=bioskey(0);
pinghua=0;
while(bioskey(1)) clearb=bioskey(0);
if(key==esc) {flag=0;gl=0;}
else
{if(key==up) {tank(19+20*mex,25+20*mey,men,0);if(map[mey-1][mex]!=1&&map[mey-1][mex]!=3) {mey--;}else;men=0;tank(19+mex*20,25+mey*20,men,mec);}
else
{if(key==down){tank(19+20*mex,25+20*mey,men,0);if(map[mey+1][mex]!=1&&map[mey+1][mex]!=3) {mey++;}else;men=1;tank(19+mex*20,25+mey*20,men,mec);}
else
{if(key==left){tank(19+20*mex,25+20*mey,men,0);if(map[mey][mex-1]!=1&&map[mey][mex-1]!=3) {mex--;}else;men=2;tank(19+mex*20,25+mey*20,men,mec);}
else
{if(key==right){tank(19+20*mex,25+20*mey,men,0);if(map[mey][mex+1]!=1&&map[mey][mex+1]!=3) {mex++;}else;men=3;tank(19+mex*20,25+mey*20,men,mec);}
else
{if((key==enter||key==a||key==A)&&!mdl&&!msf){mdx=mex;mdy=mey;mdn=men;mdl=1;}
else{if((key==enter||key==a||key==A)&&msf) {map[mey][mex]=2;msfl++;msf=0;dilei(550,1,1);paodan(550,1,4);}
}
}
}
}
}}

}/*end of while(flag)*/
}/*end of for function*/
end();
closegraph();
getch();
}


简单的快乐着~
2007-06-26 00:25
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
打包文件包括以上代码及头文件

简单的快乐着~
2007-06-26 00:27
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
都没人看看么

简单的快乐着~
2007-07-05 21:11
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
终于有人回应一下了,,谢谢孔明老大了

简单的快乐着~
2007-07-08 22:35
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
收到以后会注意,呵呵

简单的快乐着~
2007-07-09 16:33
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
多谢各位支持:)

简单的快乐着~
2007-07-22 23:16
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
呵呵,我会注意的....补发一下编译好的可执行文件,方便大家看看运行结果:)(1楼第二个文件)

简单的快乐着~
2007-10-29 22:24
奔跑的鸟
Rank: 1
等 级:新手上路
帖 子:391
专家分:0
注 册:2006-1-20
收藏
得分:0 
回复 第38楼 zqy110007 的帖子
你重新编译一下试试看

简单的快乐着~
2008-11-28 13:46
快速回复:[开源][原创自己做的坦克游戏(处女作).完成版
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022713 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved