makeing a movieng box
Author |
Message |
SteveO
|
Posted: Tue Feb 10, 2004 6:42 pm Post subject: makeing a movieng box |
|
|
hey i would like to know how to make a moving box, i;m a noob, do i use the drawfillbox way? thx |
|
|
|
|
|
Sponsor Sponsor
|
|
|
AsianSensation
|
Posted: Tue Feb 10, 2004 6:45 pm Post subject: (No subject) |
|
|
draw a box with variables as your coordinates, then change the variables in a loop. then clear the screen, and redraw your box. |
|
|
|
|
|
Paul
|
Posted: Tue Feb 10, 2004 7:01 pm Post subject: Re: makeing a movieng box |
|
|
SteveO wrote: hey i would like to know how to make a moving box, i;m a noob, do i use the drawfillbox way? thx
Drawfillbox or drawbox shouldn't matter, as long as you change the numbers that determine the co-ordinates of a shape, any shape, using Asian Sensation's way will work. You also don't have to clear the screen, some people just draw a white version of the box over it (or the color of the background), then move on to the next position. |
|
|
|
|
|
jonos
|
Posted: Tue Feb 10, 2004 8:40 pm Post subject: (No subject) |
|
|
well, since no one has posted code, and if you're going to cheat if this is an assignment, then that is your choice, i don't care. so here is how to move a box:
the easy way, which will look like crap because of the cls thing if you make it faster, or larger objects, etc.
code: |
var x, y : int := 100
loop
drawfillbox (x, y, x + 10, y + 20, black) % your box
x := x + 5
y := y + 5
delay(25)
cls
end loop |
the cover-box method
code: |
var x, y : int := 100
loop
drawfillbox (x, y, x + 10, y + 20, black) % your box
delay(25)
drawfillbox (x, y, x+10, y + 20, white)
x := x + 5
y := y + 5
end loop
|
and there is another one with View.Update, but it's not working for me for some reason cause either im stupid or turing is stupid, so lets hope its turing |
|
|
|
|
|
SteveO
|
Posted: Tue Feb 10, 2004 9:45 pm Post subject: (No subject) |
|
|
i'm not in school i just have sometime on my hands and what to do some proggramming with turing and thx a lot for your help |
|
|
|
|
|
|
|