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

Username:   Password: 
 RegisterRegister   
 Making Sprite move around in circles
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jisterror




PostPosted: Wed Jan 31, 2007 9:25 pm   Post subject: Making Sprite move around in circles

I m doing this for my CS project and Im a complete noob at this.. Crying or Very sad Help is greatly appreaciated Mr. Green
Sponsor
Sponsor
Sponsor
sponsor
CodeMonkey2000




PostPosted: Wed Jan 31, 2007 10:29 pm   Post subject: Re: Making Sprite move around in circles

Rolling Eyes Please refer to the Turing Walkthrough
Jisterror




PostPosted: Thu Feb 01, 2007 6:55 pm   Post subject: Re: Making Sprite move around in circles

Thanx~~ I ll add this to my favorites! Very Happy
rollerdude




PostPosted: Tue Feb 20, 2007 10:08 am   Post subject: Re: Making Sprite move around in circles

i love making things move in circles

var spritex,spritey:int
var away:int:= %however far away(in pixels) you want the sprite from the
%centre the circle

for i:1..360 %degree of movment
spritex:=round(sind(i)*away) % tells the x and y of the sprite when you call it
spritey:=round(cosd(i)*away)
end for


note: you'll have to add a number after "away" so that the centre of the circle isn't at pixel 1,1

Sprite.Draw (spritex,spritey ....) %or whatever it is to call sprites
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  [ 4 Posts ]
Jump to:   


Style:  
Search: