New test scene

very very quickly
Nothing special at all and I do not want it up on the website as yet as it is work in progress.
A brief demno of how if functions and stuff work.
It all goes off in teh render section. This section is basic what happens every frame.
Simple things like changing colour (very (too) basic) to the sounds. Using variables/ Define them first in the initialization section and then changing the distance you are away from teh snake, etc to teh sounds.
Right ghotta dash. I work more o thios later.
SCENE (
"name" = "Warped Rectangle (Remix)";
"author" = "John Baker & Gordon Williams";
SOLID black();
TEXTURE tex();
TEXTURE emap();
BUFLOAD bl();
WARP warp(black,bl);
RENDER r(warp,tex);
BUFSAVE bs(r);
BASSCUBE b(black,bs);
SNAKECUBE w(b,bs);
)
int sx,sy;
float v[10][6],o[10][6],va[10][6],oa[10][6];
float btime;
float mytest;
float mytest2;
float mytest3;
void init() {
black.col = 0;
warp.relative = 1;
warp.subDiv = 5;
for (sy=0;sy<10;sy=sy+1)
for (sx=0;sx<6;sx=sx+1) {
v[sy][sx] = rand()+0.8;
o[sy][sx] = rand()*2.3;
va[sy][sx] = (rand()+1.0)*3.0;
oa[sy][sx] = rand()*4.3;
}
r.count = 4;
r.data[0] = -1;
r.data[1] = -1;
r.data[2] = 1;
r.data[3] = 1;
r.col=rgba(1,1,1,1);
strcpy(r.type,"RECTS_XY");
strcpy(r.shader,"T0;B1a;");
strcpy(tex.filename,"particle_ring.png");
strcpy(emap.filename,"particle_flare.png");
strcpy(w.shader,"T0;D;B10;");
w.taillength = 14;
w.sizedown = -5;
w.dist = 2;
}
void reset() {
btime = 0;
}
void render() {
btime = btime + (timepass*(sounda+soundb+0.5)*2);
bl.handle = bs.handle;
b.kick = sounda*0.2;
if ((sounda+soundb)>1.2) mytest=1.2; else mytest = sounda+soundb;
w.dist = (30 - 10*(mytest));
w.sizedown = mytest2*100000;
if (mytest>0.75) mytest2=btime; else mytest2=0.8 + 0.2*SIN(timepass*0.2257257);
r.col=rgba((0.5+0.5*sin(mytest2*0.6738)),(0.5+0.5*cos(mytest2*0.337)),(0.5-0.5*sin(mytest2*mytest2)),0.1);
w.taillength = -500*(btime);
if (mytest>0.75) mytest3=0.8 + 0.2*SIN(timepass*1.38539); else mytest3=btime;
for (sy=0;sy<10;sy=sy+1)
for (sx=0;sx<6;sx=sx+1) {
warp.x[sy][sx] = (va[sy][sx]*0.01*(mytest3));
warp.y[sy][sx] = (v[sy][sx]*10*(mytest3));
}
warp.relative = 0;
warp.subDiv = 2+(1/mytest3);
warp.amount = mytest*4;
}
Nothing special at all and I do not want it up on the website as yet as it is work in progress.
A brief demno of how if functions and stuff work.
It all goes off in teh render section. This section is basic what happens every frame.
Simple things like changing colour (very (too) basic) to the sounds. Using variables/ Define them first in the initialization section and then changing the distance you are away from teh snake, etc to teh sounds.
Right ghotta dash. I work more o thios later.
SCENE (
"name" = "Warped Rectangle (Remix)";
"author" = "John Baker & Gordon Williams";
SOLID black();
TEXTURE tex();
TEXTURE emap();
BUFLOAD bl();
WARP warp(black,bl);
RENDER r(warp,tex);
BUFSAVE bs(r);
BASSCUBE b(black,bs);
SNAKECUBE w(b,bs);
)
int sx,sy;
float v[10][6],o[10][6],va[10][6],oa[10][6];
float btime;
float mytest;
float mytest2;
float mytest3;
void init() {
black.col = 0;
warp.relative = 1;
warp.subDiv = 5;
for (sy=0;sy<10;sy=sy+1)
for (sx=0;sx<6;sx=sx+1) {
v[sy][sx] = rand()+0.8;
o[sy][sx] = rand()*2.3;
va[sy][sx] = (rand()+1.0)*3.0;
oa[sy][sx] = rand()*4.3;
}
r.count = 4;
r.data[0] = -1;
r.data[1] = -1;
r.data[2] = 1;
r.data[3] = 1;
r.col=rgba(1,1,1,1);
strcpy(r.type,"RECTS_XY");
strcpy(r.shader,"T0;B1a;");
strcpy(tex.filename,"particle_ring.png");
strcpy(emap.filename,"particle_flare.png");
strcpy(w.shader,"T0;D;B10;");
w.taillength = 14;
w.sizedown = -5;
w.dist = 2;
}
void reset() {
btime = 0;
}
void render() {
btime = btime + (timepass*(sounda+soundb+0.5)*2);
bl.handle = bs.handle;
b.kick = sounda*0.2;
if ((sounda+soundb)>1.2) mytest=1.2; else mytest = sounda+soundb;
w.dist = (30 - 10*(mytest));
w.sizedown = mytest2*100000;
if (mytest>0.75) mytest2=btime; else mytest2=0.8 + 0.2*SIN(timepass*0.2257257);
r.col=rgba((0.5+0.5*sin(mytest2*0.6738)),(0.5+0.5*cos(mytest2*0.337)),(0.5-0.5*sin(mytest2*mytest2)),0.1);
w.taillength = -500*(btime);
if (mytest>0.75) mytest3=0.8 + 0.2*SIN(timepass*1.38539); else mytest3=btime;
for (sy=0;sy<10;sy=sy+1)
for (sx=0;sx<6;sx=sx+1) {
warp.x[sy][sx] = (va[sy][sx]*0.01*(mytest3));
warp.y[sy][sx] = (v[sy][sx]*10*(mytest3));
}
warp.relative = 0;
warp.subDiv = 2+(1/mytest3);
warp.amount = mytest*4;
}