Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Snowfall
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
CSC




PostPosted: Sun Dec 14, 2008 2:28 pm   Post subject: Snowfall

K guys. This is how it is. I got to make a Christmas card, and i need help making snowfall. Can anyone help me please? If its possible, please tell me how u can pile up the snow on the bottom while its snowing. Thank you!
Sponsor
Sponsor
Sponsor
sponsor
ecookman




PostPosted: Sun Dec 14, 2008 2:35 pm   Post subject: RE:Snowfall

you would have to draw a black background or one that white will show up on..
then use the locate function
make a for loop
in the forloop have the y decrease by a value kinda like this


example: an animation i did

Turing:

var f1 : int := Font.New ("Airal:72:bold")
var f2 : int := Font.New ("Airal:20:bold")

for a : 1 .. 20
    locate (5, +a)

    put "      ______"
    locate (6, +a)

    put "     / TTYL \\#########  "
    locate (7, +a)
    put " ___/________\\___"
    locate (8, +a)
    put "/  ____________  \\"
    locate (9, +a)
    put "[-|  |O|  |O|  |-]"
    locate (10, +a)
    put " ----------------  "



    delay (100)

end for


for b : 1 .. 36
    locate (6, 38 + b)
    put ">}OMG)>"
    delay (20)

end for

for i : 0 .. 350
    drawfillbox (maxx div 2 + i, maxy div 2 + i, maxx div 2 - i, maxy div 2 - i, black)
    delay (10)
end for
delay (300)

colorback (black)
color (white)
locate (15, 14)
put "      ______"
locate (15, 14)

put "     / TTYL \\######### >>>>>}OMG)"
locate (16, 14)
put " ___/________\\___"
locate (17, 14)
put "/  ____________  \\"
locate (18, 14)
put "[-|  |O|  |O|  |-]"
locate (19, 14)
put " ----------------  "
delay (1000)


locate (15, 20)
Font.Draw ("GET ONE", 100, 200, f1, white)


delay (3000)
for h : 0 .. 350
    drawfillbox (maxx div 2 + h, maxy div 2 + h, maxx div 2 - h, maxy div 2 - h, 42)
    delay (10)
end for




Font.Draw ("But wait, there is also  the starship enterprise!!!",1,300, f2, brightred)
colorback (42)
color (80)
put"  __...____________________          ,"
put"   `(\\ [ ===NCC-1700===--|__|) ___..--*_`--.._____"
put"     `-----------------| |***` [_**_-___________*_/"
put"                       | |   /..../`*-._.-*`"
put"                   ____| |__/::..*_"
put"                  |\\ **.*** *_____//\\"
put"                   ***-.   *****  \\/"
put"                       **********"





in the for loop the +a simply says every time you repeat add one to me

so like
1 loops
2 loops
3 loops


you just have to play with the locate function and the y corr.
CSC




PostPosted: Sun Dec 14, 2008 2:43 pm   Post subject: RE:Snowfall

Umm isn't there a way to make snow fall using Random integer?
ecookman




PostPosted: Sun Dec 14, 2008 2:45 pm   Post subject: RE:Snowfall

not sure...you could set the movements so it will increase the x and y and then decrease so you get a side to side movement...other than that i don't know
copthesaint




PostPosted: Sun Dec 14, 2008 4:06 pm   Post subject: Re: Snowfall

Yes it's Rand.Int (#,#)
This isn't acually random (based on time) but If you want True Random look up Rand.Seed
for what your doing though Rand.int will be fine
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: