弾幕のプチテストプレイその3
Posted: 2009年12月20日(日) 19:01
例によって龍神録仕様でコードを書きますので、お気軽にしてみて下さい。
テストプレイした後で指摘、感想、意見等よろしくお願いします。
void boss_shot_bulletH032(){
#define TM032 300
int s,i,k,t=boss_shot.cnt%TM032,t2=boss_shot.cnt;
double angle=bossatan2();
static int n,c,b,cnum;
if(t2==0){//最初なら
cnum=0;
b=150;
n=25;
c=8;
}
if(t%6==0){
for(s=-5;s<6;s+=2){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =8;
boss_shot.bullet[k].col =c;
boss_shot.bullet[k].x =boss.x+40;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =bossatan4(boss_shot.bullet[k].x,boss_shot.bullet[k].y)+(PI/180*n*s);
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =5;
boss_shot.bullet[k].state =0;
se_flag[0]=1;
}
}
}
if(t%6==0){
for(s=-5;s<6;s+=2){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =8;
boss_shot.bullet[k].col =c;
boss_shot.bullet[k].x =boss.x-40;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =bossatan4(boss_shot.bullet[k].x,boss_shot.bullet[k].y)+(PI/180*n*s);
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =5;
boss_shot.bullet[k].state =0;
se_flag[0]=1;
}
}
}
if(t%b==0){
for(s=1;s<3;s++){
for(i=0;i<8;i++){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =0;
boss_shot.bullet[k].col =4;
boss_shot.bullet[k].x =boss.x;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =angle+PI2/8*i;
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =2;
boss_shot.bullet[k].state =s;
se_flag[0]=1;
}
}
}
}
for( i=0; i < BOSS_BULLET_MAX; i++ ){
if( boss_shot.bullet.flag > 0 ){
int state = boss_shot.bullet.state;
if(state==1)
boss_shot.bullet.angle-= PI/10/36;
if(state==2)
boss_shot.bullet.angle+= PI/10/36;
}
}
if(t==0){
if(cnum>1){
for(i=0;i<24;i++){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =11;
boss_shot.bullet[k].col =5;
boss_shot.bullet[k].x =boss.x;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =PI2/24*i;
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =2.3;
boss_shot.bullet[k].state =3;
se_flag[0]=1;
}
}
}
}
for( i=0; i < BOSS_BULLET_MAX; i++ ){
if( boss_shot.bullet.flag > 0 ){
int state = boss_shot.bullet.state;
if(t==70){
if(state==3){
boss_shot.bullet.angle = bossatan4(boss_shot.bullet.x,boss_shot.bullet.y);
boss_shot.bullet.spd -= rang(0.4);
}
}
}
}
if(t==299){
cnum++;
if(cnum==2){
n=20;
c=0;}
if(cnum==4){
n=15;
c=3;
b=100;}
if(cnum==6){
n=12;
c=5;}
if(cnum==8)
b=75;
if(cnum==8)
b=60;
}
}
この弾幕は3面ボスがラストで使う予定です(ラストは少し難易度高めに)。
それもふまえて指摘などよろしくお願いします。
テストプレイした後で指摘、感想、意見等よろしくお願いします。
void boss_shot_bulletH032(){
#define TM032 300
int s,i,k,t=boss_shot.cnt%TM032,t2=boss_shot.cnt;
double angle=bossatan2();
static int n,c,b,cnum;
if(t2==0){//最初なら
cnum=0;
b=150;
n=25;
c=8;
}
if(t%6==0){
for(s=-5;s<6;s+=2){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =8;
boss_shot.bullet[k].col =c;
boss_shot.bullet[k].x =boss.x+40;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =bossatan4(boss_shot.bullet[k].x,boss_shot.bullet[k].y)+(PI/180*n*s);
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =5;
boss_shot.bullet[k].state =0;
se_flag[0]=1;
}
}
}
if(t%6==0){
for(s=-5;s<6;s+=2){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =8;
boss_shot.bullet[k].col =c;
boss_shot.bullet[k].x =boss.x-40;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =bossatan4(boss_shot.bullet[k].x,boss_shot.bullet[k].y)+(PI/180*n*s);
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =5;
boss_shot.bullet[k].state =0;
se_flag[0]=1;
}
}
}
if(t%b==0){
for(s=1;s<3;s++){
for(i=0;i<8;i++){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =0;
boss_shot.bullet[k].col =4;
boss_shot.bullet[k].x =boss.x;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =angle+PI2/8*i;
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =2;
boss_shot.bullet[k].state =s;
se_flag[0]=1;
}
}
}
}
for( i=0; i < BOSS_BULLET_MAX; i++ ){
if( boss_shot.bullet.flag > 0 ){
int state = boss_shot.bullet.state;
if(state==1)
boss_shot.bullet.angle-= PI/10/36;
if(state==2)
boss_shot.bullet.angle+= PI/10/36;
}
}
if(t==0){
if(cnum>1){
for(i=0;i<24;i++){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =11;
boss_shot.bullet[k].col =5;
boss_shot.bullet[k].x =boss.x;
boss_shot.bullet[k].y =boss.y;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].angle =PI2/24*i;
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].spd =2.3;
boss_shot.bullet[k].state =3;
se_flag[0]=1;
}
}
}
}
for( i=0; i < BOSS_BULLET_MAX; i++ ){
if( boss_shot.bullet.flag > 0 ){
int state = boss_shot.bullet.state;
if(t==70){
if(state==3){
boss_shot.bullet.angle = bossatan4(boss_shot.bullet.x,boss_shot.bullet.y);
boss_shot.bullet.spd -= rang(0.4);
}
}
}
}
if(t==299){
cnum++;
if(cnum==2){
n=20;
c=0;}
if(cnum==4){
n=15;
c=3;
b=100;}
if(cnum==6){
n=12;
c=5;}
if(cnum==8)
b=75;
if(cnum==8)
b=60;
}
}
この弾幕は3面ボスがラストで使う予定です(ラストは少し難易度高めに)。
それもふまえて指摘などよろしくお願いします。