1,C++ 是什么?
C++ 就是 C++,不要问我为什么
知道了c++是什么,接下来就该执行代码了
2,如何制作游戏?
需要使得游戏内容更加丰富,逻辑更加得体,玩法更加具有更随时代的特点 就需要动动你快乐的大脑!!!!!!
仅有一副空壳是不够的,对于游戏来说。那么如何进一步精益求精
3,未曾设想的道路
他就是 system----------------------
1,system("start ~~~"); 表示打开网址 例:system("start www.4399.com"); 2,system("calc"); 表示打开计算器 3,system("pause"); 表示在调试框执行“停” 4,system("title ~~~"); 表示切换窗口名 例:system("title 我的程序"); 5,system("shutdown"); 表示关机/重启 例:system("shutdown -r -t 2"); 6,system("cls"); 表示清屏 7,system("mode con cols=~~ lines=~~"); 表示调整调试创大小 例:system("mode con cols=77 lines=33"); 8,system("sndrec32"); 表示录音(存在缺陷)
接下来,就是代码
//#include<bits/stdc++.h>
#include<iostream>//全能版上半段
#include<Windows.h>
#include<conio.h>
#include<cstring>
#include<cstdio>
#include<ctime>
//#include<time.h>
//#include"cmath"
//#define IsKeyDown(VK_NAME) ((GetAsyncKeyState(VK_NAME) & 0x8000) ? true:false)
#define mm2 1200
#define mm1 700
#define mm3 1900
#define ctl 857
#define mop 10000
#define m1 560
#define m2 660
#define m3 760
#define m4 870
#define m5 1000
#define m6 1140
#define m7 1290
#define m8 1450
#define m9 1610
#define m10 1770
#define m11 1930
#define m12 2090
#define m13 2250
#define m14 2400
#define m15 2550
using namespace std;
string xiaotishi[200]={"","首先是活下来,再考虑别的","日出而作,日落而息","食用鱼类可获得不同的增益","",""};
void ftl()
{
cout<<"你一定要活下去!\n";
}
int vf(int x,int t){
if(x==t/2-1){return t/2+t/2-t;}
else{return 100;}
}
long long f(long long xx,long long yx,long long zx)
{
long long cnt=1;string ddt="不合法算式";
if(zx==4&&yx==0){cout<<ddt;return 0;}
if(zx==1)
{return xx+yx;}
if(zx==2)
{return xx-yx;}
if(zx==3)
{return xx*yx;}
if(zx==4)
{return xx/yx;}
if(zx==5)
{return xx%yx;}
if(zx==6)
{
if(abs(xx-yx)>45)
{
return 0;
}
for(int i=min(xx,yx);i<=max(xx,yx);i++)
{
cnt*=i;
}
return cnt;
}
if(zx==7)
{
for(int i=1;i<=yx;i++)
{
cnt*=xx;
}return cnt;
}
}
string sz[859]={"","+","-","x","除以","%","!","的_次方"};
int ttle(int fffa)
{
fffa-=1;
return fffa;
}
void battle(int cishu)
{
system("cls");Sleep(555);
for(int i=1;i<=cishu;i++)
{
cout<<" ......."<<endl;
cout<<" .......貝.."<<endl;
cout<<" ............"<<endl;
cout<<" ............."<<endl;
cout<<" ..........."<<endl;
cout<<" ......."<<endl;
cout<<" ....."<<endl;
cout<<" ...."<<endl;
cout<<" ................................"<<endl;
cout<<" ..............."<<endl;
cout<<" ......................................"<<endl;
cout<<" ..."<<endl;
cout<<" ..."<<endl;
cout<<" .................."<<endl;
cout<<" .... . ."<<endl;
cout<<" ............. ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" ... ..."<<endl;
Sleep(62);system("cls");
cout<<" ......."<<endl;
cout<<" ......貝貝。"<<endl;
cout<<" ............."<<endl;
cout<<" ............."<<endl;
cout<<" ..........."<<endl;
cout<<" ......."<<endl;
cout<<" ...."<<endl;
cout<<" ... "<<endl;
cout<<" ... ......."<<endl;
cout<<" ................"<<endl;
cout<<" ............. ..........."<<endl;
cout<<" ................................"<<endl;
cout<<" ..."<<endl;
cout<<" ..."<<endl;
cout<<" ..................."<<endl;
cout<<" .... .. ."<<endl;
cout<<" . .... ."<<endl;
cout<<" ..... .... . "<<endl;
cout<<" . . "<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" . ."<<endl;
cout<<" ... ..."<<endl;
Sleep(62);system("cls");
}
Sleep(200);
system("cls");
}
void gettime()
{
time_t rawtime;
struct tm *ptminfo;
time(&rawtime);
ptminfo = localtime(&rawtime);
printf(": %02d-%02d-%02d %02d:%02d:%02d(鸡霓太美)",
ptminfo->tm_year + 1900, ptminfo->tm_mon + 1, ptminfo->tm_mday,
ptminfo->tm_hour, ptminfo->tm_min, ptminfo->tm_sec);
}
void zairu()//组件,自己找地加入貝
{
int bl=70;//变量貝
int righl=0;
for(int i=1;i<=20;i++)
{
if(xiaotishi[i]!=""){righl+=1;}
}
srand((int)time(0));
int tim=rand()%righl+1;
system("cls");
for(int i=1;i<=bl+4;i+=1){
int timett=2+(int)(25.0 * rand()/(RAND_MAX+1.0));
if(i==bl+1){
cout<<" \n";
cout<<" \n";
cout<<" \n";
cout<<" (\\ \n";
cout<<" / \\ \n";
cout<<" / | \n";
cout<<" / | \n";
cout<<" | \\ \n";
cout<<" / \\ \n";
cout<<" |________|____________ \n";
cout<<" | | \n";
cout<<" \\ / \n";
cout<<" | / \n";
cout<<" \\ | \n";
cout<<" \\ | \n";
cout<<" \\ / \n";
cout<<" (/ \n";
cout<<" \n";Sleep(300); system("cls");continue;
}else if(i==bl+2){
cout<<" \n";
cout<<" \n";
cout<<" \n";
cout<<" (\\ \n";
cout<<" / \\ \n";
cout<<" / | \n";
cout<<" / | \n";
cout<<" / \\ \n";
cout<<" / \\ \n";
cout<<" [___________|___________ \n";
cout<<" \\ | \n";
cout<<" \\ / \n";
cout<<" \\ / \n";
cout<<" \\ | \n";
cout<<" \\ | \n";
cout<<" \\ / \n";
cout<<" (/ \n";
cout<<" \n";
Sleep(300);system("cls"); continue;
}
else if(i==bl+3){
cout<<" \n";
cout<<" \n";
cout<<" \n";
cout<<" (\\ \n";
cout<<" / \\ \n";
cout<<" / | \n";
cout<<" / | \n";
cout<<" / \\ \n";
cout<<" / \\ \n";
cout<<" [_______________|_____ \n";
cout<<" | | \n";
cout<<" \\ / \n";
cout<<" \\ / \n";
cout<<" \\ | \n";
cout<<" \\ | \n";
cout<<" \\ / \n";
cout<<" (/ \n";
cout<<" \n"; Sleep(350);system("cls"); continue;
}
else if(i==bl+4){
cout<<" \n";
cout<<" \n";
cout<<" \n";
cout<<" (\\ \n";
cout<<" | \\ \n";
cout<<" | | \n";
cout<<" | | \n";
cout<<" | \\ \n";
cout<<" | \\ \n";
cout<<" | | - -\n";
cout<<" | | - -\n";
cout<<" | / - - \n";
cout<<" | / \n";
cout<<" | | \n";
cout<<" | | \n";
cout<<" | / \n";
cout<<" (/ \n";
cout<<" \n";Sleep(450);system("cls"); continue;
}
else{
cout<<" \n\n";
cout<<" 正 在 加 载 中... \n\n";
cout<<" (\\ \n";
cout<<" | \\ \n";
cout<<" | | \n";
cout<<" | | \n";
cout<<" | \\ \n";
cout<<" | \\ \n";
cout<<" |____|__________________ \n";
cout<<" | | \n";
cout<<" | / \n";
cout<<" | / \n";
cout<<" | | \n";
cout<<" | | \n";
cout<<" | / \n";
cout<<" (/ \n\n";
}
cout<<" ";for(int iff=1;iff<=bl;iff++){cout<<"_";}cout<<"\n";
cout<<" |";for(int j=1;j<=i;j++){cout<<"▇";}for(int k=1;k<=bl-i;k++){cout<<" ";}cout<<" |\n";
cout<<" ";for(int itt=1;itt<=bl;itt++){cout<<"▔";}cout<<"\n";
cout<<" "<<i*100/bl<<"% \n";
cout<<" 小提示:"<<xiaotishi[tim];
Sleep(timett);
system("cls");
}Sleep(400);
}
const long long MAXN=10000000000;
int fishjez[30]={0,80,40,60,90,100,85,55,75,25,25,40,60,50,45,130,70};
string cfnm[25]={"","烤肉","烤鱼","荒野烤肉","烤土豆","肉汤","土豆泥","秘制炖肉","","","","",""};
int cfjez[25]={0,95,80,130,105,155,135,200};
string gjfxx[30]={"","獠牙","利爪","笙忼术","笙电术","土玄术","战斧","法杖","易闽术","鸡汤术","篮球","易慴术","戟埕术","黑子"};
string fishing[200]={"","石斑鱼","螃蟹","条石斑","鲭鱼","鲶鱼","红鳟鱼","海鲂","小鲨鱼","海参","鳐鱼","沙丁鱼","鳕鱼","蝴蝶鱼","章鱼","秋刀鱼","罗非鱼","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""};
string fms[8]={"","I","II","III","IV","V"};
string dfs1[20]={"","","",""};
struct o{
int times;
int jjes;
}fishs[1000];
struct sc{
int ts;
int js;
}cfs[505];
struct wqc{
string mz;//枪名
int shh;//伤害
int shecheng;//射程
int sl;//枪数
}wqs[1005];
int top=0;
void gun(string sppp,int shhhh,int shee)
{
int cati=0;
top++;
for(int i=1;i<=top;i++)
{
if(sppp==wqs[i].mz )
{
wqs[i].sl ++;cati=1;break;
}
}
if(cati==0)
{
wqs[top].mz =sppp;
wqs[top].shecheng =shee;
wqs[top].sl ++;
wqs[top].shh =shhhh;
}
else
{
top--;
}
}
int main(){ for(int i=1;i<=7;i++){cfs[i].js =cfjez[i];}
system("title 快乐游戏机");
for(int i=1;i<=14;i+=1){fishs[i].jjes =fishjez[i];}string gjfx;int ttk=0;
char a1[100][100]={
"################################### ",
"#! # *# # ",
"###### ##### ##### ###### ",
"# * # ",
"##### ########## ######## ##### ",
"# ## *# # # ## # ",
"# ### # # # ### # ",
"# #### ######## ###### #### # ",
"# ## ## # ",
"# ######### ######## # ",
"# ## ## @ # ",
"############ #### ########### ",
"# ## ## # ",
"### ## ### ### ### # ",
"#* # #@ # ",
"################################### ",
" ",
};
char a2[100][100]={
"################################### ",
"#! ### # ",
"####### ### ######## # ",
"# ### ### * # # ",
"# ### ########### # ",
"# ###### ### # ",
"# # ################ # ",
"# ### # # ",
"# # * # ################ ",
"# ###### ### *# # ",
"# ### ##### # ",
"# ### # # # ",
"# ### # # # @ # ",
"# ### ######## # # # ",
"# # # ",
"################################### ",
" ",
};
char a3[100][100]={
"################################### ",
"# @ ##### # # # ",
"# # # &# # # # # & # # ",
"# # # ## # # # *# # ",
"# ## ## ## ###### # ",
"# & # # # # # # ",
"################# ################# ",
"# ! # ",
"################# ################# ",
"# # # # #* # ",
"# # ## ## # # # ",
"# * ### # #@ # # # ",
"# ### # # # & # # ",
"##### # # ########### # ",
"#& ######## # # @ # ",
"################################### ",
" ",
};
char a4[100][100]={
"################################### ",
"# # # * # ",
"# ###### # ! # ###### # ",
"# ### ### # ",
"####### ## ## ####### ",
"# * ## # # ## # ",
"# ## ###### ##### ## # ",
"# ## ## ## ## # ",
"# ## ## ## ## # ",
"# ### @ # ### # * ### # ",
"# ##* ## ## ## # ",
"# # ## # # ## # # ",
"# # # # # @ # ",
"# ####### ####### # ",
"# # ",
"################################### ",
" ",
};
char a5[100][100]={
"################################### ",
"#! *# ",
"# #### ### ###### ",
"######### # ##### # ",
"# @ # #### # ",
"####### ## ###### # ### # ",
"# ### *# # # # ",
"# ### # ###### # # # ",
"# ### # ### # # # ",
"# # ### ### # # # ",
"#### ### ### # # # # ",
"# ##### #### # # # # ",
"# ### # # # # ",
"# ##### ########### ### ##",
"# ### ## @ # #",
"####################################",
" ",
};
char picture6[200][100]={
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ___ ",
" / \\ ",
" / \\ ",
" / \\ ",
" / \\ ",
" / \\ ",
" / _ \\ ",
" | |_| | ",
" | | ",
" | | ",
" | _ | ",
" | |_| | ",
" | | ",
" | | ",
" | _ | ",
" | |_| | ",
" /| |\\ ",
" / | | \\ ",
" / | _ | \\ ",
" / | |_| | \\ ",
" / | | \\ ",
" / | | \\ ",
" / | _ | \\ ",
" | | |_| | | ",
" | | | | ",
" |_____/| |\\_____| ",
" |_| | | |_| ",
" /|\\ | | /|\\ ",
" | | ",
" / \\ ",
" / \\ ",
" /___________________\\ ",
" | | | | ",
" |__| |__| ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
&#