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

Username:   Password: 
 RegisterRegister   
 How to make an object slide across the screen
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Feltie




PostPosted: Mon Mar 07, 2011 8:41 pm   Post subject: How to make an object slide across the screen

What is it you are trying to achieve?
Im trying to move the sun (yellow circle) across the screen behind everything else except the background

What is the problem you are having?
i dont know how to

Describe what you have tried to solve this problem
a bunch of research

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:


View.Set("graphics:640,400")
Draw.FillBox(0,0,639,399,11)
Draw.FillBox(0,0,639,100,2)
Draw.FillBox(100,100,400,260,15)
Draw.Line(100,260,400,260,4)
Draw.Line(100,260,250,380,4)
Draw.Line(250,380,400,260,4)
Draw.Fill(200,300,4,4)
Draw.FillBox(280,100,340,210,7)
Draw.FillOval(290,160,5,5,12)
Draw.FillBox(140,180,200,240,9)
Draw.FillBox(510,100,560,250,185)
Draw.FillOval(535,275,60,60,10)
Draw.FillOval(400,360,35,35,0)
Draw.FillOval(445,360,35,35,0)
Draw.FillOval(490,360,35,35,0)
Draw.FillOval(80,340,65,65,14)
Draw.Text("Graphing in Turing #2", 20,60,defFontID,7)
Draw.Text("Trevor Whitaker", 20,40,defFontID,7)
Draw.Text("March 7, 2011", 20,20,defFontID,7)



Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Mar 07, 2011 8:50 pm   Post subject: RE:How to make an object slide across the screen

for-loops are typically useful for drawing things in different locations.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Feltie




PostPosted: Mon Mar 07, 2011 9:04 pm   Post subject: RE:How to make an object slide across the screen

can you maybe give me an example using my coe cause im still new to turing
Tony




PostPosted: Mon Mar 07, 2011 9:24 pm   Post subject: RE:How to make an object slide across the screen

code:

for x : 1 .. 100
    Draw.Oval(x,100,5,5,red)
    delay(10)
end for
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Grim




PostPosted: Tue Mar 08, 2011 7:15 pm   Post subject: RE:How to make an object slide across the screen

I'll probably get criticized for recommending this, but you can set a picture "depth" using Sprite commands. Yes, the Sprite module in Turing is awful, but it's an easy way to do what you want.
Insectoid




PostPosted: Thu Mar 10, 2011 11:54 am   Post subject: RE:How to make an object slide across the screen

It's even easier to just draw it first, then draw everything else.
Raknarg




PostPosted: Fri Mar 18, 2011 6:02 pm   Post subject: RE:How to make an object slide across the screen

Well, basically like Tony said, just replace the numbers with variables and change them inside a loop.
Insectoid




PostPosted: Fri Mar 18, 2011 7:28 pm   Post subject: RE:How to make an object slide across the screen

OP hasn't posted since the 7th. Safe to say this thread is dead.
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Sun Mar 20, 2011 7:36 pm   Post subject: RE:How to make an object slide across the screen

whoops. Forgot to check.
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  [ 9 Posts ]
Jump to:   


Style:  
Search: