bouncy ball program: try to make it cool
Author |
Message |
skilly
|
Posted: Tue Jan 15, 2008 12:21 pm Post subject: 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.
code: |
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
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
StealthArcher
|
Posted: Tue Jan 15, 2008 1:35 pm Post subject: RE:bouncy ball program: try to make it cool |
|
|
Ummmm, no. |
|
|
|
|
|
petree08
|
Posted: Tue Jan 15, 2008 2:36 pm Post subject: RE:bouncy ball program: try to make it cool |
|
|
i agree, no,
i'm pretty sure we've seen this a million times |
|
|
|
|
|
ericfourfour
|
Posted: Tue Jan 15, 2008 4:37 pm Post subject: RE:bouncy ball program: try to make it cool |
|
|
|
|
|
|
|
|
StealthArcher
|
Posted: Tue Jan 15, 2008 4:57 pm Post subject: RE:bouncy ball program: try to make it cool |
|
|
First off try this, it looks like a ball instead of a worm,
code: |
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
|
Posted: Tue Jan 22, 2008 12:15 am Post subject: Re: bouncy ball program: try to make it cool |
|
|
Quote:
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
|
Posted: Tue Jan 22, 2008 8:30 pm Post subject: 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) " |
|
|
|
|
|
|
|