
-----------------------------------
skilly
Tue Jan 15, 2008 12:21 pm

bouncy ball program: try to make it cool
-----------------------------------
Make changes to this program and try to make it look cooler and then paste it so I can check it out.


View.Set ("graphics:max;max;noecho")
var x, y: int := 10
var xChange, yChange : int := 3
Draw.Fill (100, 100, black, 2)
loop
    Draw.FillOval (x, y, 10, 10, white)
     Time.Delay (3)
    x += xChange
    y += yChange
    if x < 10 or x > maxx - 10 then
        xChange := -xChange
    end if
    if y < 10 or y > maxy - 10 then
        yChange := -yChange
    end if
end loop


-----------------------------------
StealthArcher
Tue Jan 15, 2008 1:35 pm

RE:bouncy ball program: try to make it cool
-----------------------------------
Ummmm, no.

-----------------------------------
petree08
Tue Jan 15, 2008 2:36 pm

RE:bouncy ball program: try to make it cool
-----------------------------------
i agree, no, 
i'm pretty sure we've seen this a million times

-----------------------------------
ericfourfour
Tue Jan 15, 2008 4:37 pm

RE:bouncy ball program: try to make it cool
-----------------------------------



-----------------------------------
StealthArcher
Tue Jan 15, 2008 4:57 pm

RE:bouncy ball program: try to make it cool
-----------------------------------
First off try this, it looks like a ball instead of a worm,

View.Set("graphics:max;max;noecho,offscreenonly") 
var x, y: int := 10 
var xChange, yChange : int := 3 
loop 
    cls
    Draw.FillOval (x, y, 10, 10, black)
    View.Update 
    x += xChange 
    y += yChange 
    if x < 10 or x > maxx - 10 then 
        xChange := -xChange 
    end if 
    if y < 10 or y > maxy - 10 then 
        yChange := -yChange 
    end if
end loop


Oh and offscreenonly, and View.Update make things prettier, now, I've shown some fundamentals, go make it cooler, and post it here so we can check it out.

-----------------------------------
adigamov
Tue Jan 22, 2008 12:15 am

Re: bouncy ball program: try to make it cool
-----------------------------------

View.Set ("graphics:max;max;noecho")
var x, y : int := 10
var xChange, yChange : int := 3
Draw.Fill (100, 100, black, 2)
var z : int := 0

loop
    Draw.FillOval (x, y, 10, 10, z)
    Time.Delay (3)
    x += xChange
    y += yChange
    if x < 10 or x > maxx - 10 then
        xChange := -xChange
        z := z + 1
    end if
    if y < 10 or y > maxy - 10 then
        yChange := -yChange
        z := z + 1
    end if
end loop

lol
now it changes colour whenever it makes contact to a wall

-----------------------------------
TokenHerbz
Tue Jan 22, 2008 8:30 pm

RE:bouncy ball program: try to make it cool
-----------------------------------
just change your original post a bit, have in instead it drawing white enter "   Rand.Int(1,250)   "
