Old 11th April 2011, 08:51   #1
Junior Member
Join Date: Feb 2011
Location: Australia
Posts: 40
Odd sprite behaviour - Variable problem?


So I can't figure out what root cause of this problem is...

Basically if I load multiple sprites they do weird things (usually). For example, if I load a second or third sprite one of the other sprites will change size or start moving in the same way another sprite is moving. This seems to indicate that the sx and sy variables are being shared amongst the sprites? However sometimes I can load multiple sprites and they all have no problems at all (they all stay their defined sizes and keep moving as scripted).

Anyone have a good explanation of how the sprite variables are held in memory? Or what could be causing this problem?

I've purposely made the variable names different as I thought that may have been the problem, but it made no difference. Here's an example of 3 sprites that misbehave if loaded one after the other:

init_1=blendmode = 4;
init_2=pulsespeed = 3;
init_3=scalevalue = 0.5;
code_1=new_scale = scalevalue;
code_2=sx = new_scale;
code_3=sy = new_scale;
code_4=x = .8;
code_5=y = .5;
code_6=a = (time - 1);

init_1=blendmode = 4;
init_2=VSCRBF_scale = 0.8;
code_1=VSCRBF_newScale = VSCRBF_scale;
code_2=sx = VSCRBF_newScale;
code_3=sy = VSCRBF_newScale;
code_4=x = 0.5;
code_5=y = 0.5;
code_6=rot = 0.4 * sin(time * 2);
code_7=a = (time - 0.5);

init_1=blendmode = 4;
init_2=LRTCP_scale = 1.9;
init_3=LRTCP_pulseSpeed = 2;
code_1=LRTCP_newScale = (0.75 + 0.1*sin(time*LRTCP_pulseSpeed) - .30) * LRTCP_scale;
code_2=sx = LRTCP_newScale;
code_3=sy = LRTCP_newScale;
code_4=x = 0.5;
code_5=y = 0.275;
code_6=a = (time - 0.5);

If I load img01 then img02 then img03, then img01 increases massively in size. img01 will always increase to the same size regardless of what scale size img02 or img03 are set it. If I load them in a 3, 2, 1 order then img03 increases in size. I I load 2, 3, 1 then 2 and 1 will increase in size AND 1 will start rocking back and forth like 2 is set to do.

Any ideas guys? I can't seem to figure out the connections here...
LlamaLlamaLamp is offline   Reply With Quote
Old 11th April 2011, 08:58   #2
Junior Member
Join Date: Feb 2011
Location: Australia
Posts: 40
....hmm, here's another weird piece to the puzzle:

If I close Winamp and open it fresh and then run those sprites in any order they run perfectly fine....

EDIT: hmm, the problem seems to start happening when I load the same image at the same time. Even if I kill all sprites, it screws with almost everything until I restart winamp...

Last edited by LlamaLlamaLamp; 11th April 2011 at 09:02. Reason: ..something else
LlamaLlamaLamp is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop > MilkDrop Troubleshooting Forum

images, milk_img.ini, sprite, sprites

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump