Computer Science Canada

The coolest thing

Author:  rjm72 [ Tue Oct 19, 2004 12:02 pm ]
Post subject:  The coolest thing

This looks pretty cool and if u hav any cool ideas to improve it please post them!!!

code:

var x1, x2, y1, y2, x3, y3, x4, y4, x5, y5, x6, y6, button, col : int
setscreen ("graphics:600;500,nobuttonbar")

col := 56
colour (0)


process forground
    loop

        Mouse.Where (x1, y1, button)
        exit when x1 = 0 and y1 = 0
        Mouse.Where (x3, y3, button)
        Mouse.Where (x5, y5, button)
        x2 := x1 - 10
        y2 := y1 + 10
        x4 := x3 - 10
        y4 := y3 + 10
        x6 := x5 - 10
        y6 := y5 + 10
        put " "

        drawoval (x2, y2, 50, 50, col)
        drawfilloval (x4, y4, 25, 25, col)
        drawoval (x6, y6, 100, 100, col)
        col := col + 1

        if col = 103 then

            col := 56

        end if

    end loop
end forground

process background
    loop
       
        colourback (Rand.Int(1,225))
        cls
        delay (1000)
        Mouse.Where (x1, y1, button)
        exit when x1 = 0 and y1 = 0
    end loop
end background

fork background
fork forground

Author:  Tony [ Tue Oct 19, 2004 1:53 pm ]
Post subject: 

nice, though I don't like the changing background colour Confused +10Bits though

if you're interested in advancing in programming, I recommend trying out the following tutorials:
arrays
View.Update(is there a better tutorial out there?)

Author:  zomg [ Wed Oct 20, 2004 10:46 am ]
Post subject: 

cool
8)
but i agree ... background changing sorta ruins it

Author:  Mazer [ Wed Oct 20, 2004 11:38 am ]
Post subject: 

That was surprisingly decent, but I must agree with tony.
Also, you may want to mention something about the mouse. My cursor was outside the borders of the run winow, and until I noticed the Mouse.Where() call in the code, I thought the whole program was the background changing colour.

Author:  rjm72 [ Wed Oct 20, 2004 12:42 pm ]
Post subject: 

I was learning about process thats why i hav the changin background and plus my freind wanted it to change colour.THANKS FOR POSTIN UR IDEAS!!! Very Happy


: