~Hakurei Shrine~ > Rika and Nitori's Garage Experiments

I don't even know what this is anymore

Pages: (1/3) > >>

Drake:

But it's amazing.

...Inspired from Windows XP bezier screensaver...?

EDIT: As it stands you need invincibility.


--- Code: ---#TouhouDanmakufu
#Title[what is this]
#Text[i don't even]
#ScriptVersion[2]

script_enemy_main{
let frame = 0;

let ang1 = 90;
let ang2 = 270;
let pos1x = GetCenterX + (50*cos(ang1));
let pos1y = GetCenterY + (50*sin(ang1));
let pos2x = GetCenterX + (100*cos(ang2));
let pos2y = GetCenterY + (100*sin(ang2));

    @Initialize{
        SetLife(10000);
SetScore(1);

bezier(pos1x,pos1y,pos2x,pos2y,90,5,1);
    }

    @MainLoop{
yield;
    }
    @DrawLoop{}
    @Finalize{}

    @BackGround{}

task bezier(x1,y1,x2,y2,p,b,n){
    let a;
    let pos2x = x2;
    let pos2y = y2;
    let pos1x = x1;
    let pos1y = y1;
    let bx;
    let by;
    let dist = 50;
    let distmrk = 1;

    while(frame>=-1){
if(dist<=150 && distmrk==1){
    distmrk=1;
}else if(dist>150 && distmrk==1){
    distmrk=-1;
}else if(dist<=150 && distmrk==-1){
    distmrk=-1;
}else if(dist<=0 && distmrk==-1){
    distmrk=1;
}
dist+=(2*distmrk);
ang1-=2;
ang2+=3;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY + (dist*sin(ang1));
pos2x = GetCenterX + (100*cos(ang2));
pos2y = GetCenterY + (100*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
if(frame%n==0){
    ascent(i in (b*-1)..b){
bx = pos2x + (i*3*cos(a));
by = pos2y + (i*3*sin(a));
CreateShot01(bx,by,0.5,(a-p),RED12,n);
    }
}
    frame++;
    yield;
    }
}//end bezier

}//end script
--- End code ---

Mess around with the values as you see fit. If you can understand what's going on, that is.

EDIT: By the way there's so much room for customization in here you don't even know. The two main angles, the perpendicular line the bullets spawn on, how many bullets spawn and from what distance from each other, the distance between the two points, how the points themselves even move, firing pattern (hell the bullets are only Create01), etc. So much room.

PT8Sceptile:

This is ridiculously awesome!


--- Code: ---#TouhouDanmakufu
#Title[This is awesome!]
#Text[The title says it all...]
#ScriptVersion[2]

script_enemy_main{
let frame = 0;

let colrs = [RED12, GREEN12, BLUE12, PURPLE12, YELLOW12, AQUA12];

    @Initialize{
        SetLife(10000);
SetScore(1);
SetMovePosition01(GetCenterX, GetCenterY - 60, 3);

bezier(GetCenterX, GetCenterY + 20 - 60, GetCenterX, GetCenterY - 40 - 60,85,3,1,0);
bezier(GetCenterX, GetCenterY - 20 - 60, GetCenterX, GetCenterY + 40 - 60,85,3,1,0);
bezier(GetCenterX + 20, GetCenterY - 60, GetCenterX - 40, GetCenterY - 60,85,3,1,0);
bezier(GetCenterX - 20, GetCenterY - 60, GetCenterX + 40, GetCenterY - 60,85,3,1,0);
    }

    @MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;
yield;
    }
    @DrawLoop{}
    @Finalize{}

    @BackGround{}

task bezier(x1,y1,x2,y2,p,b,n,o){
    let a;
    let pos2x = x2;
    let pos2y = y2;
    let pos1x = x1;
    let pos1y = y1;
    let bx;
    let by;
    let dist = 25;
    let distmrk = 1;

let ang1 = atan2(y1, x1);
let ang2 = atan2(y2, x2);
let inang = atan2(y2-y1, x2-x1);

let sidx = 30*cos(inang);
let sidy = 30*sin(inang);

    while(frame>=-1){
if(dist<=150 && distmrk==1){
distmrk=1;
}else if(dist>150 && distmrk==1){
distmrk=-1;
}else if(dist<=150 && distmrk==-1){
distmrk=-1;
}else if(dist<=0 && distmrk==-1){
distmrk=1;
}
dist+=(2*distmrk);
ang1-=8;
ang2+=12;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY -60 + (dist*sin(ang1));
pos2x = GetCenterX + ((50+sidx)*cos(ang2));
pos2y = GetCenterY -60 + ((50+sidy)*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
let offang = rand(-10, 10);
let colr = colrs[rand_int(0, length(colrs) - 1)];
if(frame%n==o){
ascent(i in (b*-1)..b){
bx = pos2x + (i*3*cos(a));
by = pos2y + (i*3*sin(a));
CreateShot01(bx,by,3,(a-p) + offang,colr,n + 5);
}
}
yield;
    }
}//end bezier

}//end script
--- End code ---

Merely a short time of fiddling around with the script resulted in this. And it's still only CreateShot01...

EDIT: More, this is seriously fun.


--- Code: ---#TouhouDanmakufu
#Title[This is too awesome!]
#Text[The title says it all...]
#ScriptVersion[2]

script_enemy_main{
let frame = 0;

    @Initialize{
        SetLife(10000);
SetScore(1);
SetMovePosition01(GetCenterX, GetCenterY - 60, 3);

bezier(GetCenterX, GetCenterY - 60 + 20, GetCenterX, GetCenterY - 60 - 20,85,1,1,0, 0,GREEN12);
bezier(GetCenterX, GetCenterY - 60 + 40, GetCenterX, GetCenterY - 40 - 20,85,1,1,0, 1,AQUA12);
bezier(GetCenterX + 20, GetCenterY - 60, GetCenterX - 20, GetCenterY - 60,85,1,1,0, 2,BLUE12);
bezier(GetCenterX + 40, GetCenterY - 60, GetCenterX - 40, GetCenterY - 60,85,1,1,0, 3,PURPLE12);
    }

    @MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;
yield;
    }
    @DrawLoop{}
    @Finalize{}

    @BackGround{}

task bezier(x1,y1,x2,y2,p,b,n,o,an,c){
    let a;
    let pos2x = x2;
    let pos2y = y2;
    let pos1x = x1;
    let pos1y = y1;
    let bx;
    let by;
    let dist = 90;
    let distmrk = 1;

let ang1 = atan2(y1, x1);
let ang2 = atan2(y2, x2);

    while(frame>=-1){
if(dist<=150 && distmrk==1){
distmrk=1;
}else if(dist>150 && distmrk==1){
distmrk=-1;
}else if(dist<=150 && distmrk==-1){
distmrk=-1;
}else if(dist<=0 && distmrk==-1){
distmrk=1;
}
dist+=(2*distmrk);
ang1-=8;
ang2+=12-an;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY -60 + (dist*sin(ang1));
pos2x = GetCenterX + (50*cos(ang2));
pos2y = GetCenterY -60 + (50*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
if(frame%n==o){
ascent(i in 0..b){
bx = pos2x;
by = pos2y;
CreateShot01(bx,by,0.5,(a-p) + 360*i/b,c,n + 5);
}
}
yield;
    }
}//end bezier

}//end script
--- End code ---

EDIT2: Another test provided yet another interesting effect. If you're going to try these, don't worry about the fact that #1 and #3 are practically impossible.


--- Code: ---#TouhouDanmakufu
#Title[This is way too awesome!]
#Text[The title says it all...]
#ScriptVersion[2]

script_enemy_main{
let frame = 0;

let colrs = [RED12, GREEN12, BLUE12, PURPLE12, YELLOW12, AQUA12];

    @Initialize{
        SetLife(10000);
SetScore(1);
SetMovePosition01(GetCenterX, GetCenterY - 60, 3);

bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,1,2,1);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,2,2,2);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,3,2,3);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,4,2,4);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,5,2,5);
    }

    @MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;
yield;
    }
    @DrawLoop{}
    @Finalize{}

    @BackGround{}

task bezier(x1,y1,x2,y2,p,b,n,o){
    let a;
    let pos2x = x2;
    let pos2y = y2;
    let pos1x = x1;
    let pos1y = y1;
    let bx;
    let by;
    let dist = 25;
    let distmrk = 1;

let ang1 = atan2(y1, x1);
let ang2 = atan2(y2, x2);

    while(frame>=-1){
if(dist<=150 && distmrk==1){
distmrk=1;
}else if(dist>150 && distmrk==1){
distmrk=-1;
}else if(dist<=150 && distmrk==-1){
distmrk=-1;
}else if(dist<=0 && distmrk==-1){
distmrk=1;
}
dist+=(2*distmrk);
ang1-=1*o;
ang2+=1.5*o;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY -60 + (dist*sin(ang1));
pos2x = GetCenterX + (50*cos(ang2));
pos2y = GetCenterY -60 + (50*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
let colr = colrs[rand_int(0, length(colrs) - 1)];
let off = rand(-5, 5);
if(frame%n==0){
bx = pos2x;
by = pos2y;
CreateLaser01(bx,by,rand(1.5, 2.5),(a-p) + off + frame/2,50*b,10,colr,n + 5);
}
yield;
    }
}//end bezier

}//end script
--- End code ---

Massive props for you Drake! Messing around with this provides awesome results even if you don't exactly know what's going on.

Solais:

Dammit, guys, I know nothing about how this works, I suck at math and anything, I'm a complete n00b, but experimenting with this code is fun!!

The thing below is utterly, completely impossible, but it looks great! (Yeah only changed a little...)


--- Code: ---#TouhouDanmakufu
#Title[It's Motherfucking Disco time!]
#Text[FEVER...]
#ScriptVersion[2]

script_enemy_main{
   let frame = 0;

   let colrs = [RED12, GREEN12, BLUE12, PURPLE12, YELLOW12, AQUA12];

    @Initialize{
        SetLife(10000);
      SetScore(1);
      SetMovePosition01(GetCenterX, GetCenterY - 60, 3);

      bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,1,2,1);
      bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,2,2,2);
      bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,3,2,3);
      bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,4,2,4);
      bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,5,2,5);
    }

    @MainLoop{
      SetCollisionA(GetX, GetY, 32);
      SetCollisionB(GetX, GetY, 16);
      frame++;
      yield;
    }
    @DrawLoop{}
    @Finalize{}

    @BackGround{}

task bezier(x1,y1,x2,y2,p,b,n,o){
    let a;
    let pos2x = x2;
    let pos2y = y2;
    let pos1x = x1;
    let pos1y = y1;
    let bx;
    let by;
    let dist = 25;
    let distmrk = 1;
  
   let ang1 = atan2(y1, x1);
   let ang2 = atan2(y2, x2);

    while(frame>=-1){
      if(dist<=150 && distmrk==1){
         distmrk=1;
      }else if(dist>150 && distmrk==1){
         distmrk=-1;
      }else if(dist<=150 && distmrk==-1){
         distmrk=-1;
      }else if(dist<=0 && distmrk==-1){
         distmrk=1;
      }
      dist+=(2*distmrk);
      ang1-=1*o;
      ang2+=1.5*o;
      pos1x = GetCenterX + (dist*cos(ang1));
      pos1y = GetCenterY -60 + (dist*sin(ang1));
      pos2x = GetCenterX + (50*cos(ang2));
      pos2y = GetCenterY -60 + (50*sin(ang2));
      a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
      let colr = colrs[rand_int(0, length(colrs) - 1)];
      let off = rand(-5, 5);
      if(frame%n==0){
         bx = pos2x;
         by = pos2y;
         CreateLaserA(1,bx,by,50*b,10,colr,n+5);
         SetLaserDataA(1, 0, (a-p), 0, 50*b, rand(1.5, 2.5), (a-p) + off + frame/2);
         SetShotKillTime(1,120);
         FireShot(1);
        
      }
      yield;
    }
}//end bezier

}//end script
--- End code ---

EDIT: Holy Shit it freezes at the end! At least not at the start like when I've used curving lasers what moves like the snakes in that spellcard of Nue.

Suikama:

Oh man that Disco one is awesome. :V

Henry:

This looks a lot like danmaku: (and a nice ghostly tail)


--- Code: ---#TouhouDanmakufu
#Title[what is this]
#Text[i don't even know what is this]
#ScriptVersion[2]

script_enemy_main{
let frame = 0;

let ang1 = 90;
let ang2 = 270;
let pos1x = GetCenterX + (100*cos(ang1));
let pos1y = GetCenterY + (100*sin(ang1));
let pos2x = GetCenterX + (-50*cos(ang2));
let pos2y = GetCenterY + (-50*sin(ang2));

    @Initialize{
        SetLife(10000);
SetScore(1);
bezier(pos1x,pos1y,pos2x,pos2y,10,3,2);
    }

    @MainLoop{
yield;
    }
    @DrawLoop{}
    @Finalize{}

    @BackGround{}

task bezier(x1,y1,x2,y2,p,b,n){
    let a;
    let pos2x = x2;
    let pos2y = y2;
    let pos1x = x1;
    let pos1y = y1;
    let bx;
    let by;
    let dist = 100;
    let distmrk = 1;

    while(frame>=-1){
if(dist<=150 && distmrk==2){
    distmrk=2;
}else if(dist>150 && distmrk==2){
    distmrk=-2;
}else if(dist<=150 && distmrk==-2){
    distmrk=-2;
}else if(dist<=0 && distmrk==-2){
    distmrk=2;
}
dist+=(2*distmrk);
ang1-=2.3;
ang2+=3.7;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY + (dist*sin(ang1));
pos2x = GetCenterX + (100*cos(ang2));
pos2y = GetCenterY + (100*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
if(frame%n==0){
    ascent(i in (b*-1)..b){
bx = pos2x + (i*3*cos(a));
by = pos2y + (i*3*sin(a));
ascent(j in 0..2){
   CreateShot01(GetCenterX+(-1)^j*(GetCenterX-bx),GetCenterX+(-1)^j*(GetCenterX-by),3,(a-p)+j*180,RED12,2*n+6*b-i*6);
}
    }
}
    frame++;
    yield;
    }
}//end bezier

}//end script
--- End code ---


Pages: (1/3) > >>

Go to full version