Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 makeing a movieng box
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SteveO




PostPosted: 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
Sponsor
sponsor
AsianSensation




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: