Computer Science Canada

A Freaky sOuNdInG Animation

Author:  exploitmonkey [ Wed Dec 29, 2004 8:03 pm ]
Post subject:  A Freaky sOuNdInG Animation

Turn up your speakers ! Note: Do not view if you are photosensitive!!!

code:


loop
    var i : int
    i := Rand.Int (1, 255)

    drawfillbox (0, 0, maxx, maxy, i)
    delay (10)
    %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>OVALS
    var t : int
    t := Rand.Int (0, maxy)
    var u : int
    u := Rand.Int (1, 255)
    var j : int
    j := Rand.Int (0, maxx)
    drawfilloval (j, t, 50, 50, u)


    var w : int
    w := Rand.Int (400, 2500)
    sound (w, 80)
end loop


Author:  Cervantes [ Wed Dec 29, 2004 10:24 pm ]
Post subject: 

You don't need to make your own code tags: just use [ code][ /code] Wink
The only reason your code is understandable is because it is short. Were the code longer, it would (unnecessarily) take far too much effort to understand it. To fix this, use more descriptive variables.
Here's my suggestions:
Replace i with background_Colour
Replace t with oval_Y
Replace j with oval_X
Replace u with oval_Colour

If you use those variable names, people might be able to easily understand what the variables do without having to look at the entire program. Really, why are you using t and u to represent y and x, respectively?


: