PDA

View Full Version : Problems with my and other peoples balls


Rovastar
25th October 2001, 20:00
I thought that I would try playing with Krashs bounching ball program and made a preset but there are loads of problems with it not with my preset i think but the transitions.
I think what happens is that when going from krash normal bouncing ball to my own in the transitions process it also copies across some the the user-defined variables. Which can mess up both presets.
Try switching between them (allowing time for transitions to take place) The gravity and max values all seem to get messed up.

[preset00]
fRating=3.000000
fGammaAdj=2.000000
fDecay=0.980000
fVideoEchoZoom=1.000000
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=0
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=0
bTexWrap=0
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=12
nMotionVectorsY=9
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=1.000000
fWaveScale=0.059958
fWaveSmoothing=0.000000
fWaveParam=-0.380000
fModWaveAlphaStart=0.750000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=1.000000
fWarpScale=1.000000
fZoomExponent=1.000000
fShader=0.000000
zoom=1.000000
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.000000
sx=1.000000
sy=1.000000
wave_r=0.500000
wave_g=0.500000
wave_b=0.500000
wave_x=0.500000
wave_y=0.500000
ob_size=0.000000
ob_r=0.000000
ob_g=0.000000
ob_b=0.000000
ob_a=0.000000
ib_size=0.000000
ib_r=0.000000
ib_g=0.000000
ib_b=0.000000
ib_a=0.000000
per_frame_1=warp=0;
per_frame_2=dx=-0.0005;
per_frame_3=dy=-0.0005;
per_frame_4=right_extreme = 0.8;
per_frame_5=left_extreme = 0.2;
per_frame_6=bottom_extreme = 0.1;
per_frame_7=top_extreme = 0.9;
per_frame_8=x_start_speed = 0.023;
per_frame_9=x_speed_loss = 1;
per_frame_10=gravity = 0.001;
per_frame_11=y_start_speed = 0.035;
per_frame_12=y_speed_loss = 0;
per_frame_13=initialise = 0;
per_frame_14=direction = if(equal(initialise,1),1,direction);
per_frame_15=x_speed = if(equal(initialise,1),x_start_speed,x_speed);
per_frame_16=y_speed = if(equal(initialise,1),y_start_speed,y_speed);
per_frame_17=wave_x_mod = if(equal(initialise,1),right_extreme - 0.5,wave_x_mod);
per_frame_18=wave_y_mod = if(equal(initialise,1),0.001,wave_y_mod);
per_frame_19=initialise = 0;
per_frame_20=direction = if(above(wave_x_mod,(right_extreme - 0.5)),-1,if(below(wave_x_mod,(left_extreme - 0.5)),1,direction));
per_frame_21=bounce = below(wave_y_mod,0) + equal(wave_y_mod,0) + above(wave_y_mod,(top_extreme - bottom_extreme)) + equal(wave_y_mod,(top_extreme - bottom_extreme));
per_frame_22=x_speed = x_speed*if(equal(bounce,0),1,x_speed_loss)*if(above(wave_x_mod,(right_extreme - 0.5)),x_speed_loss,if(below(wave_x_mod,(left_extreme - 0.5)),x_speed_loss,1))*if(equal(y_speed,0),x_speed_loss,1);
per_frame_23=wave_x_mod = wave_x_mod + direction*x_speed;
per_frame_24=wave_x = wave_x + wave_x_mod;
per_frame_25=y_speed = y_speed - if(equal(bounce,0),if(equal(y_speed_loss,1),0,gravity),2*y_speed) - equal(y_speed_loss,1)*gravity;
per_frame_26=y_speed = if( above( wave_y_mod, 0 ), if( below( wave_y_mod, 0.001 ), if( below( abs( y_speed ), gravity*1.01 ), 0, y_speed ), y_speed ), if(below(y_speed, 0), -y_speed*0.9, y_speed));
per_frame_27=wave_y_mod = wave_y_mod + y_speed;
per_frame_28=wave_y = bottom_extreme + wave_y_mod;
per_frame_29=wave_r = bass/2;
per_frame_30=wave_b = treb/2;
per_frame_31=wave_g = mid/2;
per_frame_32=wave_mystery = -0.360 +(bass/40)
per_pixel_1=zoom = 0.4+rad*1.4;
per_pixel_2=rot = abs(sin(rad/2))-0.25;

Sorry if this sound a bit mad but just put mine and Krash's into the same directory with nothing else and keep changing between them. A bit messed up. Mine should bounce nearly all over the screen and Krash orginal never gets about half way????

Does anyone understand me enough for me to post this in the troubleshooting section? Am I totally wrong and crazy??


..................

Sorry it seems to be any other preset transistion can cause the bouncing ball preset to fuck up. That I think is why people have had so many problem with this preset.

..........

Thinking more maybe it is your code Krash when the transition before bouncing ball take place it is not always initialising correctly. eg some of the if statements think that the max values has been reached therefore stopping the bouncing ball.

Did anyone understand a word of that?

Rovastar

unchained
25th October 2001, 23:22
Correct. User variables are not just persistant, they're "universally persistant". I've tried my best to do bounds-checking when initializing all of my re-used variables

Do something like this:

init=equal(init,magic_key);

Then, in every line where you use persistant variables, do something like:

if(equal(init,1),[some initial value],[normal variable handling]);

Then, at the end of the code:

magic_key=time*(rand(8)+1);


Hope this helps you out with your balls.

--
unchained

unchained
26th October 2001, 01:08
doh, add an:

init=magic_key;

at the end there :)

Krash
26th October 2001, 04:32
I found a simp0le solution that at least works for the bouncing balls.

delete the second line where initialise is declared.
the first time initialise is declared: initialise = progress + 1;

This works just fine - the ball bounces around like crazy while the transition is going on, but after that, it's fine.

- Krash

ryan
31st May 2002, 05:41
Anyone still have this code? if so can you post it?

Krash
31st May 2002, 14:50
It's not really all that useful for making presets - it was really just an experiment. But here's the preset anyway.

- Krash

ryan
31st May 2002, 19:53
Thanks Krash... I decided not to really comment on the uhh thread name... hehe..... Now Looks like I better get some Doritos and a 6 pack of Mello Yellow.. This may take some time to figure out =)....

Rovastar
31st May 2002, 20:12
:)

As punishment for resurecting this really old thread idiot you can fix this so works properly. USing the new init stuff. Come on you are getting better aren't you.:)

Ummh is the Ball of COmbustion preset a better version of this???

ryan
31st May 2002, 20:33
Ack... Rova... Might as well nothing else to do...

Krash
1st June 2002, 00:10
Originally posted by Rovastar

Ummh is the Ball of COmbustion preset a better version of this??? Indeed it is. bouncing ball + digital flame = ball of combustion

- Krash