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

Username:   Password: 
 RegisterRegister   
 Blizzard That Depends On Mouse Movement
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
WhatDotColourMaster




PostPosted: Mon Dec 05, 2005 5:38 pm   Post subject: Blizzard That Depends On Mouse Movement

[mod:40c72b833c]
The falowing code was orgainl posted here:
http://www.compsci.ca/v2/viewtopic.php?t=4676

The user in question has copyed the code in almost competation with giving litte to no cerited to the orgianl poster. Therefor the topic is being locked. For any questions or coments realting to the code pleas post them in the orgianl topic.
[/mod:40c72b833c]

Just decieded to paste this something that I had in my documents.
Hope you enjoy.
I WANT BITS!!!!!!!!!!!!!!!AHHHHHHHHHHHHHH

code:
% Blizzard dependant upon the mouse movement/placement
View.Set ("offscreenonly,nobuttonbar")

type flakes :
    record
        x : int % [x] position
        y : int % [y] position
        dX : int % Direction [x]
        size : int % Size of snow flake [1,2, or 3]
    end record

var fCount : int := 800 % Change to set the number of snowflakes
var mX, mY, mB : int := 0 % Mouse Coordinates
var snow : array 1 .. fCount of flakes % Create the snowflakes

procedure RandomizeValues (count : int)
    snow (count).x := Rand.Int (-300, maxx + 300) % Randomize the position [x]
    snow (count).y := Rand.Int (maxy, maxy + 200) % Randomize the position [y]
    snow (count).size := Rand.Int (1, 3) % Randomize the size of the snowflake
    snow (count).dX := Rand.Int (-3,3) % Randomize the direction of the snowflake
end RandomizeValues

% Initialize values
for i : 1 .. fCount
    RandomizeValues (i) % Randomize the values for each snow flake
end for

loop
    Draw.FillBox (0, 0, maxx, maxy, 7)
    for i : 1 .. fCount
        Mouse.Where (mX, mY, mB)
        snow (i).x += snow (i).dX + (mX - maxx div 2) div 150 * snow (i).size % Move the snowflake in its [x] direction
        snow (i).y -= snow (i).size*2 % Move the snowflake downward
        Draw.FillOval (snow (i).x, snow (i).y, snow (i).size, snow (i).size, 25+snow(i).size*2) % Draw the snow flake
        if snow (i).y < 0 then % If the snowflake has reached the ground
            RandomizeValues (i) % Start it over
        end if
    end for
    View.Update
end loop
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Dec 05, 2005 5:43 pm   Post subject: (No subject)

you've made all of that on your own?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Cervantes




PostPosted: Mon Dec 05, 2005 6:27 pm   Post subject: Re: Blizzard That Depends On Mouse Movement

Good point, Tony.

Furthermore,
WhatDotColourMaster wrote:

I WANT BITS!!!!!!!!!!!!!!!AHHHHHHHHHHHHHH

Now, I understand that bits are magical and all, so I'm just going to say this for your own health. The best way to get bits is to help people, to post tutorials, or to post good (source) code. You will likely receive gifts of bits from those people you've helped or impressed, or from moderators. Your next best bet is to post a lot, since you get bits with each post you want. However, you have to be careful about what your posting. If it is inappropriate, spammish, or a host of other bad things, you will, in fact, lose bits. In this way, posting a lot (spamming) may actually result in a net loss of bits.
Martin




PostPosted: Mon Dec 05, 2005 9:44 pm   Post subject: (No subject)

This is almost as good as the one that Blade posted a while back. Here are some bits.
codemage




PostPosted: Tue Dec 06, 2005 10:44 am   Post subject: (No subject)

The number of bits you gave him is inconsequential vs. the blizzard of negative bits he has at the moment.

EDIT:

if you append:

code:
snow (i).y -= snow (i).size*2


with:

code:
snow (i).y -= snow (i).size*2 - (mY - maxx div 2) div 100


Your mouse's Y direction controls the speed of the snow's descent. (Up = mild flurry to Down = blizzard of the century).

Cool
Martin




PostPosted: Wed Dec 07, 2005 9:08 am   Post subject: (No subject)

What? Is Blade stealing your source code?

He posted the same program here: http://www.compsci.ca/v2/viewtopic.php?t=4676&start=0&postdays=0&postorder=asc&highlight=
ZeroPaladn




PostPosted: Wed Dec 07, 2005 9:43 am   Post subject: (No subject)

au contraire, WhatDotColourMaster took the code from that post, due to the fat that this post was made this month and Drake's post was made LAST YEAR.

Word of caution to you WhatDotColourMaster...

Stealing code is bad.
Especially when you dont say its theirs.

Keep this going and you might be dubbed Newbcake or LAMER.

**EDIT**

Or banned Shifty
Tony




PostPosted: Wed Dec 07, 2005 10:18 am   Post subject: (No subject)

ZeroPaladn wrote:
you might be dubbed Newbcake or LAMER.

Or banned Shifty

Oh, I'm liking the way you think.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: