
-----------------------------------
nipressure
Tue Dec 04, 2007 11:10 am

Help with &quot;Christmas Animations&quot;
-----------------------------------
I have to make lots of animations for my school (its like a project).

and the program has to relate to holidays and include a lot of animations.

I chose christmas, and I've already done some animations, but I'm having

difficulty making snowflakes. For example,

process snowflake
loop
for decreasing Y:400..152
drawfilloval (225,Y-1,2,2,0)
delay (3)
drawfilloval (225,Y,2,3,blue)
end for
end loop
end snowflake
fork snowflake

this thing only makes one snowflake, and its just one snowflake keep coming back down.

I'm sure there are many other ways to do it, and make it go side ways and stuff, but it's my first

year doing turing and I'm not really good at it. I need help!  :? 

P.S. my snowflake keeps going through my snowman, house...etc(it erases the thing that it passes) is there a way to stop it?

-----------------------------------
HeavenAgain
Tue Dec 04, 2007 12:05 pm

RE:Help with &quot;Christmas Animations&quot;
-----------------------------------
process snowflake
loop
var randomx : int := Rand.Int(0,maxx)
var randomy : int := Rand.Int(0,maxy)
for decreasing Y:400..152
drawfilloval (randomx,Y-1+randomy,2,2,0)
delay (3)
drawfilloval (randomx,Y+randomy,2,3,blue)
end for
end loop
end snowflake
fork snowflake 

LOL, i have no idea how the heck this suppose to look like, but the idea is, dont use process, because it can get really screwed up, and what you should do is use a random x and y cord. and call to it many times, and you'll get your snow flakes at random place falling down

as for your snow flake earsing stuff, draw and update screen in order; draw snow flake first -->> draw snowman -->> clearn screen -->> draw snow flake (but y cord minus) -->> draw snowman (again) -->> clearn screen .... and so on

-----------------------------------
r.m_spy
Tue Dec 04, 2007 1:45 pm

Re: Help with &quot;Christmas Animations&quot;
-----------------------------------
I have to make lots of animations for my school (its like a project).

nice idea

procedure snowflake
loop
for decreasing Y:400..152
drawfilloval (225,Y-1,2,2,0)
delay (3)
drawfilloval (225,Y,2,3,blue)
end for
end loop
end snowflake
fork snowflake

this thing only makes one snowflake, and its just one snowflake keep coming back down.

I'm sure there are many other ways to do it, and make it go side ways and stuff, but it's my first

year doing turing and I'm not really good at it. I need help!  :? 

P.S. my snowflake keeps going through my snowman, house...etc(it erases the thing that it passes) is there a way to stop it?

-----------------------------------
Nick
Tue Dec 04, 2007 3:14 pm

RE:Help with &quot;Christmas Animations&quot;
-----------------------------------
uhhh y did u quote that? and by the way heaven again states is the best so say u want 4 snowflakes var snowx,snowy:array 1..4 of int
loop
cls
for i:1..4
%drawsnow flakes
%snowflakeDraw(i)
snowy(i)-= 3
snowx(i)+=1%this will look like the wind is blowing to the right
end for
%draw other stuff
View.Update
end loop


-----------------------------------
belarussian
Wed Nov 18, 2009 6:13 pm

Re: Help with &quot;Christmas Animations&quot;
-----------------------------------
HERE IS THE REAL CODE THOSE NOOBS KNOW NOTHING THEIR SNOW SUCKS

View.Set ("offscreenonly")
%set up the snow
const NoOfFlakes := 400
var flakeX : array 1 .. NoOfFlakes of int
var flakeY : array 1 .. NoOfFlakes of int

for flake : 1 .. NoOfFlakes
    flakeX (flake) := Rand.Int (0, maxx)
    flakeY (flake) := Rand.Int (0, maxy)
end for

loop
for flake : 1 .. NoOfFlakes
        %Drop The Flake
        flakeY (flake) -= Rand.Int (1, 5)
        %flakeX (flake) += Rand.Int (-1, 1)
        if flakeY (flake) < 0 then
            flakeY (flake) := maxy
            flakeX (flake) := Rand.Int (0, maxx)
        end if
        Draw.FillOval (flakeX (flake), flakeY (flake), 1, 1, white)
    end for
    %Update the screen (because of offscreen only)
    View.Update
    delay (25)
end loop

-----------------------------------
B-Man 31
Wed Nov 25, 2009 9:34 pm

Re: Help with &quot;Christmas Animations&quot;
-----------------------------------
HERE IS THE REAL CODE THOSE NOOBS KNOW NOTHING THEIR SNOW SUCKS

Have you even tried to run your code!?

 You might want to add a background colour! white snow on a white background doesn't show up. also, maybe next time you want to clear the snowflakes before drawing them. so before you go around calling them noobs, make sure your not one either. :D
