Random Falling Snow
#1
Posted 09 September 2007 - 02:04 PM
#2
Posted 10 September 2007 - 07:53 PM
#3
Posted 10 September 2007 - 07:59 PM
#4
Posted 10 September 2007 - 08:02 PM
#5
Posted 10 September 2007 - 08:09 PM
#6
Posted 10 September 2007 - 08:20 PM
Then, you can copy and paste the FFC's from that screen to all the other ones that you'd like. So the function of the script, based on your description, wouldn't really be necessary. Just set it up once, and copy it to all the rest of the screens.
#7
Posted 11 September 2007 - 03:21 AM
Well here's why it would suck;
ffc script snow{
void run(int speed, int bounce, int x_accell, int y_accel, int rnd){
int snows = 0;
flake = Screen->LoadFFC(32);
flake2 = Screen->LoadFFC(31);
flake3 = Screen->LoadFFC(30);
flake4 = Screen->LoadFFC(29);
while(true){
if (snows == 0){
flake->Vy = -1
flake->Vx = 0
//Aarg! etc etc....just for snow....
snows ++; // or snows = snows + Rand(rnd);
} if (snows == 1){
flake->Vy = flake->Vy + (bounce);
flake->Vx = flake->Vx - (bounce);
flake->Vy = +1;
//etc
}
//mess with accell or speed
if (flake->Vx < - speed) { flake->Vx = - speed; }
if (flake->Vy > speed) { flake->Vy = speed; }
flake->Y + y_accell;
flake->X = flake->X + Rand(rnd);
}
}
if (flake->X > 260) { flake->X = this_ffc->X }
if (flake->Y > 180) { flake->Y = this_ffc->Y } //return to top;
//and on....
Well there's some idea's for you.
Have fun!
Edited by Gleeok, 11 September 2007 - 03:23 AM.
#8
Posted 11 September 2007 - 08:09 AM
Gleeok, are you posting that to make a point? Because I don't know Zscript well enough to know what you're getting at. I'm guessing that that script is just the beginning of a large, complex script that would be necessary to handle this task. Am I on the mark?
#9
Posted 11 September 2007 - 09:37 AM
I'd suggest coding the screen to draw dots rather than using FFC's for the flake, because you can only have a handfull of FFC's on each screen, and you don't want to have to set each snowflake up individually
#10
Posted 11 September 2007 - 09:51 AM
Gleeok, are you posting that to make a point? Because I don't know Zscript well enough to know what you're getting at. I'm guessing that that script is just the beginning of a large, complex script that would be necessary to handle this task. Am I on the mark?
Well basically I put all the idea's out there; speed,accell,bounce(dancing snowflakes),randomness. I left out the waitframes though, you might want those...But yes. Something like that would be ridiculous (for me anyway) just for .........snow. *shoots milk out nose* It would contain lots of little and random increments here and there. You could spend that much effort scripting up an awesome custom boss. But as is, it's about 1/4 done.
Linkus, the easiest way would be to make tile animations about 400 to 600 tiles long. Don't worry, there'd be alot of "blank" tiles. mostly blank actually. Each combo would start at a different spot, ..say 20-60 tiles apart, and depending on where you place them on the screen, it's different every time. Random!..almost. It's not that hard, there's alot of copy/paste involved. That's how I do Custom Boss animation for special attacks and such. Give it a shot.
Oh and for future reference; If the post read "Super devestating Boss that shoot's lasers and summons enemies!!!.....and bakes cakes!" Then there might be a greater chance of a completed script. Not that your idea is not good, just that it's kinda hard to script.
-Actually, this might be reletively simple with ZASM. I no nothing about that though....
Explain please. Could you post a small mockup script perchance?
Edited by Gleeok, 11 September 2007 - 09:57 AM.
#11
Posted 21 September 2007 - 03:45 PM
#12
Posted 22 September 2007 - 12:09 AM
I think the snow should use the pixel command and just keep track of the coords of each.
There's probably a bunch of ways to make this easy to script. Problem is no one wants to explain stuff like draw and pixel or whatever, so not many people know how it works.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users